Skip to content

Commit e0b024d

Browse files
committed
[fix] IsNotifyAutoPlayPresentation
1 parent 8b54e79 commit e0b024d

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

AutomaticUpdateVersionControl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.7.2
1+
4.7.3

Ink Canvas/MainWindow_cs/MW_PPT.cs

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Application = System.Windows.Application;
1616
using File = System.IO.File;
1717
using MessageBox = System.Windows.MessageBox;
18+
using Microsoft.Office.Core;
1819

1920
namespace Ink_Canvas {
2021
public partial class MainWindow : Window {
@@ -175,17 +176,25 @@ private void TimerCheckPPT_Elapsed(object sender, ElapsedEventArgs e) {
175176

176177
//检测是否有自动播放
177178
if (Settings.PowerPointSettings.IsNotifyAutoPlayPresentation
178-
&& presentation.SlideShowSettings.AdvanceMode == PpSlideShowAdvanceMode.ppSlideShowUseSlideTimings
179+
// && presentation.SlideShowSettings.AdvanceMode == PpSlideShowAdvanceMode.ppSlideShowUseSlideTimings
179180
&& BtnPPTSlideShowEnd.Visibility != Visibility.Visible) {
180-
181-
Application.Current.Dispatcher.BeginInvoke((Action)(() =>
182-
{
183-
new YesOrNoNotificationWindow("检测到此演示文档中自动播放或排练计时已经启用,可能导致幻灯片自动翻页,是否取消?",
184-
() => {
185-
presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
186-
}).ShowDialog();
187-
}));
188-
presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
181+
bool hasSlideTimings = false;
182+
foreach (Slide slide in presentation.Slides) {
183+
if (slide.SlideShowTransition.AdvanceOnTime == MsoTriState.msoTrue && slide.SlideShowTransition.AdvanceTime > 0) {
184+
hasSlideTimings = true;
185+
break;
186+
}
187+
}
188+
if (hasSlideTimings) {
189+
Application.Current.Dispatcher.BeginInvoke((Action)(() =>
190+
{
191+
new YesOrNoNotificationWindow("检测到此演示文档中自动播放或排练计时已经启用,可能导致幻灯片自动翻页,是否取消?",
192+
() => {
193+
presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
194+
}).ShowDialog();
195+
}));
196+
presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
197+
}
189198
}
190199

191200
//如果检测到已经开始放映,则立即进入画板模式

Ink Canvas/MainWindow_cs/MW_PenColors.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ private void CheckColorTheme(bool changeColorTheme = false) {
192192
if (drawingAttributes != null && isLoaded) {
193193
if (inkColor > 100) {
194194
drawingAttributes.Height = 30 + Settings.Canvas.InkWidth;
195-
drawingAttributes.Width = 5;
195+
drawingAttributes.Width = 30 + Settings.Canvas.InkWidth;
196196
byte NowR = drawingAttributes.Color.R;
197197
byte NowG = drawingAttributes.Color.G;
198198
byte NowB = drawingAttributes.Color.B;

Ink Canvas/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@
4949
// You can specify all the values or you can default the Build and Revision Numbers
5050
// by using the '*' as shown below:
5151
// [assembly: AssemblyVersion("1.0.*")]
52-
[assembly: AssemblyVersion("4.7.2.0")]
53-
[assembly: AssemblyFileVersion("4.7.2.0")]
52+
[assembly: AssemblyVersion("4.7.3.0")]
53+
[assembly: AssemblyFileVersion("4.7.3.0")]

0 commit comments

Comments
 (0)