From 761992d089dd6b636999c34b18f8c65eb197f7b4 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sun, 26 Oct 2025 00:31:32 +0800 Subject: [PATCH 01/34] Delete PositionConverters.cs --- Ink Canvas/Converters/PositionConverters.cs | 35 --------------------- 1 file changed, 35 deletions(-) delete mode 100644 Ink Canvas/Converters/PositionConverters.cs diff --git a/Ink Canvas/Converters/PositionConverters.cs b/Ink Canvas/Converters/PositionConverters.cs deleted file mode 100644 index d97093e4..00000000 --- a/Ink Canvas/Converters/PositionConverters.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Ink_Canvas.Converters -{ - /// - /// 位置计算转换器 - /// - public class PositionConverters - { - /// - /// 减法转换器 - /// - public class SubtractConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is double baseValue && parameter is string paramStr) - { - if (double.TryParse(paramStr, out double subtractValue)) - { - return baseValue - subtractValue; - } - } - return value; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } - } -} From 10f55d5b6563b6486f8025daa865dafbdf3d38a8 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:45:41 +0800 Subject: [PATCH 02/34] =?UTF-8?q?fix:=E6=8A=BD=E9=80=89=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/NewStyleRollCallWindow.xaml | 201 +++++++++++------- 1 file changed, 121 insertions(+), 80 deletions(-) diff --git a/Ink Canvas/Windows/NewStyleRollCallWindow.xaml b/Ink Canvas/Windows/NewStyleRollCallWindow.xaml index 1a62ceef..85f7dc31 100644 --- a/Ink Canvas/Windows/NewStyleRollCallWindow.xaml +++ b/Ink Canvas/Windows/NewStyleRollCallWindow.xaml @@ -70,95 +70,135 @@ - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + @@ -212,6 +252,7 @@ Foreground="{DynamicResource NewRollCallWindowDigitForeground}" Width="60" TextAlignment="Center"/> + - - - - + + + + + + + + + @@ -447,29 +449,6 @@ - - From 16ae32bfd70e7445f57035869f1973dca19f9cf5 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sat, 1 Nov 2025 19:17:52 +0800 Subject: [PATCH 26/34] =?UTF-8?q?improve:=E7=82=B9=E5=90=8DUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Windows/NewStyleRollCallWindow.cs | 20 ++- Ink Canvas/Windows/QuickDrawFloatingButton.cs | 141 +++++++++++++++++- 2 files changed, 154 insertions(+), 7 deletions(-) diff --git a/Ink Canvas/Windows/NewStyleRollCallWindow.cs b/Ink Canvas/Windows/NewStyleRollCallWindow.cs index b560159f..bfe85d88 100644 --- a/Ink Canvas/Windows/NewStyleRollCallWindow.cs +++ b/Ink Canvas/Windows/NewStyleRollCallWindow.cs @@ -1197,6 +1197,13 @@ namespace Ink_Canvas { List usedNames = new List(); + // 确保动画期间主显示区域可见 + Application.Current.Dispatcher.Invoke(() => + { + MainResultDisplay.Visibility = Visibility.Visible; + MultiResultScrollViewer.Visibility = Visibility.Collapsed; + }); + for (int i = 0; i < animationTimes; i++) { // 随机选择一个名字进行动画显示 @@ -1207,6 +1214,8 @@ namespace Ink_Canvas Application.Current.Dispatcher.Invoke(() => { + // 确保主显示区域在动画期间保持可见 + MainResultDisplay.Visibility = Visibility.Visible; MainResultDisplay.Text = displayName; }); } @@ -1258,6 +1267,13 @@ namespace Ink_Canvas { List usedNumbers = new List(); + // 确保动画期间主显示区域可见 + Application.Current.Dispatcher.Invoke(() => + { + MainResultDisplay.Visibility = Visibility.Visible; + MultiResultScrollViewer.Visibility = Visibility.Collapsed; + }); + for (int i = 0; i < animationTimes; i++) { // 随机选择一个数字进行动画显示 @@ -1265,6 +1281,8 @@ namespace Ink_Canvas Application.Current.Dispatcher.Invoke(() => { + // 确保主显示区域在动画期间保持可见 + MainResultDisplay.Visibility = Visibility.Visible; MainResultDisplay.Text = randomNumber.ToString(); }); @@ -1280,7 +1298,7 @@ namespace Ink_Canvas // 更新历史记录 UpdateRollCallHistory(selectedNumbers); - // 显示结果 + // 显示结果(这里会根据结果数量决定显示主显示区域还是多结果区域) ShowResults(selectedNumbers); UpdateStatusDisplay($"抽选完成,共选择 {selectedNumbers.Count} 个数字"); diff --git a/Ink Canvas/Windows/QuickDrawFloatingButton.cs b/Ink Canvas/Windows/QuickDrawFloatingButton.cs index 50d96931..6c5360bd 100644 --- a/Ink Canvas/Windows/QuickDrawFloatingButton.cs +++ b/Ink Canvas/Windows/QuickDrawFloatingButton.cs @@ -31,6 +31,13 @@ namespace Ink_Canvas // 应用置顶 ApplyFloatingButtonTopmost(); + + // 如果主窗口在无焦点模式下,启动置顶维护 + if (MainWindow.Settings?.Advanced?.IsNoFocusMode == true && + MainWindow.Settings?.Advanced?.EnableUIAccessTopMost != true) + { + StartTopmostMaintenance(); + } } private void SetPositionToBottomRight() @@ -78,15 +85,39 @@ namespace Ink_Canvas [DllImport("user32.dll")] private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); + [DllImport("user32.dll")] + private static extern bool IsWindow(IntPtr hWnd); + + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool IsWindowVisible(IntPtr hWnd); + + [DllImport("user32.dll")] + private static extern bool IsIconic(IntPtr hWnd); + + [DllImport("user32.dll")] + private static extern IntPtr GetForegroundWindow(); + + [DllImport("user32.dll")] + private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId); + + [DllImport("kernel32.dll")] + private static extern uint GetCurrentProcessId(); + private const int GWL_EXSTYLE = -20; private const int WS_EX_TOPMOST = 0x00000008; private static readonly IntPtr HWND_TOPMOST = new IntPtr(-1); + private static readonly IntPtr HWND_NOTOPMOST = new IntPtr(-2); private const uint SWP_NOMOVE = 0x0002; private const uint SWP_NOSIZE = 0x0001; private const uint SWP_NOACTIVATE = 0x0010; private const uint SWP_SHOWWINDOW = 0x0040; private const uint SWP_NOOWNERZORDER = 0x0200; + // 添加定时器来维护置顶状态 + private DispatcherTimer topmostMaintenanceTimer; + private bool isTopmostMaintenanceEnabled; + /// /// 应用悬浮按钮置顶 /// @@ -96,11 +127,6 @@ namespace Ink_Canvas { var hwnd = new WindowInteropHelper(this).Handle; if (hwnd == IntPtr.Zero) return; - - // 强制激活窗口 - Activate(); - Focus(); - // 设置WPF的Topmost属性 Topmost = true; @@ -113,13 +139,116 @@ namespace Ink_Canvas SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_SHOWWINDOW | SWP_NOOWNERZORDER); - LogHelper.WriteLogToFile("快抽悬浮按钮已应用置顶", LogHelper.LogType.Trace); } catch (Exception ex) { LogHelper.WriteLogToFile($"应用快抽悬浮按钮置顶失败: {ex.Message}", LogHelper.LogType.Error); } } + + /// + /// 启动置顶维护定时器 + /// + private void StartTopmostMaintenance() + { + if (MainWindow.Settings?.Advanced?.EnableUIAccessTopMost == true) + { + return; + } + + if (isTopmostMaintenanceEnabled) return; + + if (topmostMaintenanceTimer == null) + { + topmostMaintenanceTimer = new DispatcherTimer(); + topmostMaintenanceTimer.Interval = TimeSpan.FromMilliseconds(500); // 每500ms检查一次 + topmostMaintenanceTimer.Tick += TopmostMaintenanceTimer_Tick; + } + + topmostMaintenanceTimer.Start(); + isTopmostMaintenanceEnabled = true; + } + + /// + /// 停止置顶维护定时器 + /// + private void StopTopmostMaintenance() + { + if (topmostMaintenanceTimer != null && isTopmostMaintenanceEnabled) + { + topmostMaintenanceTimer.Stop(); + isTopmostMaintenanceEnabled = false; + } + } + + /// + /// 置顶维护定时器事件 + /// + private void TopmostMaintenanceTimer_Tick(object sender, EventArgs e) + { + try + { + if (MainWindow.Settings?.Advanced?.EnableUIAccessTopMost == true) + { + StopTopmostMaintenance(); + return; + } + + if (MainWindow.Settings?.Advanced?.IsNoFocusMode != true) + { + StopTopmostMaintenance(); + return; + } + + var hwnd = new WindowInteropHelper(this).Handle; + if (hwnd == IntPtr.Zero) return; + + // 检查窗口是否仍然可见且不是最小化状态 + if (!IsWindow(hwnd) || !IsWindowVisible(hwnd) || IsIconic(hwnd)) + { + return; + } + + // 检查是否有子窗口在前景 + var foregroundWindow = GetForegroundWindow(); + if (foregroundWindow != hwnd) + { + // 检查前景窗口是否是当前应用程序的子窗口 + var foregroundWindowProcessId = GetWindowThreadProcessId(foregroundWindow, out uint processId); + var currentProcessId = GetCurrentProcessId(); + + if (processId == currentProcessId) + { + // 如果有子窗口在前景,暂停置顶维护 + return; + } + + // 如果窗口不在最顶层且没有子窗口,重新设置置顶 + SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_SHOWWINDOW | SWP_NOOWNERZORDER); + + // 确保窗口样式正确 + int exStyle = GetWindowLong(hwnd, GWL_EXSTYLE); + if ((exStyle & WS_EX_TOPMOST) == 0) + { + SetWindowLong(hwnd, GWL_EXSTYLE, exStyle | WS_EX_TOPMOST); + } + } + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"快抽悬浮按钮置顶维护定时器出错: {ex.Message}", LogHelper.LogType.Error); + } + } + + /// + /// 窗口关闭时停止置顶维护定时器 + /// + protected override void OnClosed(EventArgs e) + { + StopTopmostMaintenance(); + base.OnClosed(e); + } #endregion } } From 8394e99127c932a397287864398b3f73c3af1b24 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sat, 1 Nov 2025 20:26:52 +0800 Subject: [PATCH 27/34] =?UTF-8?q?improve:=E4=B8=BB=E9=A2=98=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/InkCanvasForClass.csproj | 1 + Ink Canvas/MainWindow.xaml | 2 +- Ink Canvas/MainWindow_cs/MW_AutoTheme.cs | 21 +++++++++++++++++++ .../MainWindow_cs/MW_FloatingBarIcons.cs | 9 +++----- Ink Canvas/Resources/Styles/Dark.xaml | 4 ++++ Ink Canvas/Resources/Styles/Light.xaml | 4 ++++ 6 files changed, 34 insertions(+), 7 deletions(-) diff --git a/Ink Canvas/InkCanvasForClass.csproj b/Ink Canvas/InkCanvasForClass.csproj index 1c25b961..921824a8 100644 --- a/Ink Canvas/InkCanvasForClass.csproj +++ b/Ink Canvas/InkCanvasForClass.csproj @@ -421,6 +421,7 @@ + diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index c9d0d120..93032d3e 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -9434,7 +9434,7 @@ MouseUp="TwoFingerGestureBorder_MouseUp" Background="Transparent" Orientation="Vertical" HorizontalAlignment="Center" Width="36" Margin="0"> - + /// 刷新手势按钮图标 + /// + private void RefreshGestureButtonIcon() + { + try + { + // 调用手势按钮颜色和图标更新方法,该方法会根据当前主题和手势状态设置正确的图标 + CheckEnableTwoFingerGestureBtnColorPrompt(); + } + catch (Exception) + { + } + } + /// /// 刷新其他窗口的主题 /// diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 38b9ca94..c9bd64db 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -80,8 +80,7 @@ namespace Ink_Canvas // 多指书写模式启用时,手势功能被禁用 TwoFingerGestureSimpleStackPanel.Opacity = 0.5; TwoFingerGestureSimpleStackPanel.IsHitTestVisible = false; - EnableTwoFingerGestureBtn.Source = - new BitmapImage(new Uri("/Resources/new-icons/gesture.png", UriKind.Relative)); + EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIcon"); // 根据主题设置颜色 if (Settings.Appearance.Theme == 1) // 深色主题 @@ -117,8 +116,7 @@ namespace Ink_Canvas if (hasGestureEnabled) { - EnableTwoFingerGestureBtn.Source = - new BitmapImage(new Uri("/Resources/new-icons/gesture-enabled.png", UriKind.Relative)); + EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIconEnabled"); BoardGesture.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235)); BoardGestureGeometry.Brush = new SolidColorBrush(Colors.GhostWhite); @@ -130,8 +128,7 @@ namespace Ink_Canvas } else { - EnableTwoFingerGestureBtn.Source = - new BitmapImage(new Uri("/Resources/new-icons/gesture.png", UriKind.Relative)); + EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIcon"); // 根据主题设置颜色 if (Settings.Appearance.Theme == 1) // 深色主题 diff --git a/Ink Canvas/Resources/Styles/Dark.xaml b/Ink Canvas/Resources/Styles/Dark.xaml index b9761ed8..a6cd8bf9 100644 --- a/Ink Canvas/Resources/Styles/Dark.xaml +++ b/Ink Canvas/Resources/Styles/Dark.xaml @@ -145,4 +145,8 @@ + + + + \ No newline at end of file diff --git a/Ink Canvas/Resources/Styles/Light.xaml b/Ink Canvas/Resources/Styles/Light.xaml index 056d21bf..8f48ff49 100644 --- a/Ink Canvas/Resources/Styles/Light.xaml +++ b/Ink Canvas/Resources/Styles/Light.xaml @@ -145,4 +145,8 @@ + + + + \ No newline at end of file From 0d790bbd80fe8557350c91adc1247fdcb5d89510 Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sat, 1 Nov 2025 20:42:18 +0800 Subject: [PATCH 28/34] =?UTF-8?q?add:=E5=A2=A8=E8=BF=B9=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow.xaml | 24 +++++++++ Ink Canvas/MainWindow.xaml.cs | 1 + Ink Canvas/MainWindow_cs/MW_Settings.cs | 23 +++++++++ Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs | 17 +++++++ Ink Canvas/MainWindow_cs/MW_Timer.cs | 50 +++++++++++++++++++ Ink Canvas/Resources/Settings.cs | 6 +++ 6 files changed, 121 insertions(+) diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index 93032d3e..d910da66 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -3083,6 +3083,30 @@ Toggled="ToggleSwitchAutoSaveStrokesAtScreenshot_Toggled" /> + + + + + + + + + + + + + + + + + + diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index d0f2ceaf..5e9b8d14 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -1853,6 +1853,7 @@ namespace Ink_Canvas // 添加定时器来维护置顶状态 private DispatcherTimer topmostMaintenanceTimer; + private DispatcherTimer autoSaveStrokesTimer; private bool isTopmostMaintenanceEnabled; private void ApplyNoFocusMode() diff --git a/Ink Canvas/MainWindow_cs/MW_Settings.cs b/Ink Canvas/MainWindow_cs/MW_Settings.cs index 4624ac44..9f7b9907 100644 --- a/Ink Canvas/MainWindow_cs/MW_Settings.cs +++ b/Ink Canvas/MainWindow_cs/MW_Settings.cs @@ -1877,6 +1877,29 @@ namespace Ink_Canvas SaveSettingsToFile(); } + private void ToggleSwitchEnableAutoSaveStrokes_Toggled(object sender, RoutedEventArgs e) + { + if (!isLoaded) return; + Settings.Automation.IsEnableAutoSaveStrokes = ToggleSwitchEnableAutoSaveStrokes.IsOn; + SaveSettingsToFile(); + // 更新定时器状态 + UpdateAutoSaveStrokesTimer(); + } + + private void ComboBoxAutoSaveStrokesInterval_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (!isLoaded || ComboBoxAutoSaveStrokesInterval.SelectedItem == null) return; + + var selectedItem = ComboBoxAutoSaveStrokesInterval.SelectedItem as System.Windows.Controls.ComboBoxItem; + if (selectedItem?.Tag != null && int.TryParse(selectedItem.Tag.ToString(), out int intervalMinutes)) + { + Settings.Automation.AutoSaveStrokesIntervalMinutes = intervalMinutes; + SaveSettingsToFile(); + // 更新定时器间隔 + UpdateAutoSaveStrokesTimer(); + } + } + #endregion #region Gesture diff --git a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs index 85e8ec86..0e51b58f 100644 --- a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs +++ b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs @@ -1053,6 +1053,23 @@ namespace Ink_Canvas ToggleSwitchSaveFullPageStrokes.IsOn = Settings.Automation.IsSaveFullPageStrokes; + // 加载定时保存墨迹设置 + ToggleSwitchEnableAutoSaveStrokes.IsOn = Settings.Automation.IsEnableAutoSaveStrokes; + // 初始化保存间隔下拉框 + if (ComboBoxAutoSaveStrokesInterval != null) + { + int intervalMinutes = Settings.Automation.AutoSaveStrokesIntervalMinutes; + if (intervalMinutes < 1) intervalMinutes = 5; // 默认5分钟 + foreach (System.Windows.Controls.ComboBoxItem item in ComboBoxAutoSaveStrokesInterval.Items) + { + if (item.Tag != null && int.TryParse(item.Tag.ToString(), out int tagValue) && tagValue == intervalMinutes) + { + ComboBoxAutoSaveStrokesInterval.SelectedItem = item; + break; + } + } + } + SideControlMinimumAutomationSlider.Value = Settings.Automation.MinimumAutomationStrokeNumber; AutoSavedStrokesLocation.Text = Settings.Automation.AutoSavedStrokesLocation; diff --git a/Ink Canvas/MainWindow_cs/MW_Timer.cs b/Ink Canvas/MainWindow_cs/MW_Timer.cs index afb21c29..3de74f33 100644 --- a/Ink Canvas/MainWindow_cs/MW_Timer.cs +++ b/Ink Canvas/MainWindow_cs/MW_Timer.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using System.Timers; using System.Windows; using System.Windows.Controls; +using System.Windows.Threading; namespace Ink_Canvas { @@ -148,6 +149,55 @@ namespace Ink_Canvas LogHelper.WriteLogToFile($"程序启动时NTP同步失败: {ex.Message}", LogHelper.LogType.Error); } }); + + // 初始化定时保存墨迹定时器 + InitAutoSaveStrokesTimer(); + } + + // 初始化定时保存墨迹定时器 + private void InitAutoSaveStrokesTimer() + { + if (autoSaveStrokesTimer == null) + { + autoSaveStrokesTimer = new DispatcherTimer(); + autoSaveStrokesTimer.Tick += AutoSaveStrokesTimer_Tick; + } + + // 根据设置更新定时器间隔和启动状态 + UpdateAutoSaveStrokesTimer(); + } + + // 更新定时保存墨迹定时器状态 + private void UpdateAutoSaveStrokesTimer() + { + if (autoSaveStrokesTimer == null) return; + + autoSaveStrokesTimer.Stop(); + + if (Settings.Automation.IsEnableAutoSaveStrokes) + { + int intervalMinutes = Settings.Automation.AutoSaveStrokesIntervalMinutes; + if (intervalMinutes < 1) intervalMinutes = 1; // 最小间隔1分钟 + autoSaveStrokesTimer.Interval = TimeSpan.FromMinutes(intervalMinutes); + autoSaveStrokesTimer.Start(); + } + } + + // 定时保存墨迹定时器事件处理 + private void AutoSaveStrokesTimer_Tick(object sender, EventArgs e) + { + try + { + // 只有在画布可见且有墨迹时才保存 + if (inkCanvas.Visibility == Visibility.Visible && inkCanvas.Strokes.Count > 0) + { + // 静默保存 + SaveInkCanvasStrokes(false, false); + } + } + catch (Exception) + { + } } // NTP同步定时器事件处理 diff --git a/Ink Canvas/Resources/Settings.cs b/Ink Canvas/Resources/Settings.cs index 395ea46d..ed819bd1 100644 --- a/Ink Canvas/Resources/Settings.cs +++ b/Ink Canvas/Resources/Settings.cs @@ -462,6 +462,12 @@ namespace Ink_Canvas [JsonProperty("isAutoEnterAnnotationAfterKillHite")] public bool IsAutoEnterAnnotationAfterKillHite { get; set; } + [JsonProperty("isEnableAutoSaveStrokes")] + public bool IsEnableAutoSaveStrokes { get; set; } = true; + + [JsonProperty("autoSaveStrokesIntervalMinutes")] + public int AutoSaveStrokesIntervalMinutes { get; set; } = 5; + [JsonProperty("floatingWindowInterceptor")] public FloatingWindowInterceptorSettings FloatingWindowInterceptor { get; set; } = new FloatingWindowInterceptorSettings(); } From b7bff30445c5d5d3ff04a5ca7d9d2b6c2834909d Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sat, 1 Nov 2025 20:49:37 +0800 Subject: [PATCH 29/34] improve:UI --- Ink Canvas/MainWindow.xaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index d910da66..32a65bc6 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -2824,17 +2824,11 @@ TextWrapping="Wrap" Foreground="#a1a1aa" Margin="0,0,0,8" />