From 15198c32ea1b7976124a71b3581ae9c4cbe58208 Mon Sep 17 00:00:00 2001 From: unknown <2564608840@qq.com> Date: Sun, 20 Jul 2025 21:14:59 +0800 Subject: [PATCH] =?UTF-8?q?improve:PPT=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/AssemblyInfo.cs | 4 ++-- Ink Canvas/MainWindow.xaml | 10 ++++++++++ Ink Canvas/MainWindow_cs/MW_PPT.cs | 7 +++++++ Ink Canvas/MainWindow_cs/MW_Settings.cs | 6 ++++++ Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs | 2 +- Ink Canvas/Properties/AssemblyInfo.cs | 4 ++-- Ink Canvas/Resources/Settings.cs | 2 ++ 7 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Ink Canvas/AssemblyInfo.cs b/Ink Canvas/AssemblyInfo.cs index 8b9e8ae7..6b93c545 100644 --- a/Ink Canvas/AssemblyInfo.cs +++ b/Ink Canvas/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.7.1.5")] -[assembly: AssemblyFileVersion("1.7.1.5")] +[assembly: AssemblyVersion("1.7.1.6")] +[assembly: AssemblyFileVersion("1.7.1.6")] diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index 57795b2c..d4040534 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -1190,6 +1190,16 @@ IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" Toggled="ToggleSwitchSupportWPS_Toggled" /> + + + + + + diff --git a/Ink Canvas/MainWindow_cs/MW_PPT.cs b/Ink Canvas/MainWindow_cs/MW_PPT.cs index f592c173..6ec9b909 100644 --- a/Ink Canvas/MainWindow_cs/MW_PPT.cs +++ b/Ink Canvas/MainWindow_cs/MW_PPT.cs @@ -1315,6 +1315,13 @@ namespace Ink_Canvas { return; } + if (!Settings.PowerPointSettings.EnableWppProcessKill) + { + LogHelper.WriteLogToFile("WPP进程查杀功能已被关闭,跳过查杀", LogHelper.LogType.Trace); + StopWppProcessCheckTimer(); + return; + } + // 刷新进程状态 wppProcess.Refresh(); wppProcessCheckCount++; diff --git a/Ink Canvas/MainWindow_cs/MW_Settings.cs b/Ink Canvas/MainWindow_cs/MW_Settings.cs index 494e1029..e888316f 100644 --- a/Ink Canvas/MainWindow_cs/MW_Settings.cs +++ b/Ink Canvas/MainWindow_cs/MW_Settings.cs @@ -2159,5 +2159,11 @@ namespace Ink_Canvas { dialog.Owner = this; dialog.ShowDialog(); } + + private void ToggleSwitchEnableWppProcessKill_Toggled(object sender, RoutedEventArgs e) { + if (!isLoaded) return; + Settings.PowerPointSettings.EnableWppProcessKill = ToggleSwitchEnableWppProcessKill.IsOn; + SaveSettingsToFile(); + } } } diff --git a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs index 5eb58242..3637ffbd 100644 --- a/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs +++ b/Ink Canvas/MainWindow_cs/MW_SettingsToLoad.cs @@ -375,6 +375,7 @@ namespace Ink_Canvas { ToggleSwitchAutoSaveScreenShotInPowerPoint.IsOn = Settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint; + ToggleSwitchEnableWppProcessKill.IsOn = Settings.PowerPointSettings.EnableWppProcessKill; } else { Settings.PowerPointSettings = new PowerPointSettings(); } @@ -548,7 +549,6 @@ namespace Ink_Canvas { // 初始化直线端点吸附相关设置 ToggleSwitchLineEndpointSnapping.IsOn = Settings.Canvas.LineEndpointSnapping; - LineEndpointSnappingThresholdSlider.Value = Settings.Canvas.LineEndpointSnappingThreshold; } else { Settings.Canvas = new Canvas(); } diff --git a/Ink Canvas/Properties/AssemblyInfo.cs b/Ink Canvas/Properties/AssemblyInfo.cs index 615034c4..e1fed332 100644 --- a/Ink Canvas/Properties/AssemblyInfo.cs +++ b/Ink Canvas/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.7.1.5")] -[assembly: AssemblyFileVersion("1.7.1.5")] +[assembly: AssemblyVersion("1.7.1.6")] +[assembly: AssemblyFileVersion("1.7.1.6")] diff --git a/Ink Canvas/Resources/Settings.cs b/Ink Canvas/Resources/Settings.cs index 5a96a5c2..53976b30 100644 --- a/Ink Canvas/Resources/Settings.cs +++ b/Ink Canvas/Resources/Settings.cs @@ -235,6 +235,8 @@ namespace Ink_Canvas public bool IsEnableFingerGestureSlideShowControl { get; set; } = true; [JsonProperty("isSupportWPS")] public bool IsSupportWPS { get; set; } = true; + [JsonProperty("enableWppProcessKill")] + public bool EnableWppProcessKill { get; set; } = true; } public class Automation