mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-23 23:21: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)
|
||||
{
|
||||
Global.Load();
|
||||
Program.SetCulture(UseLang);
|
||||
this.setCulture(UseLang);
|
||||
|
||||
InitializeComponent();
|
||||
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()
|
||||
{
|
||||
hoverTextDict.Clear();
|
||||
|
@ -120,16 +120,6 @@ namespace DS4Windows
|
||||
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()
|
||||
{
|
||||
controlThread = new Thread(() => { rootHub = new ControlService(); });
|
||||
|
Loading…
Reference in New Issue
Block a user