From 2e1cc7ee3cc0b788fa27c8fba0a3e832ec22dd72 Mon Sep 17 00:00:00 2001 From: BookerLiu Date: Fri, 21 Apr 2023 21:56:49 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BC=98=E5=8C=96UI,=20=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E5=85=AC=E5=85=B1=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control/UserControls/Config/AboutControl.xaml | 4 +-- .../UserControls/Config/MotionControl.xaml | 34 ++++++++++++------- Control/UserControls/Config/OtherControl.xaml | 28 +++++++-------- Control/UserControls/Config/ThemeControl.xaml | 8 ++--- Control/Windows/ToDoInfoWindow.xaml | 8 ++--- MainWindow.xaml | 1 - MainWindow.xaml.cs | 17 +++++++--- Resource/Dictionary/CommonStyle.xaml | 29 ++++++++++++++++ 8 files changed, 87 insertions(+), 42 deletions(-) diff --git a/Control/UserControls/Config/AboutControl.xaml b/Control/UserControls/Config/AboutControl.xaml index 023b279..4bfd041 100644 --- a/Control/UserControls/Config/AboutControl.xaml +++ b/Control/UserControls/Config/AboutControl.xaml @@ -80,10 +80,10 @@ diff --git a/Control/UserControls/Config/MotionControl.xaml b/Control/UserControls/Config/MotionControl.xaml index fca7ecc..78d5e80 100644 --- a/Control/UserControls/Config/MotionControl.xaml +++ b/Control/UserControls/Config/MotionControl.xaml @@ -63,27 +63,35 @@ - - - - + - - + + diff --git a/Control/UserControls/Config/OtherControl.xaml b/Control/UserControls/Config/OtherControl.xaml index c0e530a..91b630c 100644 --- a/Control/UserControls/Config/OtherControl.xaml +++ b/Control/UserControls/Config/OtherControl.xaml @@ -54,37 +54,37 @@ - - - - - @@ -92,14 +92,14 @@ - - diff --git a/Control/UserControls/Config/ThemeControl.xaml b/Control/UserControls/Config/ThemeControl.xaml index 256524c..2ac84e5 100644 --- a/Control/UserControls/Config/ThemeControl.xaml +++ b/Control/UserControls/Config/ThemeControl.xaml @@ -24,11 +24,11 @@ - - diff --git a/Control/Windows/ToDoInfoWindow.xaml b/Control/Windows/ToDoInfoWindow.xaml index e288b38..0d3b865 100644 --- a/Control/Windows/ToDoInfoWindow.xaml +++ b/Control/Windows/ToDoInfoWindow.xaml @@ -60,11 +60,11 @@ - - diff --git a/MainWindow.xaml b/MainWindow.xaml index 1407230..76ee9ab 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -34,7 +34,6 @@ - diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index d0849fc..ce41250 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -813,6 +813,10 @@ namespace GeekDesk appData.AppConfig.WindowWidth = this.Width; appData.AppConfig.WindowHeight = this.Height; } + if (guideRun) + { + Guide(); + } } @@ -1032,27 +1036,30 @@ namespace GeekDesk return hwnd; } - - #region 新手引导 + + private int guideIndex = 0; + private bool guideRun = false; private void Guide() { try { + guideRun = true; //防止影响主程序进程 if (CheckShouldShowApp()) { ShowApp(); } GrayBorder.Visibility = Visibility.Visible; - GuideSwitch(0); + GuideSwitch(guideIndex); GuideCard.Visibility = Visibility.Visible; } - catch (Exception) { } + catch (Exception) { guideRun = false; } } private void GuideSwitch(int index) { + guideIndex = index; GuideNum.Text = Convert.ToString(index + 1); GuideTitle1.Text = GuideInfoList.mainWindowGuideList[index].Title1; GuideTitle2.Text = GuideInfoList.mainWindowGuideList[index].Title2; @@ -1131,6 +1138,8 @@ namespace GeekDesk if ("完成".Equals(NextGuideBtn.Content.ToString())) { GrayBorder.Visibility = Visibility.Collapsed; GuideCard.Visibility = Visibility.Collapsed; + guideIndex = 0; + guideRun = false; return; } int index = Convert.ToInt32(GuideNum.Text.ToString()) - 1; diff --git a/Resource/Dictionary/CommonStyle.xaml b/Resource/Dictionary/CommonStyle.xaml index 5c38195..1ad6d47 100644 --- a/Resource/Dictionary/CommonStyle.xaml +++ b/Resource/Dictionary/CommonStyle.xaml @@ -72,6 +72,15 @@ + + + + + + + + + @@ -91,4 +100,24 @@ + + + + + \ No newline at end of file