diff --git a/WeeXnes/Core/Global.cs b/WeeXnes/Core/Global.cs index 273648c..7cc9124 100644 --- a/WeeXnes/Core/Global.cs +++ b/WeeXnes/Core/Global.cs @@ -18,6 +18,7 @@ namespace WeeXnes.Core public static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "WeeXnes"); public static UpdateVar AppDataPathRPC = new UpdateVar(); public static UpdateVar AppDataPathKEY = new UpdateVar(); + public static UpdateVar checkUpdateOnStartup = new UpdateVar(); public static string SettingsFile = "settings.ini"; public class Defaults { diff --git a/WeeXnes/Core/SaveSettingsHandler.cs b/WeeXnes/Core/SaveSettingsHandler.cs index e97ed47..e9f4669 100644 --- a/WeeXnes/Core/SaveSettingsHandler.cs +++ b/WeeXnes/Core/SaveSettingsHandler.cs @@ -18,6 +18,7 @@ namespace WeeXnes.Core public const string Section = "GENERAL"; public const string RpcFilesPath = "RpcFilesPath"; public const string KeyFilesPath = "KeyFilesPath"; + public const string StartupUpdateCheck = "StartupUpdateCheck"; } public static class KeyManager { @@ -87,6 +88,14 @@ namespace WeeXnes.Core Global.AppDataPathKEY.Value ); }; + Global.checkUpdateOnStartup.ValueChanged += () => + { + SettingsView.Data.settingsFile.SetValue( + Data.General.Section, + Data.General.StartupUpdateCheck, + Global.checkUpdateOnStartup.Value.ToString() + ); + }; } } } \ No newline at end of file diff --git a/WeeXnes/Views/Settings/SettingsView.xaml b/WeeXnes/Views/Settings/SettingsView.xaml index b1f8271..57b226e 100644 --- a/WeeXnes/Views/Settings/SettingsView.xaml +++ b/WeeXnes/Views/Settings/SettingsView.xaml @@ -114,6 +114,11 @@