@@ -26,7 +26,7 @@ public ThemeType Theme
2626 get => _theme ;
2727 set => InitializeTheme ( value ) ;
2828 }
29-
29+
3030 private Color _color ;
3131 public Color Color
3232 {
@@ -61,7 +61,7 @@ void AddTheme()
6161 ApplyTheme ( ) ;
6262 return ;
6363 }
64- if ( Theme == ThemeType . Default )
64+ if ( Theme == ThemeType . Default )
6565 Theme = ThemeType . Light ;
6666 }
6767
@@ -79,7 +79,7 @@ protected void InitializeTheme(ThemeType themeType)
7979 }
8080 var path = GetResourceUri ( GetThemeResourceName ( themeType ) ) ;
8181 var newResourceDictionary = new ResourceDictionary { Source = path } ;
82-
82+
8383 MergedDictionaries . Insert ( 0 , newResourceDictionary ) ;
8484 ThemeChanged ? . Invoke ( themeType ) ;
8585 UpdateColorOnThemeChange ( ) ;
@@ -93,19 +93,19 @@ bool IsDarkMode()
9393 try
9494 {
9595 var value = ( int ) Registry . GetValue ( registryKey , registryValue , 1 ) ;
96- return value == 0 ;
96+ return value == 0 ;
9797 }
9898 catch
9999 {
100- return false ;
100+ return false ;
101101 }
102102 }
103103
104104 void ApplyTheme ( )
105105 {
106106 var isDarkMode = IsDarkMode ( ) ;
107107 var theme = isDarkMode == true ? ThemeType . Dark : ThemeType . Light ;
108- if ( Theme != theme )
108+ if ( Theme != theme )
109109 Theme = theme ;
110110 }
111111
@@ -120,7 +120,7 @@ bool IsWindows10OrLater()
120120 }
121121 }
122122 Version version = Environment . OSVersion . Version ;
123- return version . Major >= 10 ;
123+ return version . Major >= 10 ;
124124 }
125125
126126 private void OnUserPreferenceChanged ( object sender , UserPreferenceChangedEventArgs e )
@@ -160,7 +160,7 @@ void KillExistingProcess(string processName)
160160 try
161161 {
162162 process . Kill ( ) ;
163- process . WaitForExit ( ) ;
163+ process . WaitForExit ( ) ;
164164 }
165165 catch { }
166166 }
@@ -236,7 +236,7 @@ public T TryFindResource<T>(string resourceKey)
236236 {
237237 return typedResource ;
238238 }
239- return default ;
239+ return default ;
240240 }
241241
242242
@@ -263,8 +263,8 @@ void UpdateResourceDictionaryColor(string key = "Primary", Color color = default
263263 else
264264 {
265265 if ( Color != null
266- &&
267- ! Array . Exists ( resourceKeys , i => newKey . EndsWith ( i ) ) )
266+ &&
267+ ! Array . Exists ( resourceKeys , i => newKey . EndsWith ( i ) ) )
268268 {
269269 var brightnessColor = new Color
270270 {
@@ -294,7 +294,7 @@ void UpdateResourceDictionaryColor(string key = "Primary", Color color = default
294294 }
295295 }
296296
297- void SetResourceColorAndBrush ( string key , Color color )
297+ void SetResourceColorAndBrush ( string key , Color color )
298298 {
299299 UpdateResource ( key , color ) ;
300300 var newBrush = new SolidColorBrush ( color ) ;
0 commit comments