Ruben 4 лет назад
Родитель
Сommit
8c43f7ae34

+ 4 - 0
PicView/ConfigureSettings/ConfigColors.cs

@@ -56,6 +56,8 @@ namespace PicView.ConfigureSettings
 #endif
                 }
             }
+
+            Properties.Settings.Default.Save();
         }
 
         internal static void SetColors()
@@ -127,6 +129,8 @@ namespace PicView.ConfigureSettings
             }
 
             ConfigureWindows.GetMainWindow.MainImageBorder.Background = BackgroundColorBrush;
+
+            Properties.Settings.Default.Save();
         }
 
         internal static Brush BackgroundColorBrush => Properties.Settings.Default.BgColorChoice switch

+ 3 - 1
PicView/Translations/LoadLanguage.cs

@@ -51,7 +51,7 @@ namespace PicView.Translations
                 case "it":
                     source = new Uri(@"/PicView;component/Translations/it.xaml", UriKind.Relative);
                     break;
-                    
+
                 default:
                 case "en":
                     source = new Uri(@"/PicView;component/Translations/en.xaml", UriKind.Relative);
@@ -77,6 +77,8 @@ namespace PicView.Translations
         {
             var choice = (Languages)language;
             Properties.Settings.Default.UserLanguage = choice.ToString();
+
+            Properties.Settings.Default.Save();
         }
     }
 }

+ 5 - 0
PicView/Views/Windows/SettingsWindow.xaml.cs

@@ -32,6 +32,7 @@ namespace PicView.Views.Windows
                 MaxHeight = WindowSizing.MonitorInfo.WorkArea.Height;
                 Width *= WindowSizing.MonitorInfo.DpiScaling;
             }
+
             InitializeComponent();
 
             ContentRendered += delegate
@@ -80,6 +81,8 @@ namespace PicView.Views.Windows
                         SetTitle.SetTitleString(preloadValue.bitmapSource.PixelWidth, preloadValue.bitmapSource.PixelHeight,
                             Navigation.FolderIndex, preloadValue.fileInfo);
                     });
+
+                    Properties.Settings.Default.Save();
                 };
 
                 // BorderColorRadio
@@ -114,11 +117,13 @@ namespace PicView.Views.Windows
                 {
                     ChangeToDarkTheme();
                     LightThemeRadio.IsChecked = false;
+                    Properties.Settings.Default.Save();
                 };
                 LightThemeRadio.Click += delegate
                 {
                     ChangeToLightTheme();
                     DarkThemeRadio.IsChecked = false;
+                    Properties.Settings.Default.Save();
                 };
 
                 foreach (var language in Enum.GetValues(typeof(Languages)))