Skip to content

Commit 88c208c

Browse files
authored
PPT 内先保存墨迹再进入画板
1 parent b820096 commit 88c208c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Ink Canvas/MainWindow.xaml.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,21 @@ private void BtnSwitch_Click(object sender, RoutedEventArgs e)
12041204
currentMode = 1;
12051205
GridBackgroundCover.Visibility = Visibility.Visible;
12061206

1207+
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) {
1208+
Application.Current.Dispatcher.Invoke(() =>
1209+
{
1210+
try
1211+
{
1212+
MemoryStream ms = new MemoryStream();
1213+
inkCanvas.Strokes.Save(ms);
1214+
ms.Position = 0;
1215+
memoryStreams[pptApplication.SlideShowWindows[1].View.CurrentShowPosition] = ms;
1216+
timeMachine.ClearStrokeHistory();
1217+
}
1218+
catch { }
1219+
});
1220+
}
1221+
12071222
SaveStrokes(true);
12081223
ClearStrokes(true);
12091224
RestoreStrokes();

0 commit comments

Comments
 (0)