From 5cced9baf2e14131a7e57e014447b69fa9db230d Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sun, 5 Oct 2025 21:13:37 +0800 Subject: [PATCH 01/85] =?UTF-8?q?fix:=E5=9B=BE=E6=A0=87=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow_cs/MW_Settings.cs | 4 ++-- Ink Canvas/Windows/CustomIconWindow.xaml.cs | 4 ++-- ...vasForClass.csproj.AssemblyReference.cache | Bin 38044 -> 38181 bytes 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ink Canvas/MainWindow_cs/MW_Settings.cs b/Ink Canvas/MainWindow_cs/MW_Settings.cs index aafe6dd1..c87378d8 100644 --- a/Ink Canvas/MainWindow_cs/MW_Settings.cs +++ b/Ink Canvas/MainWindow_cs/MW_Settings.cs @@ -433,8 +433,8 @@ namespace Ink_Canvas public void UpdateCustomIconsInComboBox() { - // 保留前11个内置图标选项 - while (ComboBoxFloatingBarImg.Items.Count > 11) + // 保留前12个内置图标选项 + while (ComboBoxFloatingBarImg.Items.Count > 12) { ComboBoxFloatingBarImg.Items.RemoveAt(ComboBoxFloatingBarImg.Items.Count - 1); } diff --git a/Ink Canvas/Windows/CustomIconWindow.xaml.cs b/Ink Canvas/Windows/CustomIconWindow.xaml.cs index fb89d189..5fff7008 100644 --- a/Ink Canvas/Windows/CustomIconWindow.xaml.cs +++ b/Ink Canvas/Windows/CustomIconWindow.xaml.cs @@ -37,8 +37,8 @@ namespace Ink_Canvas } // 如果当前选中的是被删除的图标,重置为默认图标 - if (MainWindow.Settings.Appearance.FloatingBarImg >= 8 && - MainWindow.Settings.Appearance.FloatingBarImg - 8 >= MainWindow.Settings.Appearance.CustomFloatingBarImgs.Count) + if (MainWindow.Settings.Appearance.FloatingBarImg >= 12 && + MainWindow.Settings.Appearance.FloatingBarImg - 12 >= MainWindow.Settings.Appearance.CustomFloatingBarImgs.Count) { MainWindow.Settings.Appearance.FloatingBarImg = 0; mainWindow.ComboBoxFloatingBarImg.SelectedIndex = 0; diff --git a/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache b/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache index c8c2dfbd497b829755ee6211820ad2e2d43c9d13..57d842b8b7d92d5308ee26301638a87ff9085d80 100644 GIT binary patch delta 70 zcmbQUl4B~nPN5rP?War*kO`k`FUd8TkDE=&SuZ6ghmjGefZ>7T XjqeIqIY4T;%1rbO^o$LR4J{b}mk1Gb delta 23 fcmZ3wifPVDCJr`6Lk0#0#>B~nPN5rP?WX_$OSlGi From c651df0f6eb86906f11c7446aef9cfe5e8828564 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:27:56 +0800 Subject: [PATCH 02/85] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a10bd6da..58f72982 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,4 @@ GPLv3 ## 项目引用 [Alan-CRL/DesktopDrawpadBlocker](https://github.com/Alan-CRL/DesktopDrawpadBlocker) +[Awesome-Iwb/Awesome-Iwb](https://github.com/awesome-iwb/awesome-iwb/wiki/iwbicons-gallery)「本项目部分图标来自 Awesome Iwb 的 IwbIcons 图标库,由 Douxiba 制作。」 From 228584ee487aa26574abcb4d7e36d83739f338df Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:31:30 +0800 Subject: [PATCH 03/85] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58f72982..71ab7b17 100644 --- a/README.md +++ b/README.md @@ -114,4 +114,4 @@ GPLv3 ## 项目引用 [Alan-CRL/DesktopDrawpadBlocker](https://github.com/Alan-CRL/DesktopDrawpadBlocker) -[Awesome-Iwb/Awesome-Iwb](https://github.com/awesome-iwb/awesome-iwb/wiki/iwbicons-gallery)「本项目部分图标来自 Awesome Iwb 的 IwbIcons 图标库,由 Douxiba 制作。」 +[Awesome-Iwb/iwbicons-gallery](https://github.com/awesome-iwb/awesome-iwb/wiki/iwbicons-gallery)「本项目部分图标来自 Awesome Iwb 的 IwbIcons 图标库,由 Douxiba 制作。」 From 1fd95a2f2e1977b7a32b2be2b1b5ccaffafe67e2 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sun, 5 Oct 2025 23:09:05 +0800 Subject: [PATCH 04/85] =?UTF-8?q?add:=E6=89=8B=E5=8A=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Helpers/Converters.cs | 23 ++++ Ink Canvas/MainWindow.xaml | 8 ++ Ink Canvas/MainWindow_cs/MW_Settings.cs | 143 ++++++++++++++++++++++++ 3 files changed, 174 insertions(+) diff --git a/Ink Canvas/Helpers/Converters.cs b/Ink Canvas/Helpers/Converters.cs index ac5f7612..31feedb0 100644 --- a/Ink Canvas/Helpers/Converters.cs +++ b/Ink Canvas/Helpers/Converters.cs @@ -112,4 +112,27 @@ namespace Ink_Canvas.Converter } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } + + public class InverseBooleanToVisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if ((bool)value) + { + return Visibility.Collapsed; + } + + return Visibility.Visible; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + if ((bool)value) + { + return Visibility.Collapsed; + } + + return Visibility.Visible; + } + } } diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index d7958e35..b322da5d 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -40,6 +40,7 @@ + @@ -631,6 +632,13 @@ + + - + @@ -86,7 +86,7 @@ - + - + @@ -127,7 +127,7 @@ - + - + @@ -160,7 +160,7 @@ - + - + @@ -201,7 +201,7 @@ - + - + @@ -234,7 +234,7 @@ - + - + From b28fa887a23a93b7c8bd02fe0efd7dcab1cac176 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 13:31:54 +0800 Subject: [PATCH 09/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/SeewoStyleTimerWindow.xaml.cs | 80 +++++++++++++++---- 1 file changed, 64 insertions(+), 16 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index e719f753..140c438f 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -207,16 +207,28 @@ namespace Ink_Canvas private void Digit3Plus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - minute += 10; - if (minute >= 60) minute = 0; + int currentMinute = minute; + int minuteTens = currentMinute / 10; + int minuteOnes = currentMinute % 10; + + minuteTens++; + if (minuteTens >= 6) minuteTens = 0; + + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } private void Digit3Minus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - minute -= 10; - if (minute < 0) minute = 50; + int currentMinute = minute; + int minuteTens = currentMinute / 10; + int minuteOnes = currentMinute % 10; + + minuteTens--; + if (minuteTens < 0) minuteTens = 5; + + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } @@ -224,16 +236,28 @@ namespace Ink_Canvas private void Digit4Plus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - minute++; - if (minute >= 60) minute = 0; + int currentMinute = minute; + int minuteTens = currentMinute / 10; + int minuteOnes = currentMinute % 10; + + minuteOnes++; + if (minuteOnes >= 10) minuteOnes = 0; + + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } private void Digit4Minus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - minute--; - if (minute < 0) minute = 59; + int currentMinute = minute; + int minuteTens = currentMinute / 10; + int minuteOnes = currentMinute % 10; + + minuteOnes--; + if (minuteOnes < 0) minuteOnes = 9; + + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } @@ -241,16 +265,28 @@ namespace Ink_Canvas private void Digit5Plus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - second += 10; - if (second >= 60) second = 0; + int currentSecond = second; + int secondTens = currentSecond / 10; + int secondOnes = currentSecond % 10; + + secondTens++; + if (secondTens >= 6) secondTens = 0; + + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } private void Digit5Minus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - second -= 10; - if (second < 0) second = 50; + int currentSecond = second; + int secondTens = currentSecond / 10; + int secondOnes = currentSecond % 10; + + secondTens--; + if (secondTens < 0) secondTens = 5; + + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } @@ -258,16 +294,28 @@ namespace Ink_Canvas private void Digit6Plus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - second++; - if (second >= 60) second = 0; + int currentSecond = second; + int secondTens = currentSecond / 10; + int secondOnes = currentSecond % 10; + + secondOnes++; + if (secondOnes >= 10) secondOnes = 0; + + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } private void Digit6Minus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - second--; - if (second < 0) second = 59; + int currentSecond = second; + int secondTens = currentSecond / 10; + int secondOnes = currentSecond % 10; + + secondOnes--; + if (secondOnes < 0) secondOnes = 9; + + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } From e25f56a9b563663e3aa5eb53326112646809264d Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 13:34:52 +0800 Subject: [PATCH 10/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 140c438f..7d9a0ef2 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -44,8 +44,13 @@ namespace Ink_Canvas Application.Current.Dispatcher.Invoke(() => { - Digit1Display.Text = (leftTimeSpan.Hours / 10).ToString(); - Digit2Display.Text = (leftTimeSpan.Hours % 10).ToString(); + int totalHours = (int)leftTimeSpan.TotalHours; + int displayHours = totalHours; + + if (displayHours > 99) displayHours = 99; + + Digit1Display.Text = (displayHours / 10).ToString(); + Digit2Display.Text = (displayHours % 10).ToString(); Digit3Display.Text = (leftTimeSpan.Minutes / 10).ToString(); Digit4Display.Text = (leftTimeSpan.Minutes % 10).ToString(); Digit5Display.Text = (leftTimeSpan.Seconds / 10).ToString(); From 402ecc66ae48d91c498f3bff3579fa02bd012e4d Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 13:38:12 +0800 Subject: [PATCH 11/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/SeewoStyleTimerWindow.xaml.cs | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 7d9a0ef2..23aba099 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -246,7 +246,12 @@ namespace Ink_Canvas int minuteOnes = currentMinute % 10; minuteOnes++; - if (minuteOnes >= 10) minuteOnes = 0; + if (minuteOnes >= 10) + { + minuteOnes = 0; + minuteTens++; + if (minuteTens >= 6) minuteTens = 0; + } minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); @@ -260,7 +265,12 @@ namespace Ink_Canvas int minuteOnes = currentMinute % 10; minuteOnes--; - if (minuteOnes < 0) minuteOnes = 9; + if (minuteOnes < 0) + { + minuteOnes = 9; + minuteTens--; + if (minuteTens < 0) minuteTens = 5; + } minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); @@ -304,7 +314,12 @@ namespace Ink_Canvas int secondOnes = currentSecond % 10; secondOnes++; - if (secondOnes >= 10) secondOnes = 0; + if (secondOnes >= 10) + { + secondOnes = 0; + secondTens++; + if (secondTens >= 6) secondTens = 0; + } second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); @@ -318,7 +333,12 @@ namespace Ink_Canvas int secondOnes = currentSecond % 10; secondOnes--; - if (secondOnes < 0) secondOnes = 9; + if (secondOnes < 0) + { + secondOnes = 9; + secondTens--; + if (secondTens < 0) secondTens = 5; + } second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); From 2c3b921f09c91ad8eeb8ae47011f6b8af154c4aa Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 13:39:31 +0800 Subject: [PATCH 12/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/SeewoStyleTimerWindow.xaml.cs | 50 ++++++++++++++++--- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 23aba099..c5a97aa6 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -178,16 +178,28 @@ namespace Ink_Canvas private void Digit1Plus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - hour += 10; - if (hour >= 100) hour = 0; + int currentHour = hour; + int hourTens = currentHour / 10; + int hourOnes = currentHour % 10; + + hourTens++; + if (hourTens >= 10) hourTens = 0; + + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } private void Digit1Minus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - hour -= 10; - if (hour < 0) hour = 90; + int currentHour = hour; + int hourTens = currentHour / 10; + int hourOnes = currentHour % 10; + + hourTens--; + if (hourTens < 0) hourTens = 9; + + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } @@ -195,16 +207,38 @@ namespace Ink_Canvas private void Digit2Plus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - hour++; - if (hour >= 100) hour = 0; + int currentHour = hour; + int hourTens = currentHour / 10; + int hourOnes = currentHour % 10; + + hourOnes++; + if (hourOnes >= 10) + { + hourOnes = 0; + hourTens++; + if (hourTens >= 10) hourTens = 0; + } + + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } private void Digit2Minus_Click(object sender, RoutedEventArgs e) { if (isTimerRunning) return; - hour--; - if (hour < 0) hour = 99; + int currentHour = hour; + int hourTens = currentHour / 10; + int hourOnes = currentHour % 10; + + hourOnes--; + if (hourOnes < 0) + { + hourOnes = 9; + hourTens--; + if (hourTens < 0) hourTens = 9; + } + + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } From 3c06ef0b1a6ef4741ada8d8925301d91ade72800 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 14:11:32 +0800 Subject: [PATCH 13/85] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow.xaml.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index 02e19d44..d93d3d7e 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -787,7 +787,7 @@ namespace Ink_Canvas } } - // 辅助方法:使用多线路组下载更新 + // 使用多线路组下载更新 private async Task DownloadUpdateWithFallback(string version, AutoUpdateHelper.UpdateLineGroup primaryGroup, UpdateChannel channel) { try @@ -1194,14 +1194,14 @@ namespace Ink_Canvas RefreshDeviceInfo(); } - // 新增:个性化设置 + // 个性化设置 private void NavTheme_Click(object sender, RoutedEventArgs e) { // 切换到个性化设置页面 ShowSettingsSection("theme"); } - // 新增:快捷键设置 + // 快捷键设置 private void NavShortcuts_Click(object sender, RoutedEventArgs e) { OpenHotkeySettingsWindow(); @@ -1298,7 +1298,7 @@ namespace Ink_Canvas } } - // 新增:折叠侧边栏 + // 折叠侧边栏 private void CollapseNavSidebar_Click(object sender, RoutedEventArgs e) { // 折叠/展开侧边栏 @@ -1315,7 +1315,7 @@ namespace Ink_Canvas } } - // 新增:显示侧边栏 + // 显示侧边栏 private void ShowNavSidebar_Click(object sender, RoutedEventArgs e) { // 确保侧边栏展开 @@ -1323,7 +1323,7 @@ namespace Ink_Canvas columnDefinitions[0].Width = new GridLength(50); } - // 辅助方法:显示指定的设置部分 + // 显示指定的设置部分 private async void ShowSettingsSection(string sectionTag) { // 显示设置面板 From cf800cbd36860b8c16776f28a383cf279a91288a Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 14:19:24 +0800 Subject: [PATCH 14/85] =?UTF-8?q?improve:=E8=87=AA=E5=8A=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow.xaml.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index d93d3d7e..73a09138 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -832,6 +832,8 @@ namespace Ink_Canvas // 声明下载状态变量,用于整个方法 bool isDownloadSuccessful = false; + bool hasValidLineGroup = lineGroup != null; + if (AvailableLatestVersion != null) { // 检测到新版本,停止重试定时器 @@ -1001,6 +1003,14 @@ namespace Ink_Canvas break; } } + else if (hasValidLineGroup) + { + LogHelper.WriteLogToFile("AutoUpdate | Current version is already the latest, no retry needed"); + + // 停止重试定时器 + timerCheckAutoUpdateRetry.Stop(); + updateCheckRetryCount = 0; + } else { // 检查更新失败,启动重试定时器 From a31ad5803c9541fee1b0d4ebe41d46fb34b2d4dd Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 14:28:53 +0800 Subject: [PATCH 15/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 128 ++++++++++++++++-- .../Windows/SeewoStyleTimerWindow.xaml.cs | 105 ++++++++++++++ 2 files changed, 218 insertions(+), 15 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 602457fd..3bcbbb55 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -8,7 +8,7 @@ Topmost="True" Background="Transparent" mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True" Loaded="Window_Loaded" Closing="Window_Closing" WindowStartupLocation="CenterScreen" - Title="Ink Canvas 画板 - 计时器" Height="400" Width="600"> + Title="Ink Canvas 画板 - 计时器" Height="450" Width="900"> @@ -16,7 +16,7 @@ - + - - - - + + + + + + - + - + + + + + + + + + + + + + + + + + + + + diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index c5a97aa6..32aa1ce4 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -68,6 +68,9 @@ namespace Ink_Canvas isTimerRunning = false; StartPauseIcon.Data = Geometry.Parse(PlayIconData); PlayTimerSound(); + + // 保存最近计时记录 + SaveRecentTimer(); } }); } @@ -86,10 +89,15 @@ namespace Ink_Canvas bool isPaused = false; Timer timer = new Timer(); + + // 最近计时记录 + private string recentTimer1 = "--:--"; + private string recentTimer2 = "--:--"; private void InitializeUI() { UpdateDigitDisplays(); + UpdateRecentTimerDisplays(); } private void ApplyTheme() @@ -537,5 +545,102 @@ namespace Ink_Canvas if (e.LeftButton == MouseButtonState.Pressed) DragMove(); } + + // 快捷选项事件处理 + private void Quick5Min_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning) return; + SetQuickTime(0, 5, 0); + } + + private void Quick10Min_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning) return; + SetQuickTime(0, 10, 0); + } + + private void Quick15Min_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning) return; + SetQuickTime(0, 15, 0); + } + + private void Quick20Min_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning) return; + SetQuickTime(0, 20, 0); + } + + private void RecentTimer1_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning || recentTimer1 == "--:--") return; + ApplyRecentTimer(recentTimer1); + } + + private void RecentTimer2_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning || recentTimer2 == "--:--") return; + ApplyRecentTimer(recentTimer2); + } + + // 设置快捷时间 + private void SetQuickTime(int h, int m, int s) + { + hour = h; + minute = m; + second = s; + UpdateDigitDisplays(); + } + + // 应用最近计时 + private void ApplyRecentTimer(string timeString) + { + if (timeString == "--:--") return; + + try + { + var parts = timeString.Split(':'); + if (parts.Length == 2) + { + int minutes = int.Parse(parts[0]); + int seconds = int.Parse(parts[1]); + SetQuickTime(0, minutes, seconds); + } + } + catch + { + // 如果解析失败,忽略 + } + } + + // 保存最近计时记录 + private void SaveRecentTimer() + { + if (hour == 0 && minute == 0 && second == 0) return; + + string currentTime = $"{minute:D2}:{second:D2}"; + + // 如果当前时间与最近记录不同,则更新 + if (currentTime != recentTimer1) + { + recentTimer2 = recentTimer1; + recentTimer1 = currentTime; + UpdateRecentTimerDisplays(); + } + } + + // 更新最近计时显示 + private void UpdateRecentTimerDisplays() + { + try + { + RecentTimer1Text.Text = recentTimer1; + RecentTimer2Text.Text = recentTimer2; + } + catch + { + // 如果UI元素还未初始化,忽略错误 + } + } } } From c72839cdcb3fe6253ad5e650f81003ec1c6fa3b0 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 14:31:04 +0800 Subject: [PATCH 16/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/SeewoStyleTimerWindow.xaml.cs | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 32aa1ce4..6709b1b3 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -68,9 +68,6 @@ namespace Ink_Canvas isTimerRunning = false; StartPauseIcon.Data = Geometry.Parse(PlayIconData); PlayTimerSound(); - - // 保存最近计时记录 - SaveRecentTimer(); } }); } @@ -93,6 +90,10 @@ namespace Ink_Canvas // 最近计时记录 private string recentTimer1 = "--:--"; private string recentTimer2 = "--:--"; + + // 最近计时记录的注册表键名 + private const string RecentTimer1Key = "SeewoTimer_RecentTimer1"; + private const string RecentTimer2Key = "SeewoTimer_RecentTimer2"; private void InitializeUI() { @@ -422,6 +423,9 @@ namespace Ink_Canvas isPaused = false; isTimerRunning = true; timer.Start(); + + // 保存到最近计时记录 + SaveRecentTimer(); } } @@ -549,37 +553,37 @@ namespace Ink_Canvas // 快捷选项事件处理 private void Quick5Min_Click(object sender, RoutedEventArgs e) { - if (isTimerRunning) return; + if (isTimerRunning && !isPaused) return; SetQuickTime(0, 5, 0); } private void Quick10Min_Click(object sender, RoutedEventArgs e) { - if (isTimerRunning) return; + if (isTimerRunning && !isPaused) return; SetQuickTime(0, 10, 0); } private void Quick15Min_Click(object sender, RoutedEventArgs e) { - if (isTimerRunning) return; + if (isTimerRunning && !isPaused) return; SetQuickTime(0, 15, 0); } private void Quick20Min_Click(object sender, RoutedEventArgs e) { - if (isTimerRunning) return; + if (isTimerRunning && !isPaused) return; SetQuickTime(0, 20, 0); } private void RecentTimer1_Click(object sender, RoutedEventArgs e) { - if (isTimerRunning || recentTimer1 == "--:--") return; + if ((isTimerRunning && !isPaused) || recentTimer1 == "--:--") return; ApplyRecentTimer(recentTimer1); } private void RecentTimer2_Click(object sender, RoutedEventArgs e) { - if (isTimerRunning || recentTimer2 == "--:--") return; + if ((isTimerRunning && !isPaused) || recentTimer2 == "--:--") return; ApplyRecentTimer(recentTimer2); } From 16458fbb423f2319359634db37b47ec2b7cbd3e6 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 14:31:54 +0800 Subject: [PATCH 17/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/SeewoStyleTimerWindow.xaml.cs | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 6709b1b3..6c415068 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -98,6 +98,7 @@ namespace Ink_Canvas private void InitializeUI() { UpdateDigitDisplays(); + LoadRecentTimers(); UpdateRecentTimerDisplays(); } @@ -630,6 +631,9 @@ namespace Ink_Canvas recentTimer2 = recentTimer1; recentTimer1 = currentTime; UpdateRecentTimerDisplays(); + + // 保存到注册表 + SaveRecentTimersToRegistry(); } } @@ -646,5 +650,47 @@ namespace Ink_Canvas // 如果UI元素还未初始化,忽略错误 } } + + // 从注册表加载最近计时记录 + private void LoadRecentTimers() + { + try + { + using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\SeewoTimer")) + { + if (key != null) + { + recentTimer1 = key.GetValue(RecentTimer1Key, "--:--")?.ToString() ?? "--:--"; + recentTimer2 = key.GetValue(RecentTimer2Key, "--:--")?.ToString() ?? "--:--"; + } + } + } + catch + { + // 如果读取注册表失败,使用默认值 + recentTimer1 = "--:--"; + recentTimer2 = "--:--"; + } + } + + // 保存最近计时记录到注册表 + private void SaveRecentTimersToRegistry() + { + try + { + using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\SeewoTimer")) + { + if (key != null) + { + key.SetValue(RecentTimer1Key, recentTimer1); + key.SetValue(RecentTimer2Key, recentTimer2); + } + } + } + catch + { + // 如果保存到注册表失败,静默处理 + } + } } } From 7c8bdb489b2147b26901d9b20aebefe56b3fd8bf Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 14:50:56 +0800 Subject: [PATCH 18/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 3bcbbb55..a5a69f48 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -264,6 +264,11 @@ + + + From 1b2ea8c5220a1b795952f5b8bbd4b9d7a128c7d8 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 14:55:52 +0800 Subject: [PATCH 19/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 4 ++-- .../Windows/SeewoStyleTimerWindow.xaml.cs | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index a5a69f48..97581bf4 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -10,7 +10,7 @@ Loaded="Window_Loaded" Closing="Window_Closing" WindowStartupLocation="CenterScreen" Title="Ink Canvas 画板 - 计时器" Height="450" Width="900"> - + @@ -266,7 +266,7 @@ diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 6c415068..f8e05b1e 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -129,6 +129,7 @@ namespace Ink_Canvas else if (settings.Appearance.Theme == 1) // 深色主题 { iNKORE.UI.WPF.Modern.ThemeManager.SetRequestedTheme(this, iNKORE.UI.WPF.Modern.ElementTheme.Dark); + SetDarkThemeBorder(); } else // 跟随系统主题 { @@ -140,6 +141,7 @@ namespace Ink_Canvas else { iNKORE.UI.WPF.Modern.ThemeManager.SetRequestedTheme(this, iNKORE.UI.WPF.Modern.ElementTheme.Dark); + SetDarkThemeBorder(); } } } @@ -692,5 +694,20 @@ namespace Ink_Canvas // 如果保存到注册表失败,静默处理 } } + + // 设置深色主题下的灰色边框 + private void SetDarkThemeBorder() + { + try + { + if (MainBorder != null) + { + MainBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(64, 64, 64)); + } + } + catch + { + } + } } } From adc4966d4955a8899d5a7cfca01e2b3244d3768b Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 15:00:42 +0800 Subject: [PATCH 20/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 6 +++--- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 97581bf4..a5cdfee6 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -10,7 +10,7 @@ Loaded="Window_Loaded" Closing="Window_Closing" WindowStartupLocation="CenterScreen" Title="Ink Canvas 画板 - 计时器" Height="450" Width="900"> - + @@ -18,11 +18,11 @@ - + - diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index f8e05b1e..002fee81 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -542,8 +542,9 @@ namespace Ink_Canvas } } - private void BtnClose_MouseUp(object sender, MouseButtonEventArgs e) + private void BtnClose_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { + e.Handled = true; Close(); } From a8cb1dd4952e74621c0afde6d238d4e7b2b5953c Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 15:26:46 +0800 Subject: [PATCH 21/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 446 ++++++++++-------- .../Windows/SeewoStyleTimerWindow.xaml.cs | 3 +- 2 files changed, 238 insertions(+), 211 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index a5cdfee6..b93f680b 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -12,24 +12,52 @@ + - + - - - - - - - - - - - - - + + + + + + + + + + - - - - + + + + + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - - - - + + + + + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - - - - + + + + + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + - - + + - + - + @@ -300,7 +328,7 @@ Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/> - + - + Date: Mon, 6 Oct 2025 15:41:52 +0800 Subject: [PATCH 22/85] Update .gitignore --- .gitignore | 430 +++++++++++++++++- Ink Canvas.sln.DotSettings.user | 6 - Ink Canvas/FodyWeavers.xsd | 176 ------- Ink Canvas/InkCanvasForClass.csproj.user | 6 - .../PublishProfiles/FolderProfile.pubxml | 13 - .../PublishProfiles/FolderProfile.pubxml.user | 6 - ...vasForClass.csproj.AssemblyReference.cache | Bin 38181 -> 0 bytes 7 files changed, 427 insertions(+), 210 deletions(-) delete mode 100644 Ink Canvas.sln.DotSettings.user delete mode 100644 Ink Canvas/FodyWeavers.xsd delete mode 100644 Ink Canvas/InkCanvasForClass.csproj.user delete mode 100644 Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml delete mode 100644 Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml.user delete mode 100644 Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache diff --git a/.gitignore b/.gitignore index 2b9a7ea6..c4df8dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,428 @@ -obj/ -bin/ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates +*.env + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ + +[Dd]ebug/x64/ +[Dd]ebugPublic/x64/ +[Rr]elease/x64/ +[Rr]eleases/x64/ +bin/x64/ +obj/x64/ + +[Dd]ebug/x86/ +[Dd]ebugPublic/x86/ +[Rr]elease/x86/ +[Rr]eleases/x86/ +bin/x86/ +obj/x86/ + +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +[Aa][Rr][Mm]64[Ee][Cc]/ +bld/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Build results on 'Bin' directories +**/[Bb]in/* +# Uncomment if you have tasks that rely on *.refresh files to move binaries +# (https://github.com/github/gitignore/pull/3736) +#!**/[Bb]in/*.refresh + +# Visual Studio 2015/2017 cache/options directory .vs/ -/Ink Canvas/obj +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* +*.trx + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Approval Tests result files +*.received.* + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.idb +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +# but not Directory.Build.rsp, as it configures directory-level build defaults +!Directory.Build.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +**/.paket/paket.exe +paket-files/ + +# FAKE - F# Make +**/.fake/ + +# CodeRush personal settings +**/.cr/personal + +# Python Tools for Visual Studio (PTVS) +**/__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +#tools/** +#!tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog +MSBuild_Logs/ + +# AWS SAM Build and Temporary Artifacts folder +.aws-sam + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +**/.mfractor/ + +# Local History for Visual Studio +**/.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +**/.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp \ No newline at end of file diff --git a/Ink Canvas.sln.DotSettings.user b/Ink Canvas.sln.DotSettings.user deleted file mode 100644 index 21fc1f49..00000000 --- a/Ink Canvas.sln.DotSettings.user +++ /dev/null @@ -1,6 +0,0 @@ - - WARNING - C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe - 1114112 - True - True \ No newline at end of file diff --git a/Ink Canvas/FodyWeavers.xsd b/Ink Canvas/FodyWeavers.xsd deleted file mode 100644 index f2dbece7..00000000 --- a/Ink Canvas/FodyWeavers.xsd +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks - - - - - A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. - - - - - A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks - - - - - A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. - - - - - Obsolete, use UnmanagedWinX86Assemblies instead - - - - - A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks. - - - - - Obsolete, use UnmanagedWinX64Assemblies instead. - - - - - A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks. - - - - - A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks. - - - - - The order of preloaded assemblies, delimited with line breaks. - - - - - - This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. - - - - - Controls if .pdbs for reference assemblies are also embedded. - - - - - Controls if runtime assemblies are also embedded. - - - - - Controls whether the runtime assemblies are embedded with their full path or only with their assembly name. - - - - - Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. - - - - - As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. - - - - - The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events. - - - - - Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. - - - - - Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. - - - - - A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | - - - - - A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. - - - - - A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with | - - - - - A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |. - - - - - Obsolete, use UnmanagedWinX86Assemblies instead - - - - - A list of unmanaged X86 (32 bit) assembly names to include, delimited with |. - - - - - Obsolete, use UnmanagedWinX64Assemblies instead - - - - - A list of unmanaged X64 (64 bit) assembly names to include, delimited with |. - - - - - A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |. - - - - - The order of preloaded assemblies, delimited with |. - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/Ink Canvas/InkCanvasForClass.csproj.user b/Ink Canvas/InkCanvasForClass.csproj.user deleted file mode 100644 index 92ed6d11..00000000 --- a/Ink Canvas/InkCanvasForClass.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - <_LastSelectedProfileId>D:\vs\ica\Ink Canvas\Properties\PublishProfiles\FolderProfile.pubxml - - \ No newline at end of file diff --git a/Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml b/Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml deleted file mode 100644 index c0035a49..00000000 --- a/Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Release - Any CPU - dist\ - FileSystem - <_TargetId>Folder - - \ No newline at end of file diff --git a/Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml.user b/Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml.user deleted file mode 100644 index e9ea52ed..00000000 --- a/Ink Canvas/Properties/PublishProfiles/FolderProfile.pubxml.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache b/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache deleted file mode 100644 index 57d842b8b7d92d5308ee26301638a87ff9085d80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38181 zcmd^I349Y(8qaW)aug_(YY{ApA`~W9o3yYhrL@ojrL?6Kh>MeCQbN<2lB350iy(-& zfQSg9u*M6~6+{qLIYmUlatgSB$c-$QH=-P}@4d-OCdrg0%^SC@!;hrNOx}F&d;jnM zeeZk6L{S=rLP0TUy$v~bzR1p$#AjG-tRwz`iez1PLoRD!?JQ?v<5L|Dw!~<&vJS%# ztI5tgc#G4J0j_7ud3&*e&Q8zweJV?&^|Z!N;xO@co7G60Z8nMm_ffP+i}`Wh!Dt2g zKs5y4G~;-CiPg+8G-oSq3O{fbljv_V{2N`wS&GpK`~jVznt*$$Xst@CPEk-v>Aek^ zX=(9k>7KXv62{6IOnga+i?cc_4VheVd>X@*F%Cm!Y8r26y`o(kIezndYrl%7C@M-g zg(PkSL>$^4iVn0SyeX*3;Ex86313hTT7bTKE0xOh-b&%#o;P%FrT5-S-@TQhd%G3j z=qi*qAN(0rPxzdhm#S7YfcKyjYi`UvS8sCBjLzk~pFTD-d3&b=_13W;#CLjhJ?4*Yqx##XqTd13)^2%FI%xO#@$GH-=RtC_#G{7j+}Gg zNYa_XDYMek8vW;VpK15UJ-A}Wl?9LU3%6e#kaKpS!F;OyOXAc88Vc9#n(I)@d|aTGcZ?&1G}C?CgUa>vGx| zThI6$7XXcE5L=ng7qi@hTD8%lO-|A=X00xf)h2<06%?qZ0_Z&&<3+#<`0`9Mc;0s) z&BKpEQy{ti^;bhdhr|;zy(bRBGcgHAKB$m878bVS!$#j~Di{rg~vtePyMA|8T87Nek2p+$ zaf{R;1v4>RVJVmjBPk=!6I6K6N@sxR*@2>|+DaAcDX~9WYU3+Q0BXZ3PV75iC2?^> z7>+4oBQCC~M>=FgktnW(FB+onv0vSX)6m?=(oYq?@(T!C~bz_xYvsZd4ROzP~rO=I4dgNA$8oJ?oeE zd87GnZ)|+^9^1It`X+<-*S{J!u$bF$&&cUZlLvI>u8iL~?=|MniubRvU);6(MAg|J zO{yL4yHg(@{!+(pyYB4X?vulBv+v>(#{F3Z|&;!)i5esR0W?C zhXfmv6E~UkMzz*rF_|@HvpGo(>rb_WFQizJn1z#|S1e3_#>s?b)&2%ZQGdb=VP%Rq z-r=;G9CW^&F@8eA4_C$nw}={ z3-N-yCUEd1S(qfRVCd(uCYK$gV8d!Zxo|+zJ476e;wV0i=PcGDmpyzt4pdW2s>uZT z+i0~#s&O2_6Y3E3yd8I;{tM%Dg0wQ7$1{;oZm@M)WwB0g3`wWujb-em5|#=1idcM9 zr-19FiAs(sv6>>V?BM1qlcl*l=z{?r4PWwDXL^N`(eT?M9!>Xco97Wc&8 z5qFu%cn*ppnw%irj}Hd6JbhU4U@~kO33L<9E|CBwA@1-&GGbGU4Wjd~EH}uL zRxp1f%()f`v11v|K{xL?;bmhL1Q}t!4&kBz}>Y%f}8D2da_JY9t!~ zc!#|R%=e2N@gN`(_dE!skjJjkw4z{D6YT-iB^x6?T^OfNvPn#nCJ)NCo_59)uhT#dD%>PbAkcA- zF5)4v4j$psL2uMvYPULAFfY8!3g&@EV2Hs6R3s-&^%r_na)(tUY=|_vf;DZDQ`2A~ zy@ZxwcZ%2`HVG}a5;JSwcw40N|K)ErSshF@qqA`FUY%+-Qb8P1e}D@kun-~GSY2`& zEA}^j3wXPDkR@+Of8VOSuv}$eLP>sd zk#$}!bO~@Rv;?q-5=>nJ7M`IkX<-q8flyo*%rvrM00-U@7=R0}2|1bIO7#QuIotu( z{TNcsC05Sr0DDI{dAot;Tt%$YP|BE!!Ttdb17qRsMXW(XYv?2c*jUVv3I+#?L^GCN zc=hE`!}g+0yo6I|0XZBYgcybgst0`c+r%qNw16B5qVy9)DF~v(f+z(+lt>UI5JV{w z#0_uL_4Ye@oxCS%d&;HuGlv}8@yv{#hp+12(YyXK>GZx?ea`G;C%<`X$7`zGo#h|x z$zQEK(QoF|Q8A5QnAqg!o6Xj(-u%nu<#B`7RJ?Znn;jF%-+jDukGnr~zx7JXF8!=b zzfr{p3b&sdyk`5<0hi*MpGbJ}x%;21-}kGp*%&j^_xpZJ-XHo3H(~emqbJd_@GW2R zKV5K-yGUgU(u-Gw0|ke&t&2%*HtH;vM3!MxI)*jEs-wNK{GbxJh#y`B52>{YVpc_q z{e>65Z9uZaf(s4jC-cFeDS%)5kp6b^$k76Hnt2)%T@WIG3Tg!)L9}2P`9yO=J=FlF zUf*oKJg!~dw(V!${Jh(w%73&koO*cNq@ueYF}1y9SoEyUrhRh7qXh#Kn(iIeVrqBw z_p@di4A-R z*Z(u1{F9?+^4fMh^WkTXxt6F8V^_8`@15YVb&hK}scG?Y1g5I%T%&!Ck11-XSbMdB zl+j|;u`0b;t=F0oRl+6%K|PbmAVpDugLvVTC+@=w==5#p5>7e6PzU7*+6zJ*gaJIH zOa|LAI`4b&Ga1+~37ugDT+(K%oi#ZfWBKyxtfxP^A`e{QGo*=wY#u{uCx!y;yEdqH z(xhyQz@|j9S7%;6d64XGsJR*}E%uX&)(fUoHoUxb^$}fZe7maVE6#W9S#>7!i$jB2 zG;+>(eNWuTE4xbTfAG$(shy5|wtr!-8A}KJE%Wjy`}F%yFa6}m-_+Kw)7M+nhkJAx z8f&{z7*qeq`o0slto-TK`?tRJ@BXUQds1R<9_qb*^s#y6JMU`vd3*1!iyBppdTU{HIyK8AY7>*qiQ433wNZ~y6cqMF3T_-B`;Y8L zTI%iT8rB3JQig*$3!O(Vb(I*9aDE2;Xs8BV#@N927-p-}prhe-Z7C`gIf0#E5_KA| zO)6TqoCfyJpi|MM>EKeIG4HzI9{IqRFraEHeJKTdop3Y(9;3j2XB<+ox@Ft>iPNrsc{OX_ z@|c&_EpB4_WN_@>pWnQ^{@m&WzQdubi6^(HrVQzOJpa~`s6U^2@#;HIyf@DJ-Kh^+ zF6x;3%8LHFfhQNapBr#4!&G(h96eK)lXxp{?W?;Vh-*`I?$q%$XPW0*CMO+j@ENk> z#amze+ODtPk{Tsl8=o0t4b;5NUW&=2O);`My$0+Js#U9?E-1K(s$VB%%=$ zEF8fZ7Pv@hCl^kwgG~+^t9XgFPx zrPTx`SCp4p3~CzeG3@mfdW~VA_sVQ^WhT6GM5)E+Eh?v+ZS(yh=q=h;cd^hrgcb4} zP;cnJUx(ZkroX7J7D`kLuj|ljl+_6qauBHgc6I;6+5ae?`>nIn)DA1Mn}3=A?N56f zE!cJV=2L}}l8osy>eDOu`ndh#K+a?Az0;QExu052jjpafKKFrC5K3=em#onyCo;)NT1J)3FlN|7 zXzyU6-UAyj5t^6D6_KK6qCSJXOC!t82ri;6u_Rdv&fyfX6ddIYg{7=qFeD+QswjFhBNN(=3V>g;;^G-BP_T{1tYB0dg64`~R6gQWJD^ml#=iYE&iYxba_ zx#{%qOnO941`S7->>Suf&@o(mgSo~d9gEv(9AMQV^HZ-N?u7>hN{q2c?!Iin(p2 zd>|7{D1U#g=o4C!_6UOciYg0;-QY{jK2fba9ct2uz4OSzL z3JG-UP_Z?|AuzcqibE{FgG=#x5??41n!!jr5U??T@Zce^>2)Y$mLWzXen`RI5Q^@G zdaWTKsat-dP^vD(+(mPs4x$|+nffx=vWWDz{vaKrZoVN37ucvCt?eAnS8RflP|8!E{Hq=S5L?iWHv7;*sC;(c8aiiskUU2Z{-|G5Y;nrwnd{ zu%o+A0tXp9hJ+Udp++WH`xph-H2+6V53V^O*!lKnTM2JhL*q!hxuW00&E1*)Eyqve zKF6j8^P@s~8lOq38$@iqN+8OKI3SsvLuz5WA0mQ#ZW$k%co3%$}@ye%zXuuYJ*C9e0Yb#Y#Y!2`m z>`p_Sh;zGg@!S(}x#WBUDz&BrOu%sUsIcglE)|qnJq>%b?W5yIf9dO?gic5s2ghTj-u&Ye{d6{Ylse_bWMsMWFlAcw1erIjDPYB?GfO92=N+Y zvjB4VI~6KB;78Nbyu|_*Kht0zKGx2c(xrSkSQgELj|MeZ*+3^IYE-mZrB249#~PLI zx%Tu>;m2r+8TfGy{BaKav5!v9U;a8fb3YtTzSs8g$G0Rs$=&bHIJho;vK{SGiU9z8Z6RqT-pI)SmN$5_U~r{nIz6KR)zx z>V#WmdefT=zF2j9%ejwU-1C0-g_Xx=Oy6~C%h=uD3~WB4(S1K;%&F+HxGSaV`Sa0s zCp*N>`JC#YUw7X6_=x3Q{l#g2M_@hm?bt zO14D_*bTxAE>o%;Ty=O24iwt>v`}DV!GlMTDMVN-x`E$JdN^%;ykn(L2dZ zn`H1N}Hq<3Fn4-xT9<$OQ;z!*h7?) zg}uXR=51_*537gm0^Ez}q0ys5#3#p=JHcb1c#D%B=ioVm8qSv2V*iksWXSeikOeOA z`GR$Sy8E@e(Ioj60oPD5P#)1CjaE~bXblimDTs=xJuyicAO;fE4aKMdvR9bn-6qWmr&EKp?4PzmTRe%NgQzm_# zS?y+>zOOUNPB!wKqk?9GKtbVuzkYCDxLhTOq(mZlDGH<~#Ui=EZEE7C82t~kFT^~N z(W|uQm|v#8(rg5EBd$x!30kx2!*`;)w>m|BYunU~7t79h?sl zaHDGnI4EBApu^(1p`vPViggQk*&+>+0w1xb7X{KKndF0K5WXMdV8h~G@n$brvTE55 z0s$UUE+1PxI*(rDnDnD2_#9Smc=2hxsT zr~|TqVa>1%l2?i3RRVdHNZ$XKr5;dKvLi`B$@APrQC7_Aa51(t9}k>JJ#;nxAo7MH Hc2fKomB@jJ From 92cb07140802daa312fd8c0a6ac2fb9ff97a453f Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 15:52:38 +0800 Subject: [PATCH 23/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/Controls/WinUI3CloseButton.cs | 28 +++++++++ .../Windows/Controls/WinUI3CloseButton.xaml | 63 +++++++++++++++++++ Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 49 ++++----------- 3 files changed, 104 insertions(+), 36 deletions(-) create mode 100644 Ink Canvas/Windows/Controls/WinUI3CloseButton.cs create mode 100644 Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml diff --git a/Ink Canvas/Windows/Controls/WinUI3CloseButton.cs b/Ink Canvas/Windows/Controls/WinUI3CloseButton.cs new file mode 100644 index 00000000..2b4dc8b8 --- /dev/null +++ b/Ink Canvas/Windows/Controls/WinUI3CloseButton.cs @@ -0,0 +1,28 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; + +namespace Ink_Canvas.Windows.Controls +{ + public class WinUI3CloseButton : ButtonBase + { + static WinUI3CloseButton() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(WinUI3CloseButton), new FrameworkPropertyMetadata(typeof(WinUI3CloseButton))); + } + + public bool IsActive + { + get => (bool)GetValue(IsActiveProperty); + set => SetValue(IsActiveProperty, value); + } + + public static readonly DependencyProperty IsActiveProperty = DependencyProperty.Register( + nameof(IsActive), + typeof(bool), + typeof(WinUI3CloseButton), + new PropertyMetadata(true) + ); + } +} diff --git a/Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml b/Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml new file mode 100644 index 00000000..08da94f1 --- /dev/null +++ b/Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml @@ -0,0 +1,63 @@ + + + + + + + + + + diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index b93f680b..67e06f13 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -5,49 +5,26 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Ink_Canvas" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" + xmlns:controls="clr-namespace:Ink_Canvas.Windows.Controls" Topmost="True" Background="Transparent" mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True" Loaded="Window_Loaded" Closing="Window_Closing" WindowStartupLocation="CenterScreen" Title="Ink Canvas 画板 - 计时器" Height="450" Width="900"> + + + + + + + + - + From d464b1f78ecf9d8935f6e66a65dafb1e4c08c54a Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 15:59:48 +0800 Subject: [PATCH 24/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml | 9 ++++----- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml b/Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml index 08da94f1..fc8b3aac 100644 --- a/Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml +++ b/Ink Canvas/Windows/Controls/WinUI3CloseButton.xaml @@ -8,6 +8,7 @@ + @@ -52,12 +53,10 @@ + VerticalAlignment="Center" /> diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 67e06f13..244a0845 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -24,7 +24,7 @@ + Content="✕"/> From ffa2063c520cb521ee5b483b369d41841761a25a Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 16:04:03 +0800 Subject: [PATCH 25/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 244a0845..24d8c9ce 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -32,9 +32,20 @@ - + + + + + + Date: Mon, 6 Oct 2025 16:14:52 +0800 Subject: [PATCH 26/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 24d8c9ce..175fbe7c 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -395,7 +395,14 @@ - + @@ -427,7 +434,14 @@ - + From 6bcd3cb2177469d9c23577a714401cfae911e606 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 16:29:03 +0800 Subject: [PATCH 27/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 175fbe7c..6f116fa7 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -57,10 +57,10 @@ - + - + - + @@ -105,7 +121,15 @@ - + - + @@ -152,7 +184,15 @@ - + - + @@ -185,7 +233,15 @@ - + - + @@ -232,7 +296,15 @@ - + - + @@ -265,7 +345,15 @@ - + - + From 4d069d87d7e574a80d49ec16626f73c4a1bf1522 Mon Sep 17 00:00:00 2001 From: LiuYan-xwx Date: Mon, 6 Oct 2025 16:32:33 +0800 Subject: [PATCH 29/85] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=BB=91?= =?UTF-8?q?=E5=8A=A8=E5=8A=A8=E7=94=BB=E4=B8=8E=E8=AE=BE=E7=BD=AE=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整滑动动画的目标位置,更新 From 和 To 属性值。 - 移动并优化 `BorderSettings.Visibility` 的设置逻辑。 - 提升代码可读性,减少重复代码,改进动画效果。 --- Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index d83f45e8..8c09db70 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -383,7 +383,7 @@ namespace Ink_Canvas var slideAnimation = new DoubleAnimation { From = 0, // 滑动距离 - To = BorderSettings.RenderTransform.Value.OffsetX - 440, + To = BorderSettings.RenderTransform.Value.OffsetX - 490, Duration = TimeSpan.FromSeconds(0.6) }; slideAnimation.EasingFunction = new CubicEase { EasingMode = EasingMode.EaseOut }; @@ -407,7 +407,6 @@ namespace Ink_Canvas // 如果用户在设置中修改了无焦点模式,则保持用户的修改 }; - BorderSettings.Visibility = Visibility.Visible; BorderSettings.RenderTransform = new TranslateTransform(); isOpeningOrHidingSettingsPane = true; @@ -2777,6 +2776,7 @@ namespace Ink_Canvas } else { + BorderSettings.Visibility = Visibility.Visible; // 临时禁用无焦点模式以避免下拉选项被遮挡 wasNoFocusModeBeforeSettings = Settings.Advanced.IsNoFocusMode; userChangedNoFocusModeInSettings = false; // 重置用户修改标志 @@ -2795,7 +2795,7 @@ namespace Ink_Canvas // 滑动动画 var slideAnimation = new DoubleAnimation { - From = BorderSettings.RenderTransform.Value.OffsetX - 440, // 滑动距离 + From = BorderSettings.RenderTransform.Value.OffsetX - 490, // 滑动距离 To = 0, Duration = TimeSpan.FromSeconds(0.6) }; @@ -2807,7 +2807,6 @@ namespace Ink_Canvas sb.Completed += (s, _) => { isOpeningOrHidingSettingsPane = false; }; - BorderSettings.Visibility = Visibility.Visible; BorderSettings.RenderTransform = new TranslateTransform(); isOpeningOrHidingSettingsPane = true; From 9721ec1f0b88d204ffbede201b854d3d1e02e86f Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 16:35:21 +0800 Subject: [PATCH 30/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 1d27c091..ba09f501 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -157,9 +157,6 @@ - - @@ -269,9 +266,6 @@ - - @@ -381,9 +375,6 @@ - - From 20d5dd2668649b46a188705eacaf9be778e19322 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 16:53:00 +0800 Subject: [PATCH 31/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 247 +++++++++++++----- .../Windows/SeewoStyleTimerWindow.xaml.cs | 94 ++++++- 2 files changed, 265 insertions(+), 76 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index ba09f501..cc5420f4 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -388,70 +388,11 @@ - - - - - - - - - - - - - - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index c108ee6f..41a477c0 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -90,10 +90,18 @@ namespace Ink_Canvas // 最近计时记录 private string recentTimer1 = "--:--"; private string recentTimer2 = "--:--"; + private string recentTimer3 = "--:--"; + private string recentTimer4 = "--:--"; + private string recentTimer5 = "--:--"; + private string recentTimer6 = "--:--"; // 最近计时记录的注册表键名 private const string RecentTimer1Key = "SeewoTimer_RecentTimer1"; private const string RecentTimer2Key = "SeewoTimer_RecentTimer2"; + private const string RecentTimer3Key = "SeewoTimer_RecentTimer3"; + private const string RecentTimer4Key = "SeewoTimer_RecentTimer4"; + private const string RecentTimer5Key = "SeewoTimer_RecentTimer5"; + private const string RecentTimer6Key = "SeewoTimer_RecentTimer6"; private void InitializeUI() { @@ -553,31 +561,57 @@ namespace Ink_Canvas DragMove(); } - // 快捷选项事件处理 - private void Quick5Min_Click(object sender, RoutedEventArgs e) + // Tab切换事件处理 + private void CommonTab_Click(object sender, RoutedEventArgs e) + { + CommonTimersGrid.Visibility = Visibility.Visible; + RecentTimersGrid.Visibility = Visibility.Collapsed; + } + + private void RecentTab_Click(object sender, RoutedEventArgs e) + { + CommonTimersGrid.Visibility = Visibility.Collapsed; + RecentTimersGrid.Visibility = Visibility.Visible; + } + + // 常用计时事件处理 + private void Common5Min_Click(object sender, RoutedEventArgs e) { if (isTimerRunning && !isPaused) return; SetQuickTime(0, 5, 0); } - private void Quick10Min_Click(object sender, RoutedEventArgs e) + private void Common10Min_Click(object sender, RoutedEventArgs e) { if (isTimerRunning && !isPaused) return; SetQuickTime(0, 10, 0); } - private void Quick15Min_Click(object sender, RoutedEventArgs e) + private void Common15Min_Click(object sender, RoutedEventArgs e) { if (isTimerRunning && !isPaused) return; SetQuickTime(0, 15, 0); } - private void Quick20Min_Click(object sender, RoutedEventArgs e) + private void Common30Min_Click(object sender, RoutedEventArgs e) { if (isTimerRunning && !isPaused) return; - SetQuickTime(0, 20, 0); + SetQuickTime(0, 30, 0); } + private void Common45Min_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning && !isPaused) return; + SetQuickTime(0, 45, 0); + } + + private void Common60Min_Click(object sender, RoutedEventArgs e) + { + if (isTimerRunning && !isPaused) return; + SetQuickTime(1, 0, 0); + } + + // 最近计时事件处理 private void RecentTimer1_Click(object sender, RoutedEventArgs e) { if ((isTimerRunning && !isPaused) || recentTimer1 == "--:--") return; @@ -590,6 +624,30 @@ namespace Ink_Canvas ApplyRecentTimer(recentTimer2); } + private void RecentTimer3_Click(object sender, RoutedEventArgs e) + { + if ((isTimerRunning && !isPaused) || recentTimer3 == "--:--") return; + ApplyRecentTimer(recentTimer3); + } + + private void RecentTimer4_Click(object sender, RoutedEventArgs e) + { + if ((isTimerRunning && !isPaused) || recentTimer4 == "--:--") return; + ApplyRecentTimer(recentTimer4); + } + + private void RecentTimer5_Click(object sender, RoutedEventArgs e) + { + if ((isTimerRunning && !isPaused) || recentTimer5 == "--:--") return; + ApplyRecentTimer(recentTimer5); + } + + private void RecentTimer6_Click(object sender, RoutedEventArgs e) + { + if ((isTimerRunning && !isPaused) || recentTimer6 == "--:--") return; + ApplyRecentTimer(recentTimer6); + } + // 设置快捷时间 private void SetQuickTime(int h, int m, int s) { @@ -630,11 +688,15 @@ namespace Ink_Canvas // 如果当前时间与最近记录不同,则更新 if (currentTime != recentTimer1) { + // 向后移动所有记录 + recentTimer6 = recentTimer5; + recentTimer5 = recentTimer4; + recentTimer4 = recentTimer3; + recentTimer3 = recentTimer2; recentTimer2 = recentTimer1; recentTimer1 = currentTime; UpdateRecentTimerDisplays(); - - // 保存到注册表 + SaveRecentTimersToRegistry(); } } @@ -646,6 +708,10 @@ namespace Ink_Canvas { RecentTimer1Text.Text = recentTimer1; RecentTimer2Text.Text = recentTimer2; + RecentTimer3Text.Text = recentTimer3; + RecentTimer4Text.Text = recentTimer4; + RecentTimer5Text.Text = recentTimer5; + RecentTimer6Text.Text = recentTimer6; } catch { @@ -664,6 +730,10 @@ namespace Ink_Canvas { recentTimer1 = key.GetValue(RecentTimer1Key, "--:--")?.ToString() ?? "--:--"; recentTimer2 = key.GetValue(RecentTimer2Key, "--:--")?.ToString() ?? "--:--"; + recentTimer3 = key.GetValue(RecentTimer3Key, "--:--")?.ToString() ?? "--:--"; + recentTimer4 = key.GetValue(RecentTimer4Key, "--:--")?.ToString() ?? "--:--"; + recentTimer5 = key.GetValue(RecentTimer5Key, "--:--")?.ToString() ?? "--:--"; + recentTimer6 = key.GetValue(RecentTimer6Key, "--:--")?.ToString() ?? "--:--"; } } } @@ -672,6 +742,10 @@ namespace Ink_Canvas // 如果读取注册表失败,使用默认值 recentTimer1 = "--:--"; recentTimer2 = "--:--"; + recentTimer3 = "--:--"; + recentTimer4 = "--:--"; + recentTimer5 = "--:--"; + recentTimer6 = "--:--"; } } @@ -686,6 +760,10 @@ namespace Ink_Canvas { key.SetValue(RecentTimer1Key, recentTimer1); key.SetValue(RecentTimer2Key, recentTimer2); + key.SetValue(RecentTimer3Key, recentTimer3); + key.SetValue(RecentTimer4Key, recentTimer4); + key.SetValue(RecentTimer5Key, recentTimer5); + key.SetValue(RecentTimer6Key, recentTimer6); } } } From b7f7025d97402be1bae5ec41989633d164aa7df5 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:00:27 +0800 Subject: [PATCH 32/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 108 +++++++++++++++--- 1 file changed, 90 insertions(+), 18 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index cc5420f4..ea13bbb2 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -385,8 +385,8 @@ Margin="580,0,0,0"/> - + @@ -417,7 +417,7 @@ - + @@ -432,8 +432,20 @@ - + + + + - + - + @@ -545,7 +617,7 @@ Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/> - + - - - - - - - - - - - @@ -499,8 +499,8 @@ - - - @@ -580,8 +580,8 @@ - - - - - - From 9614536a29b79604ee3f03c51e1a2e4ae6a791a7 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:14:40 +0800 Subject: [PATCH 35/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 476 +++++++++--------- 1 file changed, 238 insertions(+), 238 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 8a28b0a8..bd4c67d5 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -53,25 +53,25 @@ - - + - + - - - - - - - - + + - - - - + + + - - - - - - - + + - - - - - - + + + + + - + - - - - - - - - + + - - - - + + + - - - - - - - + + - - - - - - + + + + + - - - - - - - - - - + + - - - - + + + - - - - - - - + + - - @@ -382,17 +382,17 @@ + Margin="510,0,0,0"/> + x:Name="QuickOptionsGrid" Width="400" Margin="510,0,0,0" Height="200"> @@ -423,8 +423,8 @@ - - - @@ -499,8 +499,8 @@ - - - - - + + - - - - + - - - @@ -682,7 +682,7 @@ StrokeThickness="2" StrokeLineJoin="Round" Fill="Transparent" - Width="16" Height="16" + Width="20" Height="20" Stretch="Uniform" Margin="0,0,5,0"/> @@ -721,7 +721,7 @@ StrokeThickness="2" StrokeLineJoin="Round" Fill="Transparent" - Width="16" Height="16" + Width="20" Height="20" Stretch="Uniform" Margin="0,0,5,0"/> From 161b67b09dd9dd37b27bd107f52cbc21acb5bac0 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:17:56 +0800 Subject: [PATCH 36/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 66 +++++++++++-------- .../Windows/SeewoStyleTimerWindow.xaml.cs | 21 +++++- 2 files changed, 59 insertions(+), 28 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index bd4c67d5..5749d289 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -388,34 +388,46 @@ - + - - - - + + + + + + + + + + + + diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 41a477c0..819486d6 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -561,17 +561,36 @@ namespace Ink_Canvas DragMove(); } - // Tab切换事件处理 private void CommonTab_Click(object sender, RoutedEventArgs e) { CommonTimersGrid.Visibility = Visibility.Visible; RecentTimersGrid.Visibility = Visibility.Collapsed; + + // 移动指示器到左侧 + var indicator = this.FindName("SegmentedIndicator") as Border; + if (indicator != null) + { + var animation = new System.Windows.Media.Animation.ThicknessAnimation( + new Thickness(2, 0, 0, 0), + TimeSpan.FromMilliseconds(200)); + indicator.BeginAnimation(Border.MarginProperty, animation); + } } private void RecentTab_Click(object sender, RoutedEventArgs e) { CommonTimersGrid.Visibility = Visibility.Collapsed; RecentTimersGrid.Visibility = Visibility.Visible; + + // 移动指示器到右侧 + var indicator = this.FindName("SegmentedIndicator") as Border; + if (indicator != null) + { + var animation = new System.Windows.Media.Animation.ThicknessAnimation( + new Thickness(120, 0, 0, 0), + TimeSpan.FromMilliseconds(200)); + indicator.BeginAnimation(Border.MarginProperty, animation); + } } // 常用计时事件处理 From 7e109119910879f6869c88d9be859bfcbe0ee29f Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:23:16 +0800 Subject: [PATCH 37/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 5749d289..d789f45b 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -52,7 +52,7 @@ x:Name="MainContentGrid" Margin="0,-25,0,25"> + x:Name="MainDisplayGrid" Width="500" Margin="0,0,0,0"> @@ -382,11 +382,11 @@ + Margin="465,0,0,0"/> + x:Name="QuickOptionsGrid" Width="400" Margin="470,0,0,0" Height="200"> From 77ac6f88ca90226d4a7df0aa6de44e3d10475549 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:28:32 +0800 Subject: [PATCH 38/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 4 ++-- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index d789f45b..6be27988 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -412,7 +412,7 @@ Click="CommonTab_Click" Cursor="Hand" HorizontalAlignment="Left"> - diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 819486d6..32077126 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -566,6 +566,12 @@ namespace Ink_Canvas CommonTimersGrid.Visibility = Visibility.Visible; RecentTimersGrid.Visibility = Visibility.Collapsed; + // 更新字体粗细 + var commonText = this.FindName("CommonTabText") as TextBlock; + var recentText = this.FindName("RecentTabText") as TextBlock; + if (commonText != null) commonText.FontWeight = FontWeights.Bold; + if (recentText != null) recentText.FontWeight = FontWeights.Normal; + // 移动指示器到左侧 var indicator = this.FindName("SegmentedIndicator") as Border; if (indicator != null) @@ -582,6 +588,12 @@ namespace Ink_Canvas CommonTimersGrid.Visibility = Visibility.Collapsed; RecentTimersGrid.Visibility = Visibility.Visible; + // 更新字体粗细 + var commonText = this.FindName("CommonTabText") as TextBlock; + var recentText = this.FindName("RecentTabText") as TextBlock; + if (commonText != null) commonText.FontWeight = FontWeights.Normal; + if (recentText != null) recentText.FontWeight = FontWeights.Bold; + // 移动指示器到右侧 var indicator = this.FindName("SegmentedIndicator") as Border; if (indicator != null) From c76254f4f99e9149e5f20e69425c882edc1334b9 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:28:52 +0800 Subject: [PATCH 39/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 2 +- .../Windows/SeewoStyleTimerWindow.xaml.cs | 28 +++++++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 6be27988..bcf10227 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -423,7 +423,7 @@ Cursor="Hand" HorizontalAlignment="Right"> + Foreground="{DynamicResource SeewoTimerWindowButtonForeground}" Opacity="0.6"/> diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 32077126..2da6f031 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -566,11 +566,19 @@ namespace Ink_Canvas CommonTimersGrid.Visibility = Visibility.Visible; RecentTimersGrid.Visibility = Visibility.Collapsed; - // 更新字体粗细 + // 更新字体粗细和透明度 var commonText = this.FindName("CommonTabText") as TextBlock; var recentText = this.FindName("RecentTabText") as TextBlock; - if (commonText != null) commonText.FontWeight = FontWeights.Bold; - if (recentText != null) recentText.FontWeight = FontWeights.Normal; + if (commonText != null) + { + commonText.FontWeight = FontWeights.Bold; + commonText.Opacity = 1.0; + } + if (recentText != null) + { + recentText.FontWeight = FontWeights.Normal; + recentText.Opacity = 0.6; + } // 移动指示器到左侧 var indicator = this.FindName("SegmentedIndicator") as Border; @@ -588,11 +596,19 @@ namespace Ink_Canvas CommonTimersGrid.Visibility = Visibility.Collapsed; RecentTimersGrid.Visibility = Visibility.Visible; - // 更新字体粗细 + // 更新字体粗细和透明度 var commonText = this.FindName("CommonTabText") as TextBlock; var recentText = this.FindName("RecentTabText") as TextBlock; - if (commonText != null) commonText.FontWeight = FontWeights.Normal; - if (recentText != null) recentText.FontWeight = FontWeights.Bold; + if (commonText != null) + { + commonText.FontWeight = FontWeights.Normal; + commonText.Opacity = 0.6; + } + if (recentText != null) + { + recentText.FontWeight = FontWeights.Bold; + recentText.Opacity = 1.0; + } // 移动指示器到右侧 var indicator = this.FindName("SegmentedIndicator") as Border; From f5e824be865775b23d8860e80395b98a904a349c Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:49:43 +0800 Subject: [PATCH 40/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 8 +++++--- .../Windows/SeewoStyleTimerWindow.xaml.cs | 20 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index bcf10227..02f07296 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -392,16 +392,18 @@ + Margin="0,0,0,0"/> diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 2da6f031..133c5dc4 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -566,26 +566,30 @@ namespace Ink_Canvas CommonTimersGrid.Visibility = Visibility.Visible; RecentTimersGrid.Visibility = Visibility.Collapsed; - // 更新字体粗细和透明度 + // 更新字体粗细、透明度和颜色 var commonText = this.FindName("CommonTabText") as TextBlock; var recentText = this.FindName("RecentTabText") as TextBlock; if (commonText != null) { commonText.FontWeight = FontWeights.Bold; commonText.Opacity = 1.0; + commonText.Foreground = new SolidColorBrush(Colors.White); } if (recentText != null) { recentText.FontWeight = FontWeights.Normal; - recentText.Opacity = 0.6; + recentText.Opacity = 0.8; + recentText.Foreground = new SolidColorBrush(Color.FromRgb(102, 102, 102)); } // 移动指示器到左侧 var indicator = this.FindName("SegmentedIndicator") as Border; if (indicator != null) { + // 设置左侧圆角 + indicator.CornerRadius = new CornerRadius(6, 0, 0, 6); var animation = new System.Windows.Media.Animation.ThicknessAnimation( - new Thickness(2, 0, 0, 0), + new Thickness(0, 0, 0, 0), TimeSpan.FromMilliseconds(200)); indicator.BeginAnimation(Border.MarginProperty, animation); } @@ -596,26 +600,30 @@ namespace Ink_Canvas CommonTimersGrid.Visibility = Visibility.Collapsed; RecentTimersGrid.Visibility = Visibility.Visible; - // 更新字体粗细和透明度 + // 更新字体粗细、透明度和颜色 var commonText = this.FindName("CommonTabText") as TextBlock; var recentText = this.FindName("RecentTabText") as TextBlock; if (commonText != null) { commonText.FontWeight = FontWeights.Normal; - commonText.Opacity = 0.6; + commonText.Opacity = 0.8; + commonText.Foreground = new SolidColorBrush(Color.FromRgb(102, 102, 102)); } if (recentText != null) { recentText.FontWeight = FontWeights.Bold; recentText.Opacity = 1.0; + recentText.Foreground = new SolidColorBrush(Colors.White); } // 移动指示器到右侧 var indicator = this.FindName("SegmentedIndicator") as Border; if (indicator != null) { + // 设置右侧圆角 + indicator.CornerRadius = new CornerRadius(0, 6, 6, 0); var animation = new System.Windows.Media.Animation.ThicknessAnimation( - new Thickness(120, 0, 0, 0), + new Thickness(118, 0, 0, 0), TimeSpan.FromMilliseconds(200)); indicator.BeginAnimation(Border.MarginProperty, animation); } From cd9499b064e4767e40cc772b91ba501e666099be Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 17:55:05 +0800 Subject: [PATCH 41/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 2 +- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 02f07296..d4495cde 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -399,7 +399,7 @@ Date: Mon, 6 Oct 2025 18:03:15 +0800 Subject: [PATCH 42/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index d4495cde..479b67ed 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -393,7 +393,7 @@ From 4da78a04cb9ba3507c98ce5b699ca18670a5b80a Mon Sep 17 00:00:00 2001 From: PrefacedCorg <1876568293@qq.com> Date: Mon, 6 Oct 2025 18:29:12 +0800 Subject: [PATCH 43/85] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Helpers/GlobalHotkeyManager.cs | 4 +- Ink Canvas/MainWindow.xaml.cs | 10 +- Ink Canvas/MainWindow_cs/MW_AutoTheme.cs | 28 ++--- Ink Canvas/MainWindow_cs/MW_BoardControls.cs | 2 +- .../MainWindow_cs/MW_FloatingBarIcons.cs | 16 +-- Ink Canvas/MainWindow_cs/MW_Timer.cs | 20 ++-- .../Windows/Controls/WinUI3CloseButton.cs | 2 - .../Windows/CountdownTimerWindow.xaml.cs | 8 +- .../Windows/OperatingGuideWindow.xaml.cs | 8 +- Ink Canvas/Windows/RandWindow.xaml.cs | 2 +- .../Windows/SeewoStyleTimerWindow.xaml.cs | 107 +++++++++--------- 11 files changed, 102 insertions(+), 105 deletions(-) diff --git a/Ink Canvas/Helpers/GlobalHotkeyManager.cs b/Ink Canvas/Helpers/GlobalHotkeyManager.cs index 8df7924d..11fea5a5 100644 --- a/Ink Canvas/Helpers/GlobalHotkeyManager.cs +++ b/Ink Canvas/Helpers/GlobalHotkeyManager.cs @@ -865,7 +865,7 @@ namespace Ink_Canvas.Helpers { // 检查当前是否处于鼠标模式 bool isMouseMode = IsInSelectMode(); - + if (isMouseMode) { // 鼠标模式下,根据设置决定是否启用快捷键 @@ -874,7 +874,7 @@ namespace Ink_Canvas.Helpers else { // 非鼠标模式下,需要检查焦点和屏幕位置 - + // 策略1:鼠标在窗口上时启用热键(最高优先级) if (_isMouseOverWindow) { diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index 73a09138..57b44cda 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -839,7 +839,7 @@ namespace Ink_Canvas // 检测到新版本,停止重试定时器 timerCheckAutoUpdateRetry.Stop(); updateCheckRetryCount = 0; - + // 检测到新版本 LogHelper.WriteLogToFile($"AutoUpdate | New version available: {AvailableLatestVersion}"); @@ -1006,7 +1006,7 @@ namespace Ink_Canvas else if (hasValidLineGroup) { LogHelper.WriteLogToFile("AutoUpdate | Current version is already the latest, no retry needed"); - + // 停止重试定时器 timerCheckAutoUpdateRetry.Stop(); updateCheckRetryCount = 0; @@ -1015,13 +1015,13 @@ namespace Ink_Canvas { // 检查更新失败,启动重试定时器 LogHelper.WriteLogToFile("AutoUpdate | Update check failed, starting retry timer"); - + // 重置重试计数 updateCheckRetryCount = 0; - + // 启动重试定时器,10分钟后重新检查 timerCheckAutoUpdateRetry.Start(); - + // 清理更新文件夹 AutoUpdateHelper.DeleteUpdatesFolder(); } diff --git a/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs b/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs index 88c967be..b8032e3a 100644 --- a/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs +++ b/Ink Canvas/MainWindow_cs/MW_AutoTheme.cs @@ -74,7 +74,7 @@ namespace Ink_Canvas // 强制刷新UI window.InvalidateVisual(); - + // 通知其他窗口刷新主题 RefreshOtherWindowsTheme(); } @@ -118,7 +118,7 @@ namespace Ink_Canvas // 强制刷新UI window.InvalidateVisual(); - + // 通知其他窗口刷新主题 RefreshOtherWindowsTheme(); } @@ -184,18 +184,18 @@ namespace Ink_Canvas // 根据主题设置高光颜色 Color highlightBackgroundColor; Color highlightBarColor; - bool isDarkTheme = Settings.Appearance.Theme == 1 || + bool isDarkTheme = Settings.Appearance.Theme == 1 || (Settings.Appearance.Theme == 2 && !IsSystemThemeLight()); - + if (isDarkTheme) { - highlightBackgroundColor = Color.FromArgb(21, 102, 204, 255); - highlightBarColor = Color.FromRgb(102, 204, 255); + highlightBackgroundColor = Color.FromArgb(21, 102, 204, 255); + highlightBarColor = Color.FromRgb(102, 204, 255); } else { - highlightBackgroundColor = Color.FromArgb(21, 59, 130, 246); - highlightBarColor = Color.FromRgb(37, 99, 235); + highlightBackgroundColor = Color.FromArgb(21, 59, 130, 246); + highlightBarColor = Color.FromRgb(37, 99, 235); } // 设置高光背景颜色 @@ -224,16 +224,16 @@ namespace Ink_Canvas { // 根据主题选择高光颜色 Color selectedColor; - bool isDarkTheme = Settings.Appearance.Theme == 1 || + bool isDarkTheme = Settings.Appearance.Theme == 1 || (Settings.Appearance.Theme == 2 && !IsSystemThemeLight()); - + if (isDarkTheme) { - selectedColor = Color.FromRgb(102, 204, 255); + selectedColor = Color.FromRgb(102, 204, 255); } else { - selectedColor = Color.FromRgb(30, 58, 138); + selectedColor = Color.FromRgb(30, 58, 138); } // 根据当前模式设置按钮颜色 @@ -376,7 +376,7 @@ namespace Ink_Canvas { // 强制刷新墨迹选中栏的视觉状态 BorderStrokeSelectionControl.InvalidateVisual(); - + // 刷新墨迹选中栏内的所有图标 var viewbox = BorderStrokeSelectionControl.Child as Viewbox; if (viewbox?.Child is ui.SimpleStackPanel stackPanel) @@ -434,7 +434,7 @@ namespace Ink_Canvas { // 强制刷新图片选中栏的视觉状态 BorderImageSelectionControl.InvalidateVisual(); - + // 刷新图片选中栏内的所有图标 var viewbox = BorderImageSelectionControl.Child as Viewbox; if (viewbox?.Child is ui.SimpleStackPanel stackPanel) diff --git a/Ink Canvas/MainWindow_cs/MW_BoardControls.cs b/Ink Canvas/MainWindow_cs/MW_BoardControls.cs index adc46b19..408700c9 100644 --- a/Ink Canvas/MainWindow_cs/MW_BoardControls.cs +++ b/Ink Canvas/MainWindow_cs/MW_BoardControls.cs @@ -418,7 +418,7 @@ namespace Ink_Canvas // 获取主题颜色资源 var iconForegroundBrush = Application.Current.FindResource("IconForeground") as SolidColorBrush; - + // 设置下一页按钮颜色 if (iconForegroundBrush != null) { diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 8c09db70..2dde2248 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -476,9 +476,9 @@ namespace Ink_Canvas // 根据主题选择高光颜色 Color highlightColor; - bool isDarkTheme = Settings.Appearance.Theme == 1 || + bool isDarkTheme = Settings.Appearance.Theme == 1 || (Settings.Appearance.Theme == 2 && !IsSystemThemeLight()); - + if (isDarkTheme) { highlightColor = Color.FromRgb(102, 204, 255); // #66ccff for dark theme @@ -3716,18 +3716,18 @@ namespace Ink_Canvas // 根据主题设置高光颜色 Color highlightBackgroundColor; Color highlightBarColor; - bool isDarkTheme = Settings.Appearance.Theme == 1 || + bool isDarkTheme = Settings.Appearance.Theme == 1 || (Settings.Appearance.Theme == 2 && !IsSystemThemeLight()); - + if (isDarkTheme) { - highlightBackgroundColor = Color.FromArgb(21, 102, 204, 255); - highlightBarColor = Color.FromRgb(102, 204, 255); + highlightBackgroundColor = Color.FromArgb(21, 102, 204, 255); + highlightBarColor = Color.FromRgb(102, 204, 255); } else { - highlightBackgroundColor = Color.FromArgb(21, 59, 130, 246); - highlightBarColor = Color.FromRgb(37, 99, 235); + highlightBackgroundColor = Color.FromArgb(21, 59, 130, 246); + highlightBarColor = Color.FromRgb(37, 99, 235); } // 设置高光背景颜色 diff --git a/Ink Canvas/MainWindow_cs/MW_Timer.cs b/Ink Canvas/MainWindow_cs/MW_Timer.cs index 8b83a223..afb21c29 100644 --- a/Ink Canvas/MainWindow_cs/MW_Timer.cs +++ b/Ink Canvas/MainWindow_cs/MW_Timer.cs @@ -61,10 +61,10 @@ namespace Ink_Canvas private Timer timerCheckAutoFold = new Timer(); private string AvailableLatestVersion; private Timer timerCheckAutoUpdateWithSilence = new Timer(); - private Timer timerCheckAutoUpdateRetry = new Timer(); + private Timer timerCheckAutoUpdateRetry = new Timer(); private bool isHidingSubPanelsWhenInking; // 避免书写时触发二次关闭二级菜单导致动画不连续 - private int updateCheckRetryCount = 0; - private const int MAX_UPDATE_CHECK_RETRIES = 6; + private int updateCheckRetryCount = 0; + private const int MAX_UPDATE_CHECK_RETRIES = 6; private Timer timerDisplayTime = new Timer(); private Timer timerDisplayDate = new Timer(); private Timer timerNtpSync = new Timer(); @@ -120,7 +120,7 @@ namespace Ink_Canvas timerCheckAutoUpdateWithSilence.Elapsed += timerCheckAutoUpdateWithSilence_Elapsed; timerCheckAutoUpdateWithSilence.Interval = 1000 * 60 * 10; timerCheckAutoUpdateRetry.Elapsed += timerCheckAutoUpdateRetry_Elapsed; - timerCheckAutoUpdateRetry.Interval = 1000 * 60 * 10; + timerCheckAutoUpdateRetry.Interval = 1000 * 60 * 10; WaterMarkTime.DataContext = nowTimeVM; WaterMarkDate.DataContext = nowTimeVM; timerDisplayTime.Elapsed += TimerDisplayTime_Elapsed; @@ -863,7 +863,7 @@ namespace Ink_Canvas // 执行更新检查 LogHelper.WriteLogToFile("AutoUpdate | Retrying update check after failure"); - + // 清除之前的更新状态 AvailableLatestVersion = null; AvailableLatestLineGroup = null; @@ -878,7 +878,7 @@ namespace Ink_Canvas // 检查更新成功,重置重试计数 updateCheckRetryCount = 0; LogHelper.WriteLogToFile($"AutoUpdate | Retry successful, found new version: {AvailableLatestVersion}"); - + // 停止重试定时器,因为已经找到了更新 return; } @@ -886,7 +886,7 @@ namespace Ink_Canvas { // 检查更新仍然失败,继续重试 LogHelper.WriteLogToFile($"AutoUpdate | Retry {updateCheckRetryCount} failed, will retry in 10 minutes"); - + // 重新启动定时器,10分钟后再次尝试 timerCheckAutoUpdateRetry.Start(); } @@ -894,7 +894,7 @@ namespace Ink_Canvas catch (Exception ex) { LogHelper.WriteLogToFile($"AutoUpdate | Error in retry check: {ex.Message}", LogHelper.LogType.Error); - + // 出错时也重新启动定时器,稍后再检查 if (updateCheckRetryCount <= MAX_UPDATE_CHECK_RETRIES) { @@ -910,10 +910,10 @@ namespace Ink_Canvas { // 停止重试定时器 timerCheckAutoUpdateRetry.Stop(); - + // 重置重试计数 updateCheckRetryCount = 0; - + LogHelper.WriteLogToFile("AutoUpdate | Update check retry state reset"); } catch (Exception ex) diff --git a/Ink Canvas/Windows/Controls/WinUI3CloseButton.cs b/Ink Canvas/Windows/Controls/WinUI3CloseButton.cs index 2b4dc8b8..144dca9c 100644 --- a/Ink Canvas/Windows/Controls/WinUI3CloseButton.cs +++ b/Ink Canvas/Windows/Controls/WinUI3CloseButton.cs @@ -1,6 +1,4 @@ -using System; using System.Windows; -using System.Windows.Controls; using System.Windows.Controls.Primitives; namespace Ink_Canvas.Windows.Controls diff --git a/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs b/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs index 545ea002..9012eb3b 100644 --- a/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs @@ -22,7 +22,7 @@ namespace Ink_Canvas timer.Elapsed += Timer_Elapsed; timer.Interval = 50; InitializeUI(); - + // 应用主题 ApplyTheme(); } @@ -111,9 +111,9 @@ namespace Ink_Canvas private void Grid_MouseUp(object sender, MouseButtonEventArgs e) { if (isTimerRunning) return; - + var textForeground = Application.Current.FindResource("TimerWindowTextForeground") as SolidColorBrush; - + if (ProcessBarTime.Visibility == Visibility.Visible && isTimerRunning == false) { ProcessBarTime.Visibility = Visibility.Collapsed; @@ -439,7 +439,7 @@ namespace Ink_Canvas { // 重新应用主题 ApplyTheme(); - + // 强制刷新UI InvalidateVisual(); } diff --git a/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs b/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs index 39ded587..28e83faa 100644 --- a/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs +++ b/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs @@ -1,8 +1,8 @@ using Ink_Canvas.Helpers; -using System.Windows; -using System.Windows.Input; using iNKORE.UI.WPF.Modern; using System; +using System.Windows; +using System.Windows.Input; namespace Ink_Canvas { @@ -54,9 +54,9 @@ namespace Ink_Canvas try { // 根据当前主题设置窗口主题 - bool isDarkTheme = MainWindow.Settings.Appearance.Theme == 1 || + bool isDarkTheme = MainWindow.Settings.Appearance.Theme == 1 || (MainWindow.Settings.Appearance.Theme == 2 && !IsSystemThemeLight()); - + if (isDarkTheme) { ThemeManager.SetRequestedTheme(this, ElementTheme.Dark); diff --git a/Ink Canvas/Windows/RandWindow.xaml.cs b/Ink Canvas/Windows/RandWindow.xaml.cs index fc16446c..c3052eef 100644 --- a/Ink Canvas/Windows/RandWindow.xaml.cs +++ b/Ink Canvas/Windows/RandWindow.xaml.cs @@ -487,7 +487,7 @@ namespace Ink_Canvas { // 重新应用主题 ApplyTheme(MainWindow.Settings); - + // 强制刷新UI InvalidateVisual(); } diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index cc1c10ec..895fbe3e 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -5,7 +5,6 @@ using System.Timers; using System.Windows; using System.Windows.Controls; using System.Windows.Input; -using System.Windows.Interop; using System.Windows.Media; namespace Ink_Canvas @@ -23,7 +22,7 @@ namespace Ink_Canvas timer.Elapsed += Timer_Elapsed; timer.Interval = 50; InitializeUI(); - + // 应用主题 ApplyTheme(); } @@ -46,9 +45,9 @@ namespace Ink_Canvas { int totalHours = (int)leftTimeSpan.TotalHours; int displayHours = totalHours; - + if (displayHours > 99) displayHours = 99; - + Digit1Display.Text = (displayHours / 10).ToString(); Digit2Display.Text = (displayHours % 10).ToString(); Digit3Display.Text = (leftTimeSpan.Minutes / 10).ToString(); @@ -86,7 +85,7 @@ namespace Ink_Canvas bool isPaused = false; Timer timer = new Timer(); - + // 最近计时记录 private string recentTimer1 = "--:--"; private string recentTimer2 = "--:--"; @@ -94,7 +93,7 @@ namespace Ink_Canvas private string recentTimer4 = "--:--"; private string recentTimer5 = "--:--"; private string recentTimer6 = "--:--"; - + // 最近计时记录的注册表键名 private const string RecentTimer1Key = "SeewoTimer_RecentTimer1"; private const string RecentTimer2Key = "SeewoTimer_RecentTimer2"; @@ -201,10 +200,10 @@ namespace Ink_Canvas int currentHour = hour; int hourTens = currentHour / 10; int hourOnes = currentHour % 10; - + hourTens++; if (hourTens >= 10) hourTens = 0; - + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } @@ -215,10 +214,10 @@ namespace Ink_Canvas int currentHour = hour; int hourTens = currentHour / 10; int hourOnes = currentHour % 10; - + hourTens--; if (hourTens < 0) hourTens = 9; - + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } @@ -230,15 +229,15 @@ namespace Ink_Canvas int currentHour = hour; int hourTens = currentHour / 10; int hourOnes = currentHour % 10; - + hourOnes++; - if (hourOnes >= 10) + if (hourOnes >= 10) { hourOnes = 0; hourTens++; if (hourTens >= 10) hourTens = 0; } - + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } @@ -249,15 +248,15 @@ namespace Ink_Canvas int currentHour = hour; int hourTens = currentHour / 10; int hourOnes = currentHour % 10; - + hourOnes--; - if (hourOnes < 0) + if (hourOnes < 0) { hourOnes = 9; hourTens--; if (hourTens < 0) hourTens = 9; } - + hour = hourTens * 10 + hourOnes; UpdateDigitDisplays(); } @@ -269,10 +268,10 @@ namespace Ink_Canvas int currentMinute = minute; int minuteTens = currentMinute / 10; int minuteOnes = currentMinute % 10; - + minuteTens++; if (minuteTens >= 6) minuteTens = 0; - + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } @@ -283,10 +282,10 @@ namespace Ink_Canvas int currentMinute = minute; int minuteTens = currentMinute / 10; int minuteOnes = currentMinute % 10; - + minuteTens--; if (minuteTens < 0) minuteTens = 5; - + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } @@ -298,15 +297,15 @@ namespace Ink_Canvas int currentMinute = minute; int minuteTens = currentMinute / 10; int minuteOnes = currentMinute % 10; - + minuteOnes++; - if (minuteOnes >= 10) + if (minuteOnes >= 10) { minuteOnes = 0; minuteTens++; if (minuteTens >= 6) minuteTens = 0; } - + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } @@ -317,15 +316,15 @@ namespace Ink_Canvas int currentMinute = minute; int minuteTens = currentMinute / 10; int minuteOnes = currentMinute % 10; - + minuteOnes--; - if (minuteOnes < 0) + if (minuteOnes < 0) { minuteOnes = 9; minuteTens--; if (minuteTens < 0) minuteTens = 5; } - + minute = minuteTens * 10 + minuteOnes; UpdateDigitDisplays(); } @@ -337,10 +336,10 @@ namespace Ink_Canvas int currentSecond = second; int secondTens = currentSecond / 10; int secondOnes = currentSecond % 10; - + secondTens++; if (secondTens >= 6) secondTens = 0; - + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } @@ -351,10 +350,10 @@ namespace Ink_Canvas int currentSecond = second; int secondTens = currentSecond / 10; int secondOnes = currentSecond % 10; - + secondTens--; if (secondTens < 0) secondTens = 5; - + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } @@ -366,15 +365,15 @@ namespace Ink_Canvas int currentSecond = second; int secondTens = currentSecond / 10; int secondOnes = currentSecond % 10; - + secondOnes++; - if (secondOnes >= 10) + if (secondOnes >= 10) { secondOnes = 0; secondTens++; if (secondTens >= 6) secondTens = 0; } - + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } @@ -385,15 +384,15 @@ namespace Ink_Canvas int currentSecond = second; int secondTens = currentSecond / 10; int secondOnes = currentSecond % 10; - + secondOnes--; - if (secondOnes < 0) + if (secondOnes < 0) { secondOnes = 9; secondTens--; if (secondTens < 0) secondTens = 5; } - + second = secondTens * 10 + secondOnes; UpdateDigitDisplays(); } @@ -428,13 +427,13 @@ namespace Ink_Canvas second = 1; UpdateDigitDisplays(); } - + startTime = DateTime.Now; StartPauseIcon.Data = Geometry.Parse(PauseIconData); isPaused = false; isTimerRunning = true; timer.Start(); - + // 保存到最近计时记录 SaveRecentTimer(); } @@ -518,7 +517,7 @@ namespace Ink_Canvas private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { isTimerRunning = false; - + if (MainWindow.Settings != null) { var mainWindow = Application.Current.MainWindow as MainWindow; @@ -526,7 +525,7 @@ namespace Ink_Canvas { try { - var currentModeField = mainWindow.GetType().GetField("currentMode", + var currentModeField = mainWindow.GetType().GetField("currentMode", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); if (currentModeField != null) { @@ -565,23 +564,23 @@ namespace Ink_Canvas { CommonTimersGrid.Visibility = Visibility.Visible; RecentTimersGrid.Visibility = Visibility.Collapsed; - + // 更新字体粗细、透明度和颜色 var commonText = this.FindName("CommonTabText") as TextBlock; var recentText = this.FindName("RecentTabText") as TextBlock; - if (commonText != null) + if (commonText != null) { commonText.FontWeight = FontWeights.Bold; commonText.Opacity = 1.0; commonText.Foreground = new SolidColorBrush(Colors.White); } - if (recentText != null) + if (recentText != null) { recentText.FontWeight = FontWeights.Normal; recentText.Opacity = 0.8; recentText.Foreground = new SolidColorBrush(Color.FromRgb(102, 102, 102)); } - + // 移动指示器到左侧 var indicator = this.FindName("SegmentedIndicator") as Border; if (indicator != null) @@ -589,7 +588,7 @@ namespace Ink_Canvas // 设置左侧圆角 indicator.CornerRadius = new CornerRadius(7, 0, 0, 7); var animation = new System.Windows.Media.Animation.ThicknessAnimation( - new Thickness(0, 0, 0, 0), + new Thickness(0, 0, 0, 0), TimeSpan.FromMilliseconds(200)); indicator.BeginAnimation(Border.MarginProperty, animation); } @@ -599,23 +598,23 @@ namespace Ink_Canvas { CommonTimersGrid.Visibility = Visibility.Collapsed; RecentTimersGrid.Visibility = Visibility.Visible; - + // 更新字体粗细、透明度和颜色 var commonText = this.FindName("CommonTabText") as TextBlock; var recentText = this.FindName("RecentTabText") as TextBlock; - if (commonText != null) + if (commonText != null) { commonText.FontWeight = FontWeights.Normal; commonText.Opacity = 0.8; commonText.Foreground = new SolidColorBrush(Color.FromRgb(102, 102, 102)); } - if (recentText != null) + if (recentText != null) { recentText.FontWeight = FontWeights.Bold; recentText.Opacity = 1.0; recentText.Foreground = new SolidColorBrush(Colors.White); } - + // 移动指示器到右侧 var indicator = this.FindName("SegmentedIndicator") as Border; if (indicator != null) @@ -623,7 +622,7 @@ namespace Ink_Canvas // 设置右侧圆角 indicator.CornerRadius = new CornerRadius(0, 7, 7, 0); var animation = new System.Windows.Media.Animation.ThicknessAnimation( - new Thickness(118, 0, 0, 0), + new Thickness(118, 0, 0, 0), TimeSpan.FromMilliseconds(200)); indicator.BeginAnimation(Border.MarginProperty, animation); } @@ -716,7 +715,7 @@ namespace Ink_Canvas private void ApplyRecentTimer(string timeString) { if (timeString == "--:--") return; - + try { var parts = timeString.Split(':'); @@ -737,9 +736,9 @@ namespace Ink_Canvas private void SaveRecentTimer() { if (hour == 0 && minute == 0 && second == 0) return; - + string currentTime = $"{minute:D2}:{second:D2}"; - + // 如果当前时间与最近记录不同,则更新 if (currentTime != recentTimer1) { @@ -835,7 +834,7 @@ namespace Ink_Canvas { if (MainBorder != null) { - MainBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(64, 64, 64)); + MainBorder.BorderBrush = new SolidColorBrush(Color.FromRgb(64, 64, 64)); } } catch From dec2a1577388e0c944251a2a7ea03457ae48805e Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 18:43:14 +0800 Subject: [PATCH 44/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 479b67ed..1a62e8b2 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -399,7 +399,7 @@ Date: Mon, 6 Oct 2025 18:44:00 +0800 Subject: [PATCH 45/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 895fbe3e..e08e57f7 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -586,7 +586,7 @@ namespace Ink_Canvas if (indicator != null) { // 设置左侧圆角 - indicator.CornerRadius = new CornerRadius(7, 0, 0, 7); + indicator.CornerRadius = new CornerRadius(7.5, 0, 0, 7.5); var animation = new System.Windows.Media.Animation.ThicknessAnimation( new Thickness(0, 0, 0, 0), TimeSpan.FromMilliseconds(200)); @@ -620,7 +620,7 @@ namespace Ink_Canvas if (indicator != null) { // 设置右侧圆角 - indicator.CornerRadius = new CornerRadius(0, 7, 7, 0); + indicator.CornerRadius = new CornerRadius(0, 7.5, 7.5, 0); var animation = new System.Windows.Media.Animation.ThicknessAnimation( new Thickness(118, 0, 0, 0), TimeSpan.FromMilliseconds(200)); From 7500049ea2124dd367527c6bb8dbe7709f29a234 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 19:03:10 +0800 Subject: [PATCH 46/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/DigitResources.xaml | 25 ++++++ Ink Canvas/Windows/SeewoStyleTimerWindow.xaml | 79 +++++++++++++------ .../Windows/SeewoStyleTimerWindow.xaml.cs | 56 ++++++++----- 3 files changed, 118 insertions(+), 42 deletions(-) create mode 100644 Ink Canvas/Windows/DigitResources.xaml diff --git a/Ink Canvas/Windows/DigitResources.xaml b/Ink Canvas/Windows/DigitResources.xaml new file mode 100644 index 00000000..312d66c0 --- /dev/null +++ b/Ink Canvas/Windows/DigitResources.xaml @@ -0,0 +1,25 @@ + + + + M2.432,34.536 C2.432,30.6533333 2.83733333,27.2506667 3.648,24.328 C4.45866667,21.4053333 5.6,18.984 7.072,17.064 C8.544,15.144 10.304,13.704 12.352,12.744 C14.4,11.784 16.6826667,11.304 19.2,11.304 C24.576,11.304 28.7146667,13.192 31.616,16.968 C34.5173333,20.744 35.968,26.6 35.968,34.536 C35.968,38.4613333 35.5626667,41.8853333 34.752,44.808 C33.9413333,47.7306667 32.8,50.1626667 31.328,52.104 C29.856,54.0453333 28.0853333,55.496 26.016,56.456 C23.9466667,57.416 21.6533333,57.896 19.136,57.896 C13.7173333,57.896 9.57866667,55.9013333 6.72,51.912 C3.86133333,47.9226667 2.432,42.1306667 2.432,34.536 Z M27.776,34.536 C27.776,33.8533333 27.7653333,33.2026667 27.744,32.584 C27.7226667,31.9653333 27.6906667,31.3573333 27.648,30.76 L11.968,45.032 C13.2906667,48.9146667 15.7013333,50.856 19.2,50.856 C21.9306667,50.856 24.0426667,49.5546667 25.536,46.952 C27.0293333,44.3493333 27.776,40.2106667 27.776,34.536 Z M10.624,34.536 C10.624,35.176 10.6346667,35.784 10.656,36.36 C10.6773333,36.936 10.7093333,37.5226667 10.752,38.12 L26.368,23.848 C25.088,20.1786667 22.6773333,18.344 19.136,18.344 C16.4053333,18.344 14.304,19.656 12.832,22.28 C11.36,24.904 10.624,28.9893333 10.624,34.536 Z + + M46.184 49.96 L55.976 49.96 L55.976 21.992 L47.528 28.456 L43.688 23.336 L58.28 12.2 L63.912 12.2 L63.912 49.96 L73.512 49.96 L73.512 57 L46.184 57 Z + + M112.272,57 L83.728,57 L83.728,50.792 C84.24,50.3653333 84.88,49.8 85.648,49.096 C86.416,48.392 87.28,47.592 88.24,46.696 C89.2,45.8 90.2133333,44.8186667 91.28,43.752 C92.3466667,42.6853333 93.392,41.576 94.416,40.424 C95.8666667,38.8026667 97.136,37.3306667 98.224,36.008 C99.312,34.6853333 100.208,33.4373333 100.912,32.264 C101.616,31.0906667 102.138667,29.9386667 102.48,28.808 C102.821333,27.6773333 102.992,26.5146667 102.992,25.32 C102.992,24.4666667 102.8,23.6346667 102.416,22.824 C102.032,22.0133333 101.498667,21.2986667 100.816,20.68 C100.133333,20.0613333 99.312,19.5706667 98.352,19.208 C97.392,18.8453333 96.336,18.664 95.184,18.664 C93.648,18.664 92.2506667,18.8986667 90.992,19.368 C89.7333333,19.8373333 88.4213333,20.6266667 87.056,21.736 L83.728,15.848 C85.52,14.568 87.5146667,13.4906667 89.712,12.616 C91.9093333,11.7413333 94.4373333,11.304 97.296,11.304 C99.1306667,11.304 100.890667,11.56 102.576,12.072 C104.261333,12.584 105.754667,13.3413333 107.056,14.344 C108.357333,15.3466667 109.392,16.5946667 110.16,18.088 C110.928,19.5813333 111.312,21.3093333 111.312,23.272 C111.312,24.6373333 111.194667,25.9066667 110.96,27.08 C110.725333,28.2533333 110.362667,29.4266667 109.872,30.6 C109.381333,31.7733333 108.741333,32.9786667 107.952,34.216 C107.162667,35.4533333 106.213333,36.7973333 105.104,38.248 C104.250667,39.3573333 103.322667,40.4773333 102.32,41.608 C101.317333,42.7386667 100.325333,43.816 99.344,44.84 C98.3626667,45.864 97.392,46.824 96.432,47.72 C95.472,48.616 94.608,49.3626667 93.84,49.96 L112.272,49.96 L112.272,57 Z + + M134.072,50.856 C135.48,50.856 136.770667,50.6746667 137.944,50.312 C139.117333,49.9493333 140.12,49.4373333 140.952,48.776 C141.784,48.1146667 142.434667,47.3466667 142.904,46.472 C143.373333,45.5973333 143.608,44.648 143.608,43.624 C143.608,42.344 143.341333,41.2666667 142.808,40.392 C142.274667,39.5173333 141.538667,38.824 140.6,38.312 C139.661333,37.8 138.530667,37.4373333 137.208,37.224 C135.885333,37.0106667 134.456,36.904 132.92,36.904 L129.336,36.904 L129.336,32.36 L140.088,19.24 L123.896,19.24 L123.896,12.2 L150.008,12.2 L150.008,18.024 L138.744,30.888 L140.216,30.888 C141.709333,30.888 143.16,31.144 144.568,31.656 C145.976,32.168 147.224,32.936 148.312,33.96 C149.4,34.984 150.274667,36.264 150.936,37.8 C151.597333,39.336 151.928,41.1066667 151.928,43.112 C151.928,45.544 151.426667,47.6773333 150.424,49.512 C149.421333,51.3466667 148.098667,52.8933333 146.456,54.152 C144.813333,55.4106667 142.925333,56.3493333 140.792,56.968 C138.658667,57.5866667 136.461333,57.896 134.2,57.896 C132.28,57.896 130.36,57.7253333 128.44,57.384 C126.52,57.0426667 124.664,56.5093333 122.872,55.784 L125.112,48.872 C125.496,49.0853333 126.018667,49.2986667 126.68,49.512 C127.341333,49.7253333 128.088,49.9386667 128.92,50.152 C129.752,50.3653333 130.605333,50.536 131.48,50.664 C132.354667,50.792 133.218667,50.856 134.072,50.856 Z + + M194.528,44.52 L186.848,44.52 L186.848,57 L179.104,57 L179.104,44.52 L159.712,44.52 L159.712,38.824 L180,11.88 L186.848,11.88 L186.848,37.864 L194.528,37.864 L194.528,44.52 Z M179.104,23.656 L167.968,37.864 L179.104,37.864 L179.104,23.656 Z + + M212.168,50.536 C213.576,50.536 214.877333,50.3653333 216.072,50.024 C217.266667,49.6826667 218.301333,49.192 219.176,48.552 C220.050667,47.912 220.733333,47.1226667 221.224,46.184 C221.714667,45.2453333 221.96,44.1786667 221.96,42.984 C221.96,40.6373333 221.032,38.792 219.176,37.448 C217.32,36.104 214.536,35.432 210.824,35.432 C210.354667,35.432 209.810667,35.4426667 209.192,35.464 C208.573333,35.4853333 207.986667,35.5173333 207.432,35.56 C206.792,35.6026667 206.130667,35.624 205.448,35.624 L205.448,12.2 L228.616,12.2 L228.616,19.88 L212.616,19.88 L212.616,28.648 C212.957333,28.648 213.298667,28.6266667 213.64,28.584 C213.938667,28.584 214.226667,28.5733333 214.504,28.552 C214.781333,28.5306667 215.026667,28.52 215.24,28.52 C217.373333,28.52 219.357333,28.8293333 221.192,29.448 C223.026667,30.0666667 224.626667,30.9946667 225.992,32.232 C227.357333,33.4693333 228.413333,34.9733333 229.16,36.744 C229.906667,38.5146667 230.28,40.4666667 230.28,42.6 C230.28,45.1173333 229.810667,47.3253333 228.872,49.224 C227.933333,51.1226667 226.653333,52.712 225.032,53.992 C223.410667,55.272 221.533333,56.2426667 219.4,56.904 C217.266667,57.5653333 214.984,57.896 212.552,57.896 C211.613333,57.896 210.610667,57.8 209.544,57.608 C208.477333,57.416 207.432,57.1813333 206.408,56.904 C205.384,56.6266667 204.434667,56.3173333 203.56,55.976 C202.685333,55.6346667 201.949333,55.3146667 201.352,55.016 L204.04,48.36 C204.765333,48.7866667 205.885333,49.256 207.4,49.768 C208.914667,50.28 210.504,50.536 212.168,50.536 Z + + M271.344,43.112 C271.344,45.2026667 270.949333,47.144 270.16,48.936 C269.370667,50.728 268.293333,52.2853333 266.928,53.608 C265.562667,54.9306667 263.930667,55.976 262.032,56.744 C260.133333,57.512 258.096,57.896 255.92,57.896 C253.701333,57.896 251.621333,57.544 249.68,56.84 C247.738667,56.136 246.042667,55.08 244.592,53.672 C243.141333,52.264 241.989333,50.4933333 241.136,48.36 C240.282667,46.2266667 239.856,43.752 239.856,40.936 C239.856,36.712 240.592,32.872 242.064,29.416 C243.536,25.96 245.424,22.9626667 247.728,20.424 C250.032,17.8853333 252.613333,15.8373333 255.472,14.28 C258.330667,12.7226667 261.168,11.7306667 263.984,11.304 L265.84,17.896 C263.578667,18.3226667 261.466667,19.016 259.504,19.976 C257.541333,20.936 255.792,22.0986667 254.256,23.464 C252.72,24.8293333 251.429333,26.344 250.384,28.008 C249.338667,29.672 248.624,31.4 248.24,33.192 C249.093333,32.1253333 250.373333,31.2186667 252.08,30.472 C253.786667,29.7253333 255.664,29.352 257.712,29.352 C259.632,29.352 261.424,29.6613333 263.088,30.28 C264.752,30.8986667 266.192,31.7946667 267.408,32.968 C268.624,34.1413333 269.584,35.5813333 270.288,37.288 C270.992,38.9946667 271.344,40.936 271.344,43.112 Z M263.28,43.432 C263.28,41.128 262.586667,39.3786667 261.2,38.184 C259.813333,36.9893333 257.946667,36.392 255.6,36.392 C253.893333,36.392 252.357333,36.776 250.992,37.544 C249.626667,38.312 248.624,39.208 247.984,40.232 C247.898667,40.7013333 247.845333,41.224 247.824,41.8 C247.802667,42.376 247.792,42.8346667 247.792,43.176 C247.792,44.2 247.962667,45.1813333 248.304,46.12 C248.645333,47.0586667 249.146667,47.88 249.808,48.584 C250.469333,49.288 251.269333,49.8426667 252.208,50.248 C253.146667,50.6533333 254.234667,50.856 255.472,50.856 C256.453333,50.856 257.413333,50.6746667 258.352,50.312 C259.290667,49.9493333 260.122667,49.448 260.848,48.808 C261.573333,48.168 262.16,47.3893333 262.608,46.472 C263.056,45.5546667 263.28,44.5413333 263.28,43.432 Z + + M282.328 57 L300.76 19.752 L279.896 19.752 L279.896 12.2 L309.08 12.2 L309.08 18.472 L290.456 57 Z + + M319.04,46.056 C319.04,44.5626667 319.285333,43.1973333 319.776,41.96 C320.266667,40.7226667 320.906667,39.6133333 321.696,38.632 C322.485333,37.6506667 323.392,36.7653333 324.416,35.976 C325.44,35.1866667 326.485333,34.4933333 327.552,33.896 C325.418667,32.6586667 323.648,31.1973333 322.24,29.512 C320.832,27.8266667 320.128,25.704 320.128,23.144 C320.128,21.48 320.490667,19.9226667 321.216,18.472 C321.941333,17.0213333 322.954667,15.7626667 324.256,14.696 C325.557333,13.6293333 327.104,12.7973333 328.896,12.2 C330.688,11.6026667 332.629333,11.304 334.72,11.304 C336.64,11.304 338.442667,11.56 340.128,12.072 C341.813333,12.584 343.296,13.3093333 344.576,14.248 C345.856,15.1866667 346.858667,16.328 347.584,17.672 C348.309333,19.016 348.672,20.4986667 348.672,22.12 C348.672,24.6373333 348.021333,26.8346667 346.72,28.712 C345.418667,30.5893333 343.637333,32.2106667 341.376,33.576 C343.936,34.8986667 345.973333,36.456 347.488,38.248 C349.002667,40.04 349.76,42.344 349.76,45.16 C349.76,47.08 349.344,48.8186667 348.512,50.376 C347.68,51.9333333 346.56,53.2666667 345.152,54.376 C343.744,55.4853333 342.090667,56.3493333 340.192,56.968 C338.293333,57.5866667 336.277333,57.896 334.144,57.896 C332.010667,57.896 330.026667,57.608 328.192,57.032 C326.357333,56.456 324.757333,55.656 323.392,54.632 C322.026667,53.608 320.96,52.3706667 320.192,50.92 C319.424,49.4693333 319.04,47.848 319.04,46.056 Z M341.824,44.968 C341.824,43.9013333 341.546667,42.984 340.992,42.216 C340.437333,41.448 339.744,40.7653333 338.912,40.168 C338.08,39.5706667 337.162667,39.0266667 336.16,38.536 C335.157333,38.0453333 334.186667,37.544 333.248,37.032 C331.114667,37.9706667 329.472,39.176 328.32,40.648 C327.168,42.12 326.592,43.5173333 326.592,44.84 C326.592,46.76 327.274667,48.2426667 328.64,49.288 C330.005333,50.3333333 331.904,50.856 334.336,50.856 C336.512,50.856 338.304,50.3546667 339.712,49.352 C341.12,48.3493333 341.824,46.888 341.824,44.968 Z M328.064,23.528 C328.064,24.552 328.288,25.416 328.736,26.12 C329.184,26.824 329.76,27.4426667 330.464,27.976 C331.168,28.5093333 331.968,28.9893333 332.864,29.416 C333.76,29.8426667 334.656,30.2693333 335.552,30.696 C336.234667,30.3546667 336.906667,29.928 337.568,29.416 C338.229333,28.904 338.816,28.3386667 339.328,27.72 C339.84,27.1013333 340.256,26.4613333 340.576,25.8 C340.896,25.1386667 341.056,24.4666667 341.056,23.784 C341.056,22.888 340.864,22.1093333 340.48,21.448 C340.096,20.7866667 339.594667,20.2213333 338.976,19.752 C338.357333,19.2826667 337.664,18.9306667 336.896,18.696 C336.128,18.4613333 335.338667,18.344 334.528,18.344 C333.589333,18.344 332.725333,18.4933333 331.936,18.792 C331.146667,19.0906667 330.464,19.4746667 329.888,19.944 C329.312,20.4133333 328.864,20.968 328.544,21.608 C328.224,22.248 328.064,22.888 328.064,23.528 Z + + M358.056,26.216 C358.056,24.04 358.429333,22.0346667 359.176,20.2 C359.922667,18.3653333 360.968,16.7973333 362.312,15.496 C363.656,14.1946667 365.277333,13.1706667 367.176,12.424 C369.074667,11.6773333 371.197333,11.304 373.544,11.304 C375.933333,11.304 378.109333,11.6666667 380.072,12.392 C382.034667,13.1173333 383.72,14.1946667 385.128,15.624 C386.536,17.0533333 387.624,18.824 388.392,20.936 C389.16,23.048 389.544,25.4693333 389.544,28.2 C389.544,33.1493333 388.904,37.416 387.624,41 C386.344,44.584 384.626667,47.5706667 382.472,49.96 C380.317333,52.3493333 377.810667,54.184 374.952,55.464 C372.093333,56.744 369.106667,57.5546667 365.992,57.896 L364.2,51.368 C366.546667,51.0693333 368.669333,50.4933333 370.568,49.64 C372.466667,48.7866667 374.12,47.7306667 375.528,46.472 C376.936,45.2133333 378.088,43.784 378.984,42.184 C379.88,40.584 380.456,38.8666667 380.712,37.032 C379.816,37.928 378.664,38.6426667 377.256,39.176 C375.848,39.7093333 374.162667,39.976 372.2,39.976 L372.072,39.976 C370.450667,39.976 368.808,39.6986667 367.144,39.144 C365.48,38.5893333 363.976,37.736 362.632,36.584 C361.288,35.432 360.189333,33.992 359.336,32.264 C358.482667,30.536 358.056,28.52 358.056,26.216 Z M366.12,25.768 C366.12,26.9626667 366.344,28.0186667 366.792,28.936 C367.24,29.8533333 367.826667,30.6213333 368.552,31.24 C369.277333,31.8586667 370.12,32.328 371.08,32.648 C372.04,32.968 373.032,33.128 374.056,33.128 C375.805333,33.128 377.32,32.8506667 378.6,32.296 C379.88,31.7413333 380.818667,31.0586667 381.416,30.248 C381.544,29.352 381.608,28.4986667 381.608,27.688 C381.608,26.4933333 381.437333,25.32 381.096,24.168 C380.754667,23.016 380.242667,21.992 379.56,21.096 C378.877333,20.2 378.024,19.4853333 377,18.952 C375.976,18.4186667 374.802667,18.152 373.48,18.152 C371.389333,18.152 369.64,18.824 368.232,20.168 C366.824,21.512 366.12,23.3786667 366.12,25.768 Z + + diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index 1a62e8b2..7196121e 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -15,6 +15,7 @@ + @@ -64,7 +65,7 @@ - + - + - + - + - + - + + + + diff --git a/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs b/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs new file mode 100644 index 00000000..a9dd4424 --- /dev/null +++ b/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs @@ -0,0 +1,193 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Shapes; +using System.Windows.Media.Animation; + +namespace Ink_Canvas +{ + /// + /// 最小化计时器窗口 + /// + public partial class MinimizedTimerWindow : Window + { + private SeewoStyleTimerWindow parentWindow; + private System.Timers.Timer updateTimer; + private bool isMouseOver = false; + + public MinimizedTimerWindow(SeewoStyleTimerWindow parent) + { + InitializeComponent(); + parentWindow = parent; + + // 设置窗口位置(在父窗口右下角) + this.Left = parent.Left + parent.Width - this.Width - 20; + this.Top = parent.Top + parent.Height - this.Height - 20; + + // 启动更新定时器 + updateTimer = new System.Timers.Timer(100); // 100ms更新一次 + updateTimer.Elapsed += UpdateTimer_Elapsed; + updateTimer.Start(); + + // 应用主题 + ApplyTheme(); + } + + private void UpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + { + if (parentWindow != null && parentWindow.IsTimerRunning) + { + Application.Current.Dispatcher.Invoke(() => + { + UpdateTimeDisplay(); + }); + } + } + + private void UpdateTimeDisplay() + { + if (parentWindow == null) return; + + // 获取剩余时间 + var remainingTime = parentWindow.GetRemainingTime(); + if (remainingTime.HasValue) + { + var timeSpan = remainingTime.Value; + int hours = (int)timeSpan.TotalHours; + int minutes = timeSpan.Minutes; + int seconds = timeSpan.Seconds; + + // 更新小时显示 + SetDigitDisplay("MinHour1Display", hours / 10); + SetDigitDisplay("MinHour2Display", hours % 10); + + // 更新分钟显示 + SetDigitDisplay("MinMinute1Display", minutes / 10); + SetDigitDisplay("MinMinute2Display", minutes % 10); + + // 更新秒显示 + SetDigitDisplay("MinSecond1Display", seconds / 10); + SetDigitDisplay("MinSecond2Display", seconds % 10); + } + } + + private void SetDigitDisplay(string pathName, int digit) + { + var path = this.FindName(pathName) as Path; + if (path != null) + { + string resourceKey = $"Digit{digit}"; + var geometry = this.FindResource(resourceKey) as Geometry; + if (geometry != null) + { + path.Data = geometry; + } + } + } + + private void ApplyTheme() + { + try + { + // 应用主题设置 + var mainWindow = Application.Current.MainWindow as MainWindow; + if (mainWindow != null) + { + bool isLightTheme = IsLightTheme(); + if (isLightTheme) + { + // 应用浅色主题 + this.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); + } + else + { + // 应用深色主题 + this.Background = new SolidColorBrush(Color.FromRgb(30, 30, 30)); + } + } + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($"应用主题时出错: {ex.Message}"); + } + } + + private bool IsLightTheme() + { + try + { + var mainWindow = Application.Current.MainWindow as MainWindow; + if (mainWindow != null) + { + var currentModeField = mainWindow.GetType().GetField("currentMode", + System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); + if (currentModeField != null) + { + var currentMode = currentModeField.GetValue(mainWindow); + return currentMode?.ToString() == "Light"; + } + } + } + catch + { + // 如果获取主题失败,默认使用浅色主题 + } + return true; + } + + private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + // 恢复主窗口 + if (parentWindow != null) + { + parentWindow.Show(); + parentWindow.Activate(); + parentWindow.WindowState = WindowState.Normal; + this.Close(); + } + } + + private void Window_MouseEnter(object sender, MouseEventArgs e) + { + isMouseOver = true; + // 鼠标进入时显示关闭按钮 + if (CloseButton != null) + { + CloseButton.Opacity = 1.0; + } + } + + private void Window_MouseLeave(object sender, MouseEventArgs e) + { + isMouseOver = false; + // 鼠标离开时隐藏关闭按钮 + if (CloseButton != null) + { + CloseButton.Opacity = 0.7; + } + } + + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + // 停止计时器并关闭窗口 + if (parentWindow != null) + { + parentWindow.StopTimer(); + } + this.Close(); + } + + protected override void OnClosed(EventArgs e) + { + // 清理资源 + if (updateTimer != null) + { + updateTimer.Stop(); + updateTimer.Dispose(); + } + base.OnClosed(e); + } + } +} diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml index a29dd8b3..f2e16510 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml @@ -9,6 +9,7 @@ Topmost="True" Background="Transparent" mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True" Loaded="Window_Loaded" Closing="Window_Closing" WindowStartupLocation="CenterScreen" + MouseMove="Window_MouseMove" MouseEnter="Window_MouseEnter" Title="Ink Canvas 画板 - 计时器" Height="450" Width="900"> diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs index 1404e69f..0ec5a515 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs @@ -26,6 +26,11 @@ namespace Ink_Canvas // 应用主题 ApplyTheme(); + + // 初始化隐藏定时器 + hideTimer = new Timer(1000); // 每秒检查一次 + hideTimer.Elapsed += HideTimer_Elapsed; + lastActivityTime = DateTime.Now; } @@ -86,6 +91,9 @@ namespace Ink_Canvas bool isPaused = false; Timer timer = new Timer(); + private Timer hideTimer; + private MinimizedTimerWindow minimizedWindow; + private DateTime lastActivityTime; // 最近计时记录 private string recentTimer1 = "--:--"; @@ -194,6 +202,70 @@ namespace Ink_Canvas SetDigitDisplay("Digit6Display", second % 10); } + private void HideTimer_Elapsed(object sender, ElapsedEventArgs e) + { + Application.Current.Dispatcher.Invoke(() => + { + // 只有在计时器运行时才检查自动隐藏 + if (isTimerRunning && !isPaused) + { + var timeSinceLastActivity = DateTime.Now - lastActivityTime; + if (timeSinceLastActivity.TotalSeconds >= 5) // 5秒无操作 + { + ShowMinimizedWindow(); + } + } + }); + } + + private void ShowMinimizedWindow() + { + if (minimizedWindow == null || !minimizedWindow.IsVisible) + { + minimizedWindow = new MinimizedTimerWindow(this); + minimizedWindow.Show(); + + // 隐藏主窗口 + this.Hide(); + } + } + + public void UpdateActivityTime() + { + lastActivityTime = DateTime.Now; + } + + public bool IsTimerRunning => isTimerRunning; + + public TimeSpan? GetRemainingTime() + { + if (!isTimerRunning || isPaused) return null; + + var elapsed = DateTime.Now - startTime; + var totalSeconds = hour * 3600 + minute * 60 + second; + var remaining = totalSeconds - elapsed.TotalSeconds; + + if (remaining <= 0) return TimeSpan.Zero; + return TimeSpan.FromSeconds(remaining); + } + + public void StopTimer() + { + timer.Stop(); + isTimerRunning = false; + StartPauseIcon.Data = Geometry.Parse(PlayIconData); + } + + private void Window_MouseMove(object sender, MouseEventArgs e) + { + UpdateActivityTime(); + } + + private void Window_MouseEnter(object sender, MouseEventArgs e) + { + UpdateActivityTime(); + } + /// /// 根据数字值设置SVG数字显示 /// @@ -453,6 +525,9 @@ namespace Ink_Canvas isPaused = false; isTimerRunning = true; timer.Start(); + + // 启动隐藏定时器 + hideTimer.Start(); // 保存到最近计时记录 SaveRecentTimer(); From f2b8d4014e227b46ae667390376e7389a00a5aba Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 19:46:14 +0800 Subject: [PATCH 49/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/MinimizedTimerWindow.xaml | 28 +++++----- .../Windows/MinimizedTimerWindow.xaml.cs | 56 ++++++++++++++++--- 2 files changed, 61 insertions(+), 23 deletions(-) diff --git a/Ink Canvas/Windows/MinimizedTimerWindow.xaml b/Ink Canvas/Windows/MinimizedTimerWindow.xaml index 6174cd7d..519d1397 100644 --- a/Ink Canvas/Windows/MinimizedTimerWindow.xaml +++ b/Ink Canvas/Windows/MinimizedTimerWindow.xaml @@ -7,9 +7,9 @@ xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" Topmost="True" Background="Transparent" mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True" - WindowStartupLocation="Manual" Title="计时器" Height="120" Width="300" - MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave" - ResizeMode="NoResize"> + WindowStartupLocation="Manual" Title="计时器" Height="120" Width="350" + MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseLeftButtonUp="Window_MouseLeftButtonUp" + MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave" MouseMove="Window_MouseMove"> @@ -33,18 +33,18 @@ + Margin="0,0,4,0"/> + Margin="0,0,4,0"/> + Margin="0,0,4,0"/> + Margin="0,0,4,0"/> + Margin="0,0,4,0"/> Date: Mon, 6 Oct 2025 19:56:00 +0800 Subject: [PATCH 50/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/MinimizedTimerWindow.xaml | 50 ++++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Ink Canvas/Windows/MinimizedTimerWindow.xaml b/Ink Canvas/Windows/MinimizedTimerWindow.xaml index 519d1397..139f8256 100644 --- a/Ink Canvas/Windows/MinimizedTimerWindow.xaml +++ b/Ink Canvas/Windows/MinimizedTimerWindow.xaml @@ -5,9 +5,9 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Ink_Canvas" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" - Topmost="True" Background="Transparent" + Topmost="True" Background="{DynamicResource SeewoTimerWindowBackground}" mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True" - WindowStartupLocation="Manual" Title="计时器" Height="120" Width="350" + WindowStartupLocation="Manual" Title="计时器" Height="200" Width="600" MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseLeftButtonUp="Window_MouseLeftButtonUp" MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave" MouseMove="Window_MouseMove"> @@ -15,76 +15,76 @@ - - + Margin="0" + UseLayoutRounding="True" + SnapsToDevicePixels="True"> - + + Margin="0,0,12,0"/> + Margin="0,0,12,0"/> - + Margin="0,0,12,0"/> + Margin="0,0,12,0"/> + Margin="0,0,12,0"/> - + Margin="0,0,12,0"/> + Margin="0,0,12,0"/> diff --git a/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs b/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs index 613e88e4..259f0b59 100644 --- a/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/MinimizedTimerWindow.xaml.cs @@ -13,13 +13,13 @@ namespace Ink_Canvas /// public partial class MinimizedTimerWindow : Window { - private SeewoStyleTimerWindow parentWindow; + private NewStyleTimerWindow parentWindow; private System.Timers.Timer updateTimer; private bool isMouseOver = false; private bool isDragging = false; private Point lastMousePosition; - public MinimizedTimerWindow(SeewoStyleTimerWindow parent) + public MinimizedTimerWindow(NewStyleTimerWindow parent) { InitializeComponent(); parentWindow = parent; @@ -41,14 +41,45 @@ namespace Ink_Canvas private void UpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { - if (parentWindow != null && parentWindow.IsTimerRunning) + if (parentWindow != null) { Application.Current.Dispatcher.Invoke(() => { + if (ShouldCloseWindow()) + { + this.Close(); + return; + } + UpdateTimeDisplay(); }); } } + + private bool ShouldCloseWindow() + { + if (parentWindow == null) return true; + + if (MainWindow.Settings.RandSettings?.EnableOvertimeCountUp == true) + { + if (parentWindow.IsTimerRunning) + { + return false; + } + + var remainingTime = parentWindow.GetRemainingTime(); + if (remainingTime.HasValue && remainingTime.Value.TotalSeconds < 0) + { + return false; + } + + return true; + } + else + { + return !parentWindow.IsTimerRunning; + } + } private void UpdateTimeDisplay() { @@ -59,21 +90,56 @@ namespace Ink_Canvas if (remainingTime.HasValue) { var timeSpan = remainingTime.Value; - int hours = (int)timeSpan.TotalHours; - int minutes = timeSpan.Minutes; - int seconds = timeSpan.Seconds; + bool isOvertimeMode = timeSpan.TotalSeconds < 0; + bool shouldShowRed = isOvertimeMode && MainWindow.Settings.RandSettings?.EnableOvertimeRedText == true; + + int hours, minutes, seconds; + + if (isOvertimeMode) + { + var totalTimeSpan = parentWindow.GetTotalTimeSpan(); + if (totalTimeSpan.HasValue) + { + var elapsedTime = parentWindow.GetElapsedTime(); + if (elapsedTime.HasValue) + { + var overtimeSpan = elapsedTime.Value - totalTimeSpan.Value; + hours = (int)overtimeSpan.TotalHours; + minutes = overtimeSpan.Minutes; + seconds = overtimeSpan.Seconds; + } + else + { + hours = 0; + minutes = 0; + seconds = 0; + } + } + else + { + hours = 0; + minutes = 0; + seconds = 0; + } + } + else + { + hours = (int)timeSpan.TotalHours; + minutes = timeSpan.Minutes; + seconds = timeSpan.Seconds; + } // 更新小时显示 - SetDigitDisplay("MinHour1Display", hours / 10); - SetDigitDisplay("MinHour2Display", hours % 10); + SetDigitDisplay("MinHour1Display", hours / 10, shouldShowRed); + SetDigitDisplay("MinHour2Display", hours % 10, shouldShowRed); // 更新分钟显示 - SetDigitDisplay("MinMinute1Display", minutes / 10); - SetDigitDisplay("MinMinute2Display", minutes % 10); + SetDigitDisplay("MinMinute1Display", minutes / 10, shouldShowRed); + SetDigitDisplay("MinMinute2Display", minutes % 10, shouldShowRed); // 更新秒显示 - SetDigitDisplay("MinSecond1Display", seconds / 10); - SetDigitDisplay("MinSecond2Display", seconds % 10); + SetDigitDisplay("MinSecond1Display", seconds / 10, shouldShowRed); + SetDigitDisplay("MinSecond2Display", seconds % 10, shouldShowRed); } } @@ -85,7 +151,7 @@ namespace Ink_Canvas }); } - private void SetDigitDisplay(string pathName, int digit) + private void SetDigitDisplay(string pathName, int digit, bool isRed = false) { var path = this.FindName(pathName) as Path; if (path != null) @@ -96,6 +162,25 @@ namespace Ink_Canvas { path.Data = geometry; } + + // 设置颜色 + if (isRed) + { + path.Fill = Brushes.Red; + } + else + { + var defaultBrush = this.FindResource("NewTimerWindowDigitForeground") as Brush; + if (defaultBrush != null) + { + path.Fill = defaultBrush; + } + else + { + bool isLightTheme = IsLightTheme(); + path.Fill = isLightTheme ? Brushes.Black : Brushes.White; + } + } } } diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs b/Ink Canvas/Windows/NewStyleTimerWindow.cs similarity index 88% rename from Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs rename to Ink Canvas/Windows/NewStyleTimerWindow.cs index 2db4858c..7ab97842 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml.cs +++ b/Ink Canvas/Windows/NewStyleTimerWindow.cs @@ -11,11 +11,11 @@ using System.Windows.Shapes; namespace Ink_Canvas { /// - /// 仿希沃风格的倒计时器窗口 + /// 新计时器UI风格的倒计时器窗口 /// - public partial class SeewoStyleTimerWindow : Window + public partial class NewStyleTimerWindow : Window { - public SeewoStyleTimerWindow() + public NewStyleTimerWindow() { InitializeComponent(); AnimationsHelper.ShowWithSlideFromBottomAndFade(this, 0.25); @@ -44,38 +44,65 @@ namespace Ink_Canvas TimeSpan timeSpan = DateTime.Now - startTime; TimeSpan totalTimeSpan = new TimeSpan(hour, minute, second); - TimeSpan leftTimeSpan = totalTimeSpan - timeSpan; - if (leftTimeSpan.Milliseconds > 0) leftTimeSpan += new TimeSpan(0, 0, 1); + double spentTimePercent = timeSpan.TotalMilliseconds / (totalTimeSpan.TotalMilliseconds); Application.Current.Dispatcher.Invoke(() => { - int totalHours = (int)leftTimeSpan.TotalHours; - int displayHours = totalHours; - - if (displayHours > 99) displayHours = 99; - - SetDigitDisplay("Digit1Display", displayHours / 10); - SetDigitDisplay("Digit2Display", displayHours % 10); - SetDigitDisplay("Digit3Display", leftTimeSpan.Minutes / 10); - SetDigitDisplay("Digit4Display", leftTimeSpan.Minutes % 10); - SetDigitDisplay("Digit5Display", leftTimeSpan.Seconds / 10); - SetDigitDisplay("Digit6Display", leftTimeSpan.Seconds % 10); - - if (leftTimeSpan.TotalSeconds <= 0) + if (!isOvertimeMode) { - SetDigitDisplay("Digit1Display", 0); - SetDigitDisplay("Digit2Display", 0); - SetDigitDisplay("Digit3Display", 0); - SetDigitDisplay("Digit4Display", 0); - SetDigitDisplay("Digit5Display", 0); - SetDigitDisplay("Digit6Display", 0); - timer.Stop(); - isTimerRunning = false; - StartPauseIcon.Data = Geometry.Parse(PlayIconData); - PlayTimerSound(); + TimeSpan leftTimeSpan = totalTimeSpan - timeSpan; + if (leftTimeSpan.Milliseconds > 0) leftTimeSpan += new TimeSpan(0, 0, 1); - TimerCompleted?.Invoke(this, EventArgs.Empty); - HandleTimerCompletion(); + int totalHours = (int)leftTimeSpan.TotalHours; + int displayHours = totalHours; + + if (displayHours > 99) displayHours = 99; + + SetDigitDisplay("Digit1Display", displayHours / 10); + SetDigitDisplay("Digit2Display", displayHours % 10); + SetDigitDisplay("Digit3Display", leftTimeSpan.Minutes / 10); + SetDigitDisplay("Digit4Display", leftTimeSpan.Minutes % 10); + SetDigitDisplay("Digit5Display", leftTimeSpan.Seconds / 10); + SetDigitDisplay("Digit6Display", leftTimeSpan.Seconds % 10); + + if (leftTimeSpan.TotalSeconds <= 0 && MainWindow.Settings.RandSettings?.EnableOvertimeCountUp == true) + { + isOvertimeMode = true; + PlayTimerSound(); + } + else if (leftTimeSpan.TotalSeconds <= 0) + { + SetDigitDisplay("Digit1Display", 0); + SetDigitDisplay("Digit2Display", 0); + SetDigitDisplay("Digit3Display", 0); + SetDigitDisplay("Digit4Display", 0); + SetDigitDisplay("Digit5Display", 0); + SetDigitDisplay("Digit6Display", 0); + timer.Stop(); + isTimerRunning = false; + StartPauseIcon.Data = Geometry.Parse(PlayIconData); + PlayTimerSound(); + + TimerCompleted?.Invoke(this, EventArgs.Empty); + HandleTimerCompletion(); + } + } + else + { + TimeSpan overtimeSpan = timeSpan - totalTimeSpan; + int totalHours = (int)overtimeSpan.TotalHours; + int displayHours = totalHours; + + if (displayHours > 99) displayHours = 99; + + bool shouldShowRed = MainWindow.Settings.RandSettings?.EnableOvertimeRedText == true; + + SetDigitDisplay("Digit1Display", displayHours / 10, shouldShowRed); + SetDigitDisplay("Digit2Display", displayHours % 10, shouldShowRed); + SetDigitDisplay("Digit3Display", overtimeSpan.Minutes / 10, shouldShowRed); + SetDigitDisplay("Digit4Display", overtimeSpan.Minutes % 10, shouldShowRed); + SetDigitDisplay("Digit5Display", overtimeSpan.Seconds / 10, shouldShowRed); + SetDigitDisplay("Digit6Display", overtimeSpan.Seconds % 10, shouldShowRed); } }); } @@ -92,6 +119,7 @@ namespace Ink_Canvas bool isTimerRunning = false; bool isPaused = false; + bool isOvertimeMode = false; TimeSpan remainingTime = TimeSpan.Zero; Timer timer = new Timer(); @@ -100,7 +128,18 @@ namespace Ink_Canvas private DateTime lastActivityTime; private bool isFullscreenMode = false; private FullscreenTimerWindow fullscreenWindow; - public event EventHandler TimerCompleted; + public event EventHandler TimerCompleted; + public TimeSpan? GetTotalTimeSpan() + { + return new TimeSpan(hour, minute, second); + } + + public TimeSpan? GetElapsedTime() + { + if (isPaused) return null; + + return DateTime.Now - startTime; + } // 最近计时记录 private string recentTimer1 = "--:--"; @@ -111,12 +150,12 @@ namespace Ink_Canvas private string recentTimer6 = "--:--"; // 最近计时记录的注册表键名 - private const string RecentTimer1Key = "SeewoTimer_RecentTimer1"; - private const string RecentTimer2Key = "SeewoTimer_RecentTimer2"; - private const string RecentTimer3Key = "SeewoTimer_RecentTimer3"; - private const string RecentTimer4Key = "SeewoTimer_RecentTimer4"; - private const string RecentTimer5Key = "SeewoTimer_RecentTimer5"; - private const string RecentTimer6Key = "SeewoTimer_RecentTimer6"; + private const string RecentTimer1Key = "NewTimer_RecentTimer1"; + private const string RecentTimer2Key = "NewTimer_RecentTimer2"; + private const string RecentTimer3Key = "NewTimer_RecentTimer3"; + private const string RecentTimer4Key = "NewTimer_RecentTimer4"; + private const string RecentTimer5Key = "NewTimer_RecentTimer5"; + private const string RecentTimer6Key = "NewTimer_RecentTimer6"; private void InitializeUI() { @@ -169,7 +208,7 @@ namespace Ink_Canvas } catch (Exception ex) { - LogHelper.WriteLogToFile($"应用仿希沃倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error); + LogHelper.WriteLogToFile($"应用新计时器UI倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error); } } @@ -202,7 +241,7 @@ namespace Ink_Canvas } catch (Exception ex) { - LogHelper.WriteLogToFile($"应用仿希沃倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error); + LogHelper.WriteLogToFile($"应用新计时器UI倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error); } } @@ -351,13 +390,12 @@ namespace Ink_Canvas public TimeSpan? GetRemainingTime() { - if (!isTimerRunning || isPaused) return null; + if (isPaused) return null; var elapsed = DateTime.Now - startTime; var totalSeconds = hour * 3600 + minute * 60 + second; var remaining = totalSeconds - elapsed.TotalSeconds; - if (remaining <= 0) return TimeSpan.Zero; return TimeSpan.FromSeconds(remaining); } @@ -383,7 +421,8 @@ namespace Ink_Canvas /// /// Path控件的名称 /// 要显示的数字(0-9) - private void SetDigitDisplay(string pathName, int digit) + /// 是否显示为红色 + private void SetDigitDisplay(string pathName, int digit, bool isRed = false) { var path = this.FindName(pathName) as Path; if (path != null) @@ -394,6 +433,23 @@ namespace Ink_Canvas { path.Data = geometry; } + + if (isRed) + { + path.Fill = Brushes.Red; + } + else + { + var defaultBrush = this.FindResource("NewTimerWindowDigitForeground") as Brush; + if (defaultBrush != null) + { + path.Fill = defaultBrush; + } + else + { + path.Fill = Brushes.White; + } + } } } @@ -636,6 +692,7 @@ namespace Ink_Canvas StartPauseIcon.Data = Geometry.Parse(PauseIconData); isPaused = false; isTimerRunning = true; + isOvertimeMode = false; timer.Start(); // 启动隐藏定时器 @@ -651,6 +708,7 @@ namespace Ink_Canvas if (!isTimerRunning) { UpdateDigitDisplays(); + isOvertimeMode = false; } else if (isTimerRunning && isPaused) { @@ -659,6 +717,7 @@ namespace Ink_Canvas isTimerRunning = false; timer.Stop(); isPaused = false; + isOvertimeMode = false; } else { @@ -1050,7 +1109,7 @@ namespace Ink_Canvas { try { - using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\SeewoTimer")) + using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\NewTimer")) { if (key != null) { @@ -1080,7 +1139,7 @@ namespace Ink_Canvas { try { - using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\SeewoTimer")) + using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\NewTimer")) { if (key != null) { diff --git a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml b/Ink Canvas/Windows/NewStyleTimerWindow.xaml similarity index 93% rename from Ink Canvas/Windows/SeewoStyleTimerWindow.xaml rename to Ink Canvas/Windows/NewStyleTimerWindow.xaml index f2e16510..20c4d90f 100644 --- a/Ink Canvas/Windows/SeewoStyleTimerWindow.xaml +++ b/Ink Canvas/Windows/NewStyleTimerWindow.xaml @@ -1,4 +1,4 @@ - - + - + + Foreground="{DynamicResource NewTimerWindowTitleForeground}" x:Name="TitleText"/> @@ -65,7 +65,7 @@ - @@ -469,7 +469,7 @@ - - - - - - @@ -626,7 +626,7 @@ - - - - - - @@ -713,7 +713,7 @@ - - - @@ -780,4 +780,4 @@ - + \ No newline at end of file From 04184cf731882b50062a995ecebf8430e22364d8 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sun, 12 Oct 2025 17:44:44 +0800 Subject: [PATCH 70/85] =?UTF-8?q?improve:=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/InkCanvasForClass.csproj | 1 + Ink Canvas/MainWindow.xaml | 29 +++++++++++ Ink Canvas/MainWindow.xaml.cs | 1 + Ink Canvas/MainWindow_cs/MW_Settings.cs | 36 +++++++++++++ Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs | 8 +++ Ink Canvas/Properties/Resources.Designer.cs | 9 ++++ Ink Canvas/Properties/Resources.resx | 3 ++ Ink Canvas/Resources/ProgressiveAudio.wav | Bin 0 -> 589902 bytes Ink Canvas/Resources/Settings.cs | 6 +++ Ink Canvas/Windows/NewStyleTimerWindow.cs | 48 ++++++++++++++++-- 10 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 Ink Canvas/Resources/ProgressiveAudio.wav diff --git a/Ink Canvas/InkCanvasForClass.csproj b/Ink Canvas/InkCanvasForClass.csproj index e7948a37..ac80bfbb 100644 --- a/Ink Canvas/InkCanvasForClass.csproj +++ b/Ink Canvas/InkCanvasForClass.csproj @@ -192,6 +192,7 @@ + diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index bb7d4bb9..76068083 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -3351,6 +3351,35 @@