From 536a498e6505c10e2d1e9a478cccd6c00700d753 Mon Sep 17 00:00:00 2001 From: Space Time Date: Tue, 17 Dec 2024 12:05:04 +0800 Subject: [PATCH] =?UTF-8?q?1.1.4=20(beta)=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.xaml.cs | 9 +++++++++ Props/Settings.Designer.cs | 36 ++++++++++++++++++++++++------------ Props/Settings.settings | 9 ++++++--- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/App.xaml.cs b/App.xaml.cs index cd85398..c1f7130 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -15,6 +15,15 @@ public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { + #region Upgrade Settings + if (Settings.Default.IsUpgradeRequired) + { + Settings.Default.Upgrade(); + Settings.Default.IsUpgradeRequired = false; + Settings.Default.Save(); + } + #endregion Upgrade Settings + #region Primary Color PaletteHelper paletteHelper = new(); Theme newTheme = paletteHelper.GetTheme(); diff --git a/Props/Settings.Designer.cs b/Props/Settings.Designer.cs index f3c853a..7a03387 100644 --- a/Props/Settings.Designer.cs +++ b/Props/Settings.Designer.cs @@ -59,6 +59,18 @@ namespace Sheas_Cealer.Props { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("244, 67, 54")] + public global::System.Drawing.Color PrimaryColor { + get { + return ((global::System.Drawing.Color)(this["PrimaryColor"])); + } + set { + this["PrimaryColor"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("-1")] @@ -83,18 +95,6 @@ namespace Sheas_Cealer.Props { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("244, 67, 54")] - public global::System.Drawing.Color PrimaryColor { - get { - return ((global::System.Drawing.Color)(this["PrimaryColor"])); - } - set { - this["PrimaryColor"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("-1")] @@ -106,5 +106,17 @@ namespace Sheas_Cealer.Props { this["IsLightWeight"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool IsUpgradeRequired { + get { + return ((bool)(this["IsUpgradeRequired"])); + } + set { + this["IsUpgradeRequired"] = value; + } + } } } diff --git a/Props/Settings.settings b/Props/Settings.settings index 7c24856..8c55cc3 100644 --- a/Props/Settings.settings +++ b/Props/Settings.settings @@ -11,17 +11,20 @@ + + 244, 67, 54 + -1 -1 - - 244, 67, 54 - -1 + + True + \ No newline at end of file