Skip to content

Commit

Permalink
[fix] IsNotifyAutoPlayPresentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangSakura committed May 15, 2024
1 parent 8b54e79 commit e0b024d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion AutomaticUpdateVersionControl.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.7.2
4.7.3
29 changes: 19 additions & 10 deletions Ink Canvas/MainWindow_cs/MW_PPT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
}

//如果检测到已经开始放映,则立即进入画板模式
Expand Down
2 changes: 1 addition & 1 deletion Ink Canvas/MainWindow_cs/MW_PenColors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Ink Canvas/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

0 comments on commit e0b024d

Please sign in to comment.