@@ -56,31 +56,31 @@ private void okButton_Click(object sender, EventArgs e)
5656 int langIndex = languageNames . IndexOf ( ( string ) comboBox1 . SelectedItem ) ;
5757 string languageCode = Localization . languageCodes [ langIndex ] ;
5858
59- // if (languageCode != Localization.currentLocale)
60- // {
61- // Localization.currentLocale = languageCode;
59+ if ( languageCode != Localization . currentLocale )
60+ {
61+ Localization . currentLocale = languageCode ;
6262
63- // if (AppContext.notifyIcon == null) // Has UI been loaded yet?
64- // {
65- // Localization.LoadLocaleFromFile();
66- // }
63+ if ( AppContext . notifyIcon == null ) // Has UI been loaded yet?
64+ {
65+ Localization . LoadLocaleFromFile ( ) ;
66+ }
6767
68- // JsonConfig.settings.language = languageCode;
68+ JsonConfig . settings . language = languageCode ;
6969
70- // if (AppContext.notifyIcon != null)
71- // {
72- // DialogResult result = MessageDialog.ShowQuestion(_("WinDynamicDesktop needs to restart for the " +
73- // "language to change. Do you want to restart the app now?"), _("Question"));
70+ if ( AppContext . notifyIcon != null )
71+ {
72+ DialogResult result = MessageDialog . ShowQuestion ( _ ( "WinDynamicDesktop needs to restart for the " +
73+ "language to change. Do you want to restart the app now?" ) , _ ( "Question" ) ) ;
7474
75- // if (result == DialogResult.Yes)
76- // {
77- // JsonConfig.ReloadConfig();
78- // }
79- // }
80- // }
75+ if ( result == DialogResult . Yes )
76+ {
77+ JsonConfig . ReloadConfig ( ) ;
78+ }
79+ }
80+ }
8181
8282 this . Close ( ) ;
83- Localization . SelectLanguage ( false ) ;
83+ // Localization.SelectLanguage(false);
8484 }
8585
8686 private void cancelButton_Click ( object sender , EventArgs e )
0 commit comments