From ed2d12946e76945c5b5fd541ece85c3b1b5c4a1e Mon Sep 17 00:00:00 2001 From: yt3trees Date: Sun, 19 Nov 2023 11:23:51 +0900 Subject: [PATCH] Functionality modified to carry over settings from previous version --- msbuild-gui/MainWindow.xaml.cs | 6 ++++++ msbuild-gui/Properties/Settings.Designer.cs | 13 ++++++++++++- msbuild-gui/Properties/Settings.settings | 12 +++++++----- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/msbuild-gui/MainWindow.xaml.cs b/msbuild-gui/MainWindow.xaml.cs index 6b5bf6a..0866c5b 100644 --- a/msbuild-gui/MainWindow.xaml.cs +++ b/msbuild-gui/MainWindow.xaml.cs @@ -105,6 +105,12 @@ public class List public MainWindow() { InitializeComponent(); + if (Properties.Settings.Default.UpgradeRequired) + { + Properties.Settings.Default.Upgrade(); + Properties.Settings.Default.UpgradeRequired = false; + Properties.Settings.Default.Save(); + } ProgressBar.Visibility = Visibility.Hidden; ToastNotificationManagerCompat.OnActivated += this.ToastNotificationManagerCompat_OnActivated; } diff --git a/msbuild-gui/Properties/Settings.Designer.cs b/msbuild-gui/Properties/Settings.Designer.cs index ab385a3..df2fa50 100644 --- a/msbuild-gui/Properties/Settings.Designer.cs +++ b/msbuild-gui/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace msbuild_gui.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -22,5 +22,16 @@ public static Settings Default { return defaultInstance; } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool UpgradeRequired { + get { + return ((bool)(this["UpgradeRequired"])); + } + set { + this["UpgradeRequired"] = value; + } + } } } diff --git a/msbuild-gui/Properties/Settings.settings b/msbuild-gui/Properties/Settings.settings index 049245f..237aa10 100644 --- a/msbuild-gui/Properties/Settings.settings +++ b/msbuild-gui/Properties/Settings.settings @@ -1,6 +1,8 @@  - - - - - + + + + True + + + \ No newline at end of file