lang support for binding

This commit is contained in:
NaBian committed 2020-04-18 16:42:02 +08:00
1 parent 95f35c7366
commit 1680858455
20 files changed
+274 -117

No files matched your search

@@ -1,9 +1,8 @@
using System.Diagnostics;
using System.Globalization;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using HandyControl.Controls;
using HandyControl.Data;
using HandyControl.Tools;
using HandyControlDemo.Data;
using HandyControlDemo.Properties.Langs;
using HandyControlDemo.Window;
@@ -23,19 +22,11 @@ namespace HandyControlDemo.UserControl
{
PopupConfig.IsOpen = false;
if (tag.Equals(GlobalData.Config.Lang)) return;
Growl.Ask(Properties.Langs.Lang.ChangeLangAsk, b =>
{
if (!b) return true;
GlobalData.Config.Lang = tag;
GlobalData.Save();
ConfigHelper.Instance.SetLang(tag);
LangDecorator.Culture = new CultureInfo(tag);
LangDecorator.Culture = new CultureInfo(tag);
//var processModule = Process.GetCurrentProcess().MainModule;
//if (processModule != null)
// Process.Start(processModule.FileName);
//Application.Current.Shutdown();
return true;
});
GlobalData.Config.Lang = tag;
GlobalData.Save();
}
}