From ba0629000e27a673bc46e7de54a20d77f031e934 Mon Sep 17 00:00:00 2001
From: CJKmkp <2564608840@qq.com>
Date: Sat, 20 Sep 2025 11:22:09 +0800
Subject: [PATCH] =?UTF-8?q?add:=E9=80=80=E5=87=BA=E7=99=BD=E6=9D=BF?=
=?UTF-8?q?=E6=94=B6=E7=BA=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Ink Canvas/Helpers/PPTUIManager.cs | 2 +-
Ink Canvas/MainWindow.xaml | 9 +++++++++
.../MainWindow_cs/MW_FloatingBarIcons.cs | 6 ++++++
Ink Canvas/MainWindow_cs/MW_PPT.cs | 3 +++
Ink Canvas/MainWindow_cs/MW_Settings.cs | 7 +++++++
Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs | 3 +++
Ink Canvas/Resources/Settings.cs | 3 +++
...vasForClass.csproj.AssemblyReference.cache | Bin 38044 -> 38181 bytes
8 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/Ink Canvas/Helpers/PPTUIManager.cs b/Ink Canvas/Helpers/PPTUIManager.cs
index f1232ea8..f7646bbd 100644
--- a/Ink Canvas/Helpers/PPTUIManager.cs
+++ b/Ink Canvas/Helpers/PPTUIManager.cs
@@ -183,7 +183,7 @@ namespace Ink_Canvas.Helpers
_mainWindow.BtnPPTSlideShowEnd.Visibility == Visibility.Visible &&
isInSlideShow &&
hasValidPageCount &&
- !Settings.Automation.IsAutoFoldInPPTSlideShow;
+ !MainWindow.Settings.Automation.IsAutoFoldInPPTSlideShow;
if (!shouldShowButtons)
{
diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml
index 187411e7..58f62b04 100644
--- a/Ink Canvas/MainWindow.xaml
+++ b/Ink Canvas/MainWindow.xaml
@@ -3098,6 +3098,15 @@
Toggled="ToggleSwitchAutoFoldAfterPPTSlideShow_Toggled" />
+
+
+
+
+
diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs
index e15938e4..2fbcf730 100644
--- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs
+++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs
@@ -2808,6 +2808,12 @@ namespace Ink_Canvas
// 新增:在屏幕模式下恢复基础浮动栏的显示
ViewboxFloatingBar.Visibility = Visibility.Visible;
+ // 新增:退出白板时自动收纳功能
+ if (Settings.Automation.IsAutoFoldWhenExitWhiteboard && !isFloatingBarFolded)
+ {
+ FoldFloatingBar_MouseUp(null, null);
+ }
+
if (BtnSwitchTheme.Content.ToString() == "浅色")
{
BtnSwitch.Content = "黑板";
diff --git a/Ink Canvas/MainWindow_cs/MW_PPT.cs b/Ink Canvas/MainWindow_cs/MW_PPT.cs
index 366e0df3..94370fc5 100644
--- a/Ink Canvas/MainWindow_cs/MW_PPT.cs
+++ b/Ink Canvas/MainWindow_cs/MW_PPT.cs
@@ -700,6 +700,9 @@ namespace Ink_Canvas
if (Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow &&
!Settings.Automation.IsAutoFoldInPPTSlideShow)
{
+ // 先进入批注模式,这会显示调色盘
+ PenIcon_Click(null, null);
+ // 然后设置颜色
BtnColorRed_Click(null, null);
Dispatcher.BeginInvoke(new Action(() =>
{
diff --git a/Ink Canvas/MainWindow_cs/MW_Settings.cs b/Ink Canvas/MainWindow_cs/MW_Settings.cs
index fee71d5f..0d488220 100644
--- a/Ink Canvas/MainWindow_cs/MW_Settings.cs
+++ b/Ink Canvas/MainWindow_cs/MW_Settings.cs
@@ -1543,6 +1543,13 @@ namespace Ink_Canvas
SaveSettingsToFile();
}
+ private void ToggleSwitchAutoFoldWhenExitWhiteboard_Toggled(object sender, RoutedEventArgs e)
+ {
+ if (!isLoaded) return;
+ Settings.Automation.IsAutoFoldWhenExitWhiteboard = ToggleSwitchAutoFoldWhenExitWhiteboard.IsOn;
+ SaveSettingsToFile();
+ }
+
private void ToggleSwitchSaveScreenshotsInDateFolders_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 27ca8b51..b2e29494 100644
--- a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs
+++ b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs
@@ -907,6 +907,9 @@ namespace Ink_Canvas
// 加载退出收纳模式自动切换至批注模式设置
ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode.IsOn = Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode;
+
+ // 加载退出白板时自动收纳设置
+ ToggleSwitchAutoFoldWhenExitWhiteboard.IsOn = Settings.Automation.IsAutoFoldWhenExitWhiteboard;
}
else
{
diff --git a/Ink Canvas/Resources/Settings.cs b/Ink Canvas/Resources/Settings.cs
index d1997e4e..5e758505 100644
--- a/Ink Canvas/Resources/Settings.cs
+++ b/Ink Canvas/Resources/Settings.cs
@@ -339,6 +339,9 @@ namespace Ink_Canvas
[JsonProperty("isAutoEnterAnnotationModeWhenExitFoldMode")]
public bool IsAutoEnterAnnotationModeWhenExitFoldMode { get; set; }
+ [JsonProperty("isAutoFoldWhenExitWhiteboard")]
+ public bool IsAutoFoldWhenExitWhiteboard { get; set; }
+
[JsonProperty("isAutoFoldInEasiNote")]
public bool IsAutoFoldInEasiNote { get; set; }
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