diff --git a/KoAR.SaveEditor/App.config b/KoAR.SaveEditor/App.config index 10788bdc..207ce38b 100644 --- a/KoAR.SaveEditor/App.config +++ b/KoAR.SaveEditor/App.config @@ -22,6 +22,9 @@ False + + False + diff --git a/KoAR.SaveEditor/App.xaml.cs b/KoAR.SaveEditor/App.xaml.cs index 65e837c1..ae34c6d7 100644 --- a/KoAR.SaveEditor/App.xaml.cs +++ b/KoAR.SaveEditor/App.xaml.cs @@ -1,5 +1,7 @@ using System; using System.Reflection; +using System.Windows; +using KoAR.SaveEditor.Properties; using Microsoft.Windows.Themes; namespace KoAR.SaveEditor @@ -9,5 +11,16 @@ partial class App static App() => Type.GetTypeCode(typeof(PlatformCulture)); // Needed to enforce loading of PresentationFramework.Aero.dll before initializing App. public static Version Version { get; } = new Version(Assembly.GetExecutingAssembly().GetCustomAttribute().InformationalVersion); + + protected override void OnStartup(StartupEventArgs e) + { + if (!Settings.Default.Upgraded) + { + Settings.Default.Upgrade(); + Settings.Default.Upgraded = true; + Settings.Default.Save(); + } + base.OnStartup(e); + } } } diff --git a/KoAR.SaveEditor/Properties/Settings.Designer.cs b/KoAR.SaveEditor/Properties/Settings.Designer.cs index ffad5cff..652eeaeb 100644 --- a/KoAR.SaveEditor/Properties/Settings.Designer.cs +++ b/KoAR.SaveEditor/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace KoAR.SaveEditor.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -76,5 +76,17 @@ public bool Acknowledged3x { this["Acknowledged3x"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool Upgraded { + get { + return ((bool)(this["Upgraded"])); + } + set { + this["Upgraded"] = value; + } + } } } diff --git a/KoAR.SaveEditor/Properties/Settings.settings b/KoAR.SaveEditor/Properties/Settings.settings index ebf3f6b2..34435c26 100644 --- a/KoAR.SaveEditor/Properties/Settings.settings +++ b/KoAR.SaveEditor/Properties/Settings.settings @@ -17,5 +17,8 @@ False + + False + \ No newline at end of file