diff --git a/source/Funbit.Ets.Telemetry.Server/App.config b/source/Funbit.Ets.Telemetry.Server/App.config
index f36dc92e..190208d6 100644
--- a/source/Funbit.Ets.Telemetry.Server/App.config
+++ b/source/Funbit.Ets.Telemetry.Server/App.config
@@ -2,9 +2,6 @@
-
-
-
@@ -68,11 +65,4 @@
-
-
-
- 0
-
-
-
\ No newline at end of file
diff --git a/source/Funbit.Ets.Telemetry.Server/Helpers/Settings.cs b/source/Funbit.Ets.Telemetry.Server/Helpers/Settings.cs
index 40844c60..6228b5ed 100644
--- a/source/Funbit.Ets.Telemetry.Server/Helpers/Settings.cs
+++ b/source/Funbit.Ets.Telemetry.Server/Helpers/Settings.cs
@@ -15,6 +15,7 @@ public class Settings
public bool FirewallSetupHadErrors { get; set; }
public bool UrlReservationSetupHadErrors { get; set; }
+ public string LastLang { get; set; }
#endregion
diff --git a/source/Funbit.Ets.Telemetry.Server/MainForm.cs b/source/Funbit.Ets.Telemetry.Server/MainForm.cs
index 081d38f8..70f9b5e6 100644
--- a/source/Funbit.Ets.Telemetry.Server/MainForm.cs
+++ b/source/Funbit.Ets.Telemetry.Server/MainForm.cs
@@ -154,6 +154,11 @@ void Start()
void MainForm_Load(object sender, EventArgs e)
{
+ // Check Last Settings
+ Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Instance.LastLang);
+ // Apply Locale
+ FormInitialize();
+
// log current version for debugging
Log.InfoFormat("{0} ({1}) {2}", Environment.OSVersion,
Environment.Is64BitOperatingSystem ? "64" + StringLib.CurrentVersion_Bit : "32" + StringLib.CurrentVersion_Bit,
@@ -164,19 +169,6 @@ void MainForm_Load(object sender, EventArgs e)
Setup();
Start();
-
- // Check Last Settings
- if (Properties.Settings.Default.Lang == 0)
- {
- Lang_ko_ToolStripMenuItem.PerformClick();
- }
- else if (Properties.Settings.Default.Lang == 1)
- {
- Lang_en_ToolStripMenuItem.PerformClick();
- }
-
- // Apply Locale
- FormInitialize();
}
void MainForm_FormClosed(object sender, FormClosedEventArgs e)
@@ -326,17 +318,21 @@ private void TranslateToolStripMenuItem_Click(object sender, EventArgs e)
private void Lang_ko_ToolStripMenuItem_Click(object sender, EventArgs e)
{
- Thread.CurrentThread.CurrentUICulture = new CultureInfo("ko");
- Properties.Settings.Default.Lang = 0;
- Properties.Settings.Default.Save();
- FormInitialize();
+ ChangeLang("ko", Lang_ko_ToolStripMenuItem.Text);
}
private void Lang_en_ToolStripMenuItem_Click(object sender, EventArgs e)
{
- Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
- Properties.Settings.Default.Lang = 1;
- Properties.Settings.Default.Save();
+ ChangeLang("en", Lang_en_ToolStripMenuItem.Text);
+ }
+
+ private void ChangeLang(string lang, string lang_button)
+ {
+ Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang);
+ Settings.Instance.LastLang = lang;
+ Settings.Instance.Save();
+ MessageBox.Show(StringLib.Settings_Lang_LogInfo, StringLib.Information, MessageBoxButtons.OK ,MessageBoxIcon.Information);
+ Log.InfoFormat(StringLib.Settings_Lang_1 + lang_button + StringLib.Settings_Lang_2);
FormInitialize();
}
}
diff --git a/source/Funbit.Ets.Telemetry.Server/Properties/Settings.Designer.cs b/source/Funbit.Ets.Telemetry.Server/Properties/Settings.Designer.cs
index dd5d3e2f..9152b00b 100644
--- a/source/Funbit.Ets.Telemetry.Server/Properties/Settings.Designer.cs
+++ b/source/Funbit.Ets.Telemetry.Server/Properties/Settings.Designer.cs
@@ -22,17 +22,5 @@ public static Settings Default {
return defaultInstance;
}
}
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public int Lang {
- get {
- return ((int)(this["Lang"]));
- }
- set {
- this["Lang"] = value;
- }
- }
}
}
diff --git a/source/Funbit.Ets.Telemetry.Server/Properties/Settings.settings b/source/Funbit.Ets.Telemetry.Server/Properties/Settings.settings
index 2a31e518..8e615f25 100644
--- a/source/Funbit.Ets.Telemetry.Server/Properties/Settings.settings
+++ b/source/Funbit.Ets.Telemetry.Server/Properties/Settings.settings
@@ -1,9 +1,5 @@
-
+
-
-
- 0
-
-
+
\ No newline at end of file