Skip to content

Commit

Permalink
Modified Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
XyLe-GBP committed Mar 3, 2024
1 parent 9e00307 commit 4493e16
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Globalization;
using System.IO;
using System.Threading;
using System.Windows.Forms;

namespace NVGE
Expand All @@ -18,6 +20,11 @@ static void Main()
bool hasHandle = false;
try
{
if (!File.Exists(Common.xmlpath))
{
Common.InitConfig();
}

try
{
hasHandle = mutex.WaitOne(0, false);
Expand Down Expand Up @@ -53,6 +60,23 @@ static void Main()
return;
}

Config.Load(Common.xmlpath);
switch (int.Parse(Config.Entry["ApplicationLanguage"].Value))
{
case 0:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("");
break;
case 1:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ja");
break;
case 2:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh");
break;
default:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("");
break;
}

Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down

0 comments on commit 4493e16

Please sign in to comment.