From eb1aaa10e41900c0cc472bfcc8ccceaeb248020d Mon Sep 17 00:00:00 2001 From: PrefacedCorg <1876568293@qq.com> Date: Sat, 13 Dec 2025 19:27:47 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=99=BD?= =?UTF-8?q?=E6=9D=BF=E6=A8=A1=E5=BC=8F=E8=87=AA=E5=8A=A8=E5=85=A8=E5=B1=8F?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增"白板模式自动全屏"设置选项 - 进入白板模式时自动全屏,退出时恢复工作区域大小 - 需配合"避免全屏助手"功能使用 - 用户可独立控制白板模式的全屏行为 --- .kiro/steering/chinese-communication.md | 27 +++++++++++++++++ .vscode/settings.json | 3 ++ Ink Canvas/MainWindow.xaml | 13 +++++++++ .../MainWindow_cs/MW_FloatingBarIcons.cs | 29 +++++++++++++++++++ Ink Canvas/MainWindow_cs/MW_Settings.cs | 8 +++++ Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs | 1 + Ink Canvas/Resources/Settings.cs | 3 ++ 7 files changed, 84 insertions(+) create mode 100644 .kiro/steering/chinese-communication.md create mode 100644 .vscode/settings.json diff --git a/.kiro/steering/chinese-communication.md b/.kiro/steering/chinese-communication.md new file mode 100644 index 00000000..f4f13931 --- /dev/null +++ b/.kiro/steering/chinese-communication.md @@ -0,0 +1,27 @@ +--- +inclusion: always +--- + +# 中文交流规则 + +当用户使用中文与Kiro交流时,请遵循以下规则: + +## 语言使用 +- 始终使用中文回复用户的中文消息 +- 保持自然、友好的中文表达方式 +- 使用适合开发者的技术术语和表达 + +## 交流风格 +- 保持专业但不失亲和力的语调 +- 使用简洁明了的表达方式 +- 避免过于正式或生硬的表达 + +## 技术内容 +- 代码注释可以使用中文 +- 变量名和函数名仍使用英文(遵循编程规范) +- 技术解释使用中文,但保留英文技术术语的准确性 + +## 文档和说明 +- 创建的文档可以使用中文 +- README文件可以提供中文版本 +- 错误信息和日志可以包含中文说明 \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..5480842b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "kiroAgent.configureMCP": "Disabled" +} \ No newline at end of file diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index 0dfdea6a..6f16e824 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -2246,6 +2246,19 @@ + + + + + + + + + { + // 退出白板模式,恢复到工作区域大小 + var workingArea = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea; + MainWindow.MoveWindow(new WindowInteropHelper(this).Handle, + workingArea.Left, workingArea.Top, + workingArea.Width, workingArea.Height, true); + }), DispatcherPriority.ApplicationIdle); + } + // 在屏幕模式下恢复基础浮动栏的显示 ViewboxFloatingBar.Visibility = Visibility.Visible; @@ -3068,6 +3084,19 @@ namespace Ink_Canvas RestoreStrokes(); + // 进入白板模式时全屏 + if (Settings.Advanced.IsEnableAvoidFullScreenHelper && Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard) + { + // 设置为画板模式,允许全屏操作 + AvoidFullScreenHelper.SetBoardMode(true); + Dispatcher.BeginInvoke(new Action(() => + { + MainWindow.MoveWindow(new WindowInteropHelper(this).Handle, 0, 0, + System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, + System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height, true); + }), DispatcherPriority.ApplicationIdle); + } + ViewboxFloatingBar.Visibility = Visibility.Collapsed; BtnSwitch.Content = "屏幕"; diff --git a/Ink Canvas/MainWindow_cs/MW_Settings.cs b/Ink Canvas/MainWindow_cs/MW_Settings.cs index 033d48f3..65ec7dbd 100644 --- a/Ink Canvas/MainWindow_cs/MW_Settings.cs +++ b/Ink Canvas/MainWindow_cs/MW_Settings.cs @@ -2182,6 +2182,7 @@ namespace Ink_Canvas Settings.Advanced.EdgeGestureUtilOnlyAffectBlackboardMode = false; Settings.Advanced.IsEnableFullScreenHelper = false; Settings.Advanced.IsEnableAvoidFullScreenHelper = false; + Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard = false; Settings.Advanced.IsEnableForceFullScreen = false; Settings.Advanced.IsEnableDPIChangeDetection = false; Settings.Advanced.IsEnableResolutionChangeDetection = false; @@ -2442,6 +2443,13 @@ namespace Ink_Canvas } } + private void ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard_OnToggled(object sender, RoutedEventArgs e) + { + if (!isLoaded) return; + Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard = ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard.IsOn; + SaveSettingsToFile(); + } + private void ToggleSwitchIsEnableEdgeGestureUtil_Toggled(object sender, RoutedEventArgs e) { if (!isLoaded) return; diff --git a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs index 76c46951..6cd6f5e1 100644 --- a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs +++ b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs @@ -805,6 +805,7 @@ namespace Ink_Canvas ToggleSwitchIsEnableResolutionChangeDetection.IsOn = Settings.Advanced.IsEnableResolutionChangeDetection; ToggleSwitchIsEnableDPIChangeDetection.IsOn = Settings.Advanced.IsEnableDPIChangeDetection; ToggleSwitchIsEnableAvoidFullScreenHelper.IsOn = Settings.Advanced.IsEnableAvoidFullScreenHelper; + ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard.IsOn = Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard; ToggleSwitchIsAutoBackupBeforeUpdate.IsOn = Settings.Advanced.IsAutoBackupBeforeUpdate; ToggleSwitchIsAutoBackupEnabled.IsOn = Settings.Advanced.IsAutoBackupEnabled; diff --git a/Ink Canvas/Resources/Settings.cs b/Ink Canvas/Resources/Settings.cs index 27a54c41..970f2aba 100644 --- a/Ink Canvas/Resources/Settings.cs +++ b/Ink Canvas/Resources/Settings.cs @@ -582,6 +582,9 @@ namespace Ink_Canvas [JsonProperty("isEnableAvoidFullScreenHelper")] public bool IsEnableAvoidFullScreenHelper { get; set; } + [JsonProperty("isEnableAvoidFullScreenHelperForWhiteboard")] + public bool IsEnableAvoidFullScreenHelperForWhiteboard { get; set; } + [JsonProperty("isAutoBackupBeforeUpdate")] public bool IsAutoBackupBeforeUpdate { get; set; } = true; From 545425c4d3c412a2a6ae01f2df372c274dc2f209 Mon Sep 17 00:00:00 2001 From: PrefacedCorg <129855423+PrefacedCorg@users.noreply.github.com> Date: Sat, 13 Dec 2025 19:38:34 +0800 Subject: [PATCH 2/5] Delete .kiro/steering directory --- .kiro/steering/chinese-communication.md | 27 ------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .kiro/steering/chinese-communication.md diff --git a/.kiro/steering/chinese-communication.md b/.kiro/steering/chinese-communication.md deleted file mode 100644 index f4f13931..00000000 --- a/.kiro/steering/chinese-communication.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -inclusion: always ---- - -# 中文交流规则 - -当用户使用中文与Kiro交流时,请遵循以下规则: - -## 语言使用 -- 始终使用中文回复用户的中文消息 -- 保持自然、友好的中文表达方式 -- 使用适合开发者的技术术语和表达 - -## 交流风格 -- 保持专业但不失亲和力的语调 -- 使用简洁明了的表达方式 -- 避免过于正式或生硬的表达 - -## 技术内容 -- 代码注释可以使用中文 -- 变量名和函数名仍使用英文(遵循编程规范) -- 技术解释使用中文,但保留英文技术术语的准确性 - -## 文档和说明 -- 创建的文档可以使用中文 -- README文件可以提供中文版本 -- 错误信息和日志可以包含中文说明 \ No newline at end of file From cb7a76efc58a73827889982f41476e8f41d0b51c Mon Sep 17 00:00:00 2001 From: PrefacedCorg <129855423+PrefacedCorg@users.noreply.github.com> Date: Sat, 13 Dec 2025 19:39:08 +0800 Subject: [PATCH 3/5] Delete .vscode directory --- .vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 5480842b..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "kiroAgent.configureMCP": "Disabled" -} \ No newline at end of file From 86c22d373a668fa664919919b4df8a4536c281a3 Mon Sep 17 00:00:00 2001 From: PrefacedCorg <1876568293@qq.com> Date: Sat, 13 Dec 2025 19:48:21 +0800 Subject: [PATCH 4/5] =?UTF-8?q?Revert=20"feat:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=99=BD=E6=9D=BF=E6=A8=A1=E5=BC=8F=E8=87=AA=E5=8A=A8=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E5=8A=9F=E8=83=BD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow.xaml | 13 ------------- Ink Canvas/MainWindow_cs/MW_Settings.cs | 8 -------- Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs | 1 - Ink Canvas/Resources/Settings.cs | 3 --- 4 files changed, 25 deletions(-) diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index 6f16e824..0dfdea6a 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -2246,19 +2246,6 @@ - - - - - - - - Date: Sat, 13 Dec 2025 19:54:10 +0800 Subject: [PATCH 5/5] Update MW_FloatingBarIcons.cs --- Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 8ef81cbf..1e0eeeca 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -3016,7 +3016,7 @@ namespace Ink_Canvas RestoreStrokes(true); // 退出白板模式时取消全屏 - if (Settings.Advanced.IsEnableAvoidFullScreenHelper && Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard) + if (Settings.Advanced.IsEnableAvoidFullScreenHelper) { // 恢复为非画板模式,重新启用全屏限制 AvoidFullScreenHelper.SetBoardMode(false); @@ -3085,7 +3085,7 @@ namespace Ink_Canvas RestoreStrokes(); // 进入白板模式时全屏 - if (Settings.Advanced.IsEnableAvoidFullScreenHelper && Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard) + if (Settings.Advanced.IsEnableAvoidFullScreenHelper) { // 设置为画板模式,允许全屏操作 AvoidFullScreenHelper.SetBoardMode(true);