path edit (exist error)

This commit is contained in:
rmbgame
2021-02-28 19:06:09 +08:00
parent 998bd7ff85
commit 6ebfafb307
25 changed files with 210 additions and 160 deletions
@@ -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();
}
}
}
@@ -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 };
}
}