From e5081f67a46dc681b0e8041380c1caf5254759f7 Mon Sep 17 00:00:00 2001 From: Dynesshely Date: Fri, 12 Aug 2022 21:00:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=87=20Style:=20Clean=20using?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Dashboard/Helper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KitX Dashboard/Helper.cs b/KitX Dashboard/Helper.cs index 7958af9f..0da167ea 100644 --- a/KitX Dashboard/Helper.cs +++ b/KitX Dashboard/Helper.cs @@ -104,6 +104,7 @@ public static void SaveConfig() new Thread(() => { + BasicHelper.IO.FileHelper.WriteIn(ConfigFilePath, JsonSerializer.Serialize(Program.GlobalConfig, options)); }).Start(); @@ -196,7 +197,7 @@ public static void InitEnvironment() { #region 检查 Catrol.Algorithm 库环境并安装环境 if (!Algorithm.Interop.Environment.CheckEnvironment()) - new System.Threading.Thread(() => + new Thread(() => { Algorithm.Interop.Environment.InstallEnvironment(); }).Start(); From 2ff9d98e58af7af76e919ce1b1fc15b66f985c73 Mon Sep 17 00:00:00 2001 From: Dynesshely Date: Fri, 12 Aug 2022 21:00:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=A7=20Fix(Dashboard):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BA=86=E8=B0=83=E8=89=B2=E6=9D=BF=E6=8B=96=E5=8A=A8?= =?UTF-8?q?=E6=BB=91=E5=9D=97=E9=80=A0=E6=88=90=E7=9A=84=E6=84=8F=E5=A4=96?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/Pages/Controls/Settings_GeneralViewModel.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/KitX Dashboard/ViewModels/Pages/Controls/Settings_GeneralViewModel.cs b/KitX Dashboard/ViewModels/Pages/Controls/Settings_GeneralViewModel.cs index 39441251..5c386f72 100644 --- a/KitX Dashboard/ViewModels/Pages/Controls/Settings_GeneralViewModel.cs +++ b/KitX Dashboard/ViewModels/Pages/Controls/Settings_GeneralViewModel.cs @@ -86,11 +86,7 @@ private void InitCommands() internal Color2 ThemeColor { get => new((Application.Current.Resources["ThemePrimaryAccent"] as SolidColorBrush).Color); - set - { - nowColor = value; - SaveChanges(); - } + set => nowColor = value; } /// @@ -303,6 +299,7 @@ private void ColorConfirmed(object _) var c = nowColor; Application.Current.Resources["ThemePrimaryAccent"] = new SolidColorBrush(new Color(c.A, c.R, c.G, c.B)); + SaveChanges(); } private void MicaOpacityConfirmed(object _) => SaveChanges();