diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index ab3f927a..17ef03bd 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -2408,6 +2408,23 @@ + + + + + + + + + + + diff --git a/Ink Canvas/MainWindow_cs/MW_AutoFold.cs b/Ink Canvas/MainWindow_cs/MW_AutoFold.cs index e9c244f9..3af8fcd1 100644 --- a/Ink Canvas/MainWindow_cs/MW_AutoFold.cs +++ b/Ink Canvas/MainWindow_cs/MW_AutoFold.cs @@ -218,6 +218,13 @@ namespace Ink_Canvas { await Task.Delay(0); await Dispatcher.InvokeAsync(() => { + // 根据设置决定是否自动切换至批注模式 + if (Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode && currentMode == 0) + { + // 切换至批注模式 + PenIcon_Click(null, null); + } + if (StackPanelPPTControls.Visibility == Visibility.Visible) { var dops = Settings.PowerPointSettings.PPTButtonsDisplayOption.ToString(); diff --git a/Ink Canvas/MainWindow_cs/MW_Settings.cs b/Ink Canvas/MainWindow_cs/MW_Settings.cs index 7b5e7b63..05c07f1b 100644 --- a/Ink Canvas/MainWindow_cs/MW_Settings.cs +++ b/Ink Canvas/MainWindow_cs/MW_Settings.cs @@ -1235,6 +1235,13 @@ namespace Ink_Canvas { else timerKillProcess.Stop(); } + + private void ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode_Toggled(object sender, RoutedEventArgs e) + { + if (!isLoaded) return; + Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode = ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode.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 4a4e365d..886c538d 100644 --- a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs +++ b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs @@ -706,6 +706,9 @@ namespace Ink_Canvas { ToggleSwitchAutoDelSavedFiles.IsOn = Settings.Automation.AutoDelSavedFiles; ComboBoxAutoDelSavedFilesDaysThreshold.Text = Settings.Automation.AutoDelSavedFilesDaysThreshold.ToString(); + + // 加载退出收纳模式自动切换至批注模式设置 + ToggleSwitchAutoEnterAnnotationModeWhenExitFoldMode.IsOn = Settings.Automation.IsAutoEnterAnnotationModeWhenExitFoldMode; } else { Settings.Automation = new Automation(); } diff --git a/Ink Canvas/Resources/Settings.cs b/Ink Canvas/Resources/Settings.cs index 906c658d..ea7eb78a 100644 --- a/Ink Canvas/Resources/Settings.cs +++ b/Ink Canvas/Resources/Settings.cs @@ -253,6 +253,9 @@ namespace Ink_Canvas || IsAutoFoldInYiYunVisualPresenter || IsAutoFoldInMaxHubWhiteboard; + [JsonProperty("isAutoEnterAnnotationModeWhenExitFoldMode")] + public bool IsAutoEnterAnnotationModeWhenExitFoldMode { get; set; } = false; + [JsonProperty("isAutoFoldInEasiNote")] public bool IsAutoFoldInEasiNote { get; set; } = false;