From e0b024d671bf50806c97f35b0bba978a42471ebf Mon Sep 17 00:00:00 2001 From: ChanginJolly Date: Wed, 15 May 2024 23:41:29 +0800 Subject: [PATCH] [fix] IsNotifyAutoPlayPresentation --- AutomaticUpdateVersionControl.txt | 2 +- Ink Canvas/MainWindow_cs/MW_PPT.cs | 29 ++++++++++++++++-------- Ink Canvas/MainWindow_cs/MW_PenColors.cs | 2 +- Ink Canvas/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/AutomaticUpdateVersionControl.txt b/AutomaticUpdateVersionControl.txt index 0b87099c..4178d093 100644 --- a/AutomaticUpdateVersionControl.txt +++ b/AutomaticUpdateVersionControl.txt @@ -1 +1 @@ -4.7.2 \ No newline at end of file +4.7.3 \ No newline at end of file diff --git a/Ink Canvas/MainWindow_cs/MW_PPT.cs b/Ink Canvas/MainWindow_cs/MW_PPT.cs index d142b1cc..260c341b 100644 --- a/Ink Canvas/MainWindow_cs/MW_PPT.cs +++ b/Ink Canvas/MainWindow_cs/MW_PPT.cs @@ -15,6 +15,7 @@ using Application = System.Windows.Application; using File = System.IO.File; using MessageBox = System.Windows.MessageBox; +using Microsoft.Office.Core; namespace Ink_Canvas { public partial class MainWindow : Window { @@ -175,17 +176,25 @@ private void TimerCheckPPT_Elapsed(object sender, ElapsedEventArgs e) { //检测是否有自动播放 if (Settings.PowerPointSettings.IsNotifyAutoPlayPresentation - && presentation.SlideShowSettings.AdvanceMode == PpSlideShowAdvanceMode.ppSlideShowUseSlideTimings + // && presentation.SlideShowSettings.AdvanceMode == PpSlideShowAdvanceMode.ppSlideShowUseSlideTimings && BtnPPTSlideShowEnd.Visibility != Visibility.Visible) { - - Application.Current.Dispatcher.BeginInvoke((Action)(() => - { - new YesOrNoNotificationWindow("检测到此演示文档中自动播放或排练计时已经启用,可能导致幻灯片自动翻页,是否取消?", - () => { - presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance; - }).ShowDialog(); - })); - presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance; + bool hasSlideTimings = false; + foreach (Slide slide in presentation.Slides) { + if (slide.SlideShowTransition.AdvanceOnTime == MsoTriState.msoTrue && slide.SlideShowTransition.AdvanceTime > 0) { + hasSlideTimings = true; + break; + } + } + if (hasSlideTimings) { + Application.Current.Dispatcher.BeginInvoke((Action)(() => + { + new YesOrNoNotificationWindow("检测到此演示文档中自动播放或排练计时已经启用,可能导致幻灯片自动翻页,是否取消?", + () => { + presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance; + }).ShowDialog(); + })); + presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance; + } } //如果检测到已经开始放映,则立即进入画板模式 diff --git a/Ink Canvas/MainWindow_cs/MW_PenColors.cs b/Ink Canvas/MainWindow_cs/MW_PenColors.cs index 95b12318..24de3299 100644 --- a/Ink Canvas/MainWindow_cs/MW_PenColors.cs +++ b/Ink Canvas/MainWindow_cs/MW_PenColors.cs @@ -192,7 +192,7 @@ private void CheckColorTheme(bool changeColorTheme = false) { if (drawingAttributes != null && isLoaded) { if (inkColor > 100) { drawingAttributes.Height = 30 + Settings.Canvas.InkWidth; - drawingAttributes.Width = 5; + drawingAttributes.Width = 30 + Settings.Canvas.InkWidth; byte NowR = drawingAttributes.Color.R; byte NowG = drawingAttributes.Color.G; byte NowB = drawingAttributes.Color.B; diff --git a/Ink Canvas/Properties/AssemblyInfo.cs b/Ink Canvas/Properties/AssemblyInfo.cs index 7697141d..7aa84add 100644 --- a/Ink Canvas/Properties/AssemblyInfo.cs +++ b/Ink Canvas/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ // 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("4.7.2.0")] -[assembly: AssemblyFileVersion("4.7.2.0")] +[assembly: AssemblyVersion("4.7.3.0")] +[assembly: AssemblyFileVersion("4.7.3.0")]