forked from Archeb/opentrace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
40 lines (36 loc) · 1.44 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Advexp;
using Eto.Drawing;
using Eto.Forms;
using System;
using System.Collections.ObjectModel;
using System.Configuration;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Windows.Input;
namespace OpenTrace
{
internal class Program
{
[STAThread]
static void Main(string[] args)
{
UserSettings.LoadSettings();
if (UserSettings.language != "" && UserSettings.language != null)
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(UserSettings.language);
}
// 本地化设置
if (System.Threading.Thread.CurrentThread.CurrentUICulture.Name == "zh-CN" && TimeZoneInfo.Local.Id == "China Standard Time")
{
if (UserSettings.mapProvider == "" && UserSettings.mapProvider != null) UserSettings.mapProvider = "baidu";
if (UserSettings.POWProvider == "" && UserSettings.POWProvider != null) UserSettings.POWProvider = "sakura";
}
else
{
if (UserSettings.mapProvider == "" && UserSettings.mapProvider != null) UserSettings.mapProvider = "google";
if (UserSettings.POWProvider == "" && UserSettings.POWProvider != null) UserSettings.POWProvider = "api.leo.moe";
}
new Application(Eto.Platform.Detect).Run(new MainForm());
}
}
}