1- using System . Windows ;
2- using System . Windows . Controls ;
1+ using System . Collections . Generic ;
2+ using System . Windows ;
33using System . Windows . Media ;
44using StartPro . Api ;
55using StartPro . Resources ;
@@ -10,8 +10,19 @@ public partial class Setting : Window
1010 public Setting ( )
1111 {
1212 InitializeComponent ( ) ;
13+ List < string > UIThemeSource =
14+ [
15+ Main . ResourceManager . GetString ( "UITheme.Aero.NormalColor" ) + " (Aero.NormalColor)" ,
16+ Main . ResourceManager . GetString ( "UITheme.Aero2.NormalColor" ) + " (Aero2.NormalColor)" ,
17+ Main . ResourceManager . GetString ( "UITheme.Luna.NormalColor" ) + " (Luna.NormalColor)" ,
18+ Main . ResourceManager . GetString ( "UITheme.Luna.Homestead" ) + " (Luna.Homestead)" ,
19+ Main . ResourceManager . GetString ( "UITheme.Luna.Metallic" ) + " (Luna.Metallic)" ,
20+ Main . ResourceManager . GetString ( "UITheme.Royale.NormalColor" ) + " (Royale.NormalColor)" ,
21+ Main . ResourceManager . GetString ( "UITheme.Classic" ) + " (Classic)" ,
22+ ] ;
1323 MaxWidth = Defaults . WidthPercent * SystemParameters . PrimaryScreenWidth ;
1424 BackgroundBox . Text = App . Settings . Content . Background ;
25+ UIThemeBox . ItemsSource = UIThemeSource ;
1526 UIThemeBox . SelectedIndex = App . Settings . Content . UITheme ;
1627 UIFlatBox . IsChecked = App . Settings . Content . UIFlat ;
1728 }
@@ -42,13 +53,4 @@ private void SelectImageClick(object o, RoutedEventArgs e)
4253 if ( Utils . TrySelectFile ( out string fileName , ".jpg" ) )
4354 BackgroundBox . Text = fileName ;
4455 }
45-
46- private void UIThemeBoxSelectionChanged ( object o , SelectionChangedEventArgs e )
47- {
48- if ( UIThemeText is null || UIThemeBox is null ) return ;
49- UIThemeText . Content = Main . ResourceManager . GetString ( $ "UITheme.{ UIThemeBox . SelectedValue } ") ;
50- }
51-
52- private void WindowLoaded ( object o , RoutedEventArgs e )
53- => UIThemeBoxSelectionChanged ( null , null ) ;
5456}
0 commit comments