mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 23:51:49 +01:00
Move set culture method to DS4Form class
This commit is contained in:
parent
8297f4cd75
commit
847e0bd6b9
@ -89,7 +89,7 @@ namespace DS4Windows
|
|||||||
public DS4Form(string[] args)
|
public DS4Form(string[] args)
|
||||||
{
|
{
|
||||||
Global.Load();
|
Global.Load();
|
||||||
Program.SetCulture(UseLang);
|
this.setCulture(UseLang);
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ThemeUtil.SetTheme(lvDebug);
|
ThemeUtil.SetTheme(lvDebug);
|
||||||
@ -430,6 +430,16 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setCulture(string culture)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(culture);
|
||||||
|
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo(culture);
|
||||||
|
}
|
||||||
|
catch { /* Skip setting culture that we cannot set */ }
|
||||||
|
}
|
||||||
|
|
||||||
private void populateHoverTextDict()
|
private void populateHoverTextDict()
|
||||||
{
|
{
|
||||||
hoverTextDict.Clear();
|
hoverTextDict.Clear();
|
||||||
|
@ -120,16 +120,6 @@ namespace DS4Windows
|
|||||||
threadComEvent.Close();
|
threadComEvent.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetCulture(string culture)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(culture);
|
|
||||||
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo(culture);
|
|
||||||
}
|
|
||||||
catch { /* Skip setting culture that we cannot set */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void createControlService()
|
private static void createControlService()
|
||||||
{
|
{
|
||||||
controlThread = new Thread(() => { rootHub = new ControlService(); });
|
controlThread = new Thread(() => { rootHub = new ControlService(); });
|
||||||
|
Loading…
Reference in New Issue
Block a user