From 30852376dc3df2a95340f4dd8a05f6a3c1d600f9 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sun, 22 Feb 2026 18:04:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:PPT=E8=AE=B0=E5=BF=86=E4=B8=8A=E6=AC=A1?= =?UTF-8?q?=E9=A1=B5=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow_cs/MW_PPT.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Ink Canvas/MainWindow_cs/MW_PPT.cs b/Ink Canvas/MainWindow_cs/MW_PPT.cs index 11109099..2a02fdc1 100644 --- a/Ink Canvas/MainWindow_cs/MW_PPT.cs +++ b/Ink Canvas/MainWindow_cs/MW_PPT.cs @@ -1258,6 +1258,21 @@ namespace Ink_Canvas string presentationNameForSave = _pptManager?.GetPresentationName() ?? (pres != null ? pres.Name : null); int totalSlidesForSave = _pptManager?.SlidesCount ?? (pres != null ? pres.Slides.Count : 0); + if (currentPage > 0 && Settings.PowerPointSettings.IsNotifyPreviousPage && !string.IsNullOrEmpty(presentationNameForSave) && totalSlidesForSave > 0) + { + try + { + string folderPathForPosition = GetPresentationStrokeFolderPath(pres, presentationNameForSave, totalSlidesForSave); + if (!Directory.Exists(folderPathForPosition)) + Directory.CreateDirectory(folderPathForPosition); + File.WriteAllText(Path.Combine(folderPathForPosition, "Position"), currentPage.ToString()); + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"保存上次播放位置失败: {ex}", LogHelper.LogType.Warning); + } + } + if (Settings.PowerPointSettings.IsAutoSaveStrokesInPowerPoint && !string.IsNullOrEmpty(presentationNameForSave) && totalSlidesForSave > 0) { string folderPathForSave = GetPresentationStrokeFolderPath(pres, presentationNameForSave, totalSlidesForSave);