mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-21 09:02:26 +08:00
path edit (exist error)
This commit is contained in:
+4
@@ -63,4 +63,8 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="UI\ViewModels\Pages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,28 @@
|
||||
using ReactiveUI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Properties;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Application.UI.ViewModels
|
||||
{
|
||||
public class MainWindowViewModel : WindowViewModel
|
||||
{
|
||||
bool mTopmost;
|
||||
|
||||
public bool Topmost
|
||||
{
|
||||
get => mTopmost;
|
||||
set => this.RaiseAndSetIfChanged(ref mTopmost, value);
|
||||
}
|
||||
public SettingsPageViewModel SettingsPage { get; }
|
||||
|
||||
|
||||
public MainWindowViewModel() : base()
|
||||
{
|
||||
Title = ThisAssembly.AssemblyTrademark;
|
||||
SettingsPage = new SettingsPageViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
using ReactiveUI;
|
||||
using System.Application.UI.Resx;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace System.Application.UI.ViewModels
|
||||
{
|
||||
public class SettingsPageViewModel : ViewModelBase
|
||||
{
|
||||
public SettingsPageViewModel()
|
||||
{
|
||||
//Languages = R.Languages.Select(Convert).ToList();
|
||||
}
|
||||
|
||||
//int mCurrentLanguageIndex;
|
||||
|
||||
//public int CurrentLanguageIndex
|
||||
//{
|
||||
// get => mCurrentLanguageIndex;
|
||||
// set
|
||||
// {
|
||||
// this.RaiseAndSetIfChanged(ref mCurrentLanguageIndex, value);
|
||||
// var cultureName = Languages[value].Tag?.ToString();
|
||||
// if (string.IsNullOrWhiteSpace(cultureName))
|
||||
// {
|
||||
// cultureName = R.DefaultCurrentUICulture?.Name;
|
||||
// }
|
||||
// if (!string.IsNullOrWhiteSpace(cultureName))
|
||||
// {
|
||||
// R.ChangeLanguage(cultureName);
|
||||
// }
|
||||
// //if (!IsInDesignMode)
|
||||
// //{
|
||||
// // var localizationService = DI.Get<ILocalizationService>();
|
||||
// // var cultureName = Languages[value].Tag?.ToString();
|
||||
// // if (string.IsNullOrWhiteSpace(cultureName))
|
||||
// // {
|
||||
// // cultureName = localizationService.DefaultCurrentUICulture?.Name;
|
||||
// // }
|
||||
// // if (!string.IsNullOrWhiteSpace(cultureName))
|
||||
// // {
|
||||
// // localizationService.ChangeLanguage(cultureName);
|
||||
// // }
|
||||
// //}
|
||||
// }
|
||||
//}
|
||||
|
||||
//public List<Object> Languages { get; }
|
||||
|
||||
//static Object Convert(KeyValuePair<string, string> pair)
|
||||
// => new Object { Tag = pair.Key, Content = pair.Value };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user