@@ -192,24 +192,19 @@ private void SaveSettings()
192192 Properties . Settings . Default . StartMinimized = tbtnStartMinimized . ToggleState == ToggleButtonState . Active ;
193193 Properties . Settings . Default . ShowAdminWarning = tbtnAdminWarning . ToggleState == ToggleButtonState . Active ;
194194
195- if ( ( cpbThemeStyle . MetroColor != Properties . Settings . Default . MetroColor ) || ( Properties . Settings . Default . BorderThickness != ( int ) itxtBorderThickness . IntegerValue ) || ( tbtnDetails . ToggleState == ToggleButtonState . Active ) != Properties . Settings . Default . ViewDetails )
196- {
197- MessageBoxAdv . Show ( _main . LanguageManager . GetLanguage ( ) . MsgRestartRequired , "DeadLock" , MessageBoxButtons . OK , MessageBoxIcon . Information ) ;
198- }
199-
200195 Properties . Settings . Default . MetroColor = cpbThemeStyle . SelectedColor ;
201196 Properties . Settings . Default . BorderThickness = ( int ) itxtBorderThickness . IntegerValue ;
202197 Properties . Settings . Default . RememberFormSize = tbtnFormSize . ToggleState == ToggleButtonState . Active ;
203198 Properties . Settings . Default . ViewDetails = tbtnDetails . ToggleState == ToggleButtonState . Active ;
204199
205- if ( cboLanguage . SelectedIndex != Properties . Settings . Default . Language || txtLanguagePath . Text != Properties . Settings . Default . LanguagePath )
206- {
207- Properties . Settings . Default . Language = cboLanguage . SelectedIndex ;
208- Properties . Settings . Default . LanguagePath = txtLanguagePath . Text ;
200+ _main . LoadTheme ( ) ;
201+ LoadTheme ( ) ;
209202
210- _main . LanguageSwitch ( ) ;
211- LoadLanguage ( ) ;
212- }
203+ Properties . Settings . Default . Language = cboLanguage . SelectedIndex ;
204+ Properties . Settings . Default . LanguagePath = txtLanguagePath . Text ;
205+
206+ _main . LanguageSwitch ( ) ;
207+ LoadLanguage ( ) ;
213208
214209 List < string > args = new List < string > ( ) ;
215210
@@ -230,7 +225,6 @@ private void SaveSettings()
230225 StartRegManager ( args ) ;
231226 }
232227 Properties . Settings . Default . TakeOwnership = tbtnOwnership . ToggleState == ToggleButtonState . Active ;
233-
234228 Properties . Settings . Default . Save ( ) ;
235229 }
236230 catch ( Exception ex )
@@ -243,7 +237,7 @@ private void SaveSettings()
243237 /// Start the RegManager with a list of arguments.
244238 /// </summary>
245239 /// <param name="args">A list of arguments.</param>
246- private static void StartRegManager ( IReadOnlyList < string > args )
240+ private static void StartRegManager ( IEnumerable < string > args )
247241 {
248242 string a = string . Join ( " " , args ) ;
249243 Process process = new Process
@@ -342,15 +336,10 @@ private void btnReset_Click(object sender, EventArgs e)
342336
343337 Properties . Settings . Default . Reset ( ) ;
344338 Properties . Settings . Default . Save ( ) ;
345- if ( ( cpbThemeStyle . MetroColor != Properties . Settings . Default . MetroColor ) || ( Properties . Settings . Default . BorderThickness != ( int ) itxtBorderThickness . IntegerValue ) || ( tbtnDetails . ToggleState == ToggleButtonState . Active ) != Properties . Settings . Default . ViewDetails )
346- {
347- MessageBoxAdv . Show ( _main . LanguageManager . GetLanguage ( ) . MsgRestartRequired , "DeadLock" , MessageBoxButtons . OK , MessageBoxIcon . Information ) ;
348- }
349- if ( cboLanguage . SelectedIndex != Properties . Settings . Default . Language || txtLanguagePath . Text != Properties . Settings . Default . LanguagePath )
350- {
351- _main . LanguageSwitch ( ) ;
352- LoadLanguage ( ) ;
353- }
339+ _main . LoadTheme ( ) ;
340+ LoadTheme ( ) ;
341+ _main . LanguageSwitch ( ) ;
342+ LoadLanguage ( ) ;
354343 LoadSettings ( ) ;
355344 }
356345 catch ( Exception ex )
0 commit comments