This commit is contained in:
2026-04-30 16:44:52 +08:00
parent 4902559cfa
commit 21c93d38c7
2 changed files with 13 additions and 1 deletions
+2
View File
@@ -1673,6 +1673,8 @@ namespace Ink_Canvas
try try
{ {
PPTTimeCapsule?.Dispose();
// 清理视频展台资源 // 清理视频展台资源
if (_cameraService != null) if (_cameraService != null)
{ {
+11 -1
View File
@@ -54,6 +54,13 @@ namespace Ink_Canvas.Windows
private void PPTTimeCapsule_Loaded(object sender, RoutedEventArgs e) private void PPTTimeCapsule_Loaded(object sender, RoutedEventArgs e)
{ {
if (isDisposed) return;
if (timeUpdateTimer == null || countdownUpdateTimer == null)
{
InitializeTimers();
}
// 记录初始宽度 // 记录初始宽度
if (MainCapsule != null && originalCapsuleWidth == 0) if (MainCapsule != null && originalCapsuleWidth == 0)
{ {
@@ -65,7 +72,10 @@ namespace Ink_Canvas.Windows
private void PPTTimeCapsule_Unloaded(object sender, RoutedEventArgs e) private void PPTTimeCapsule_Unloaded(object sender, RoutedEventArgs e)
{ {
Dispose(); if (isDisposed) return;
// Unloaded 可能是暂时从视觉树移除(如主题切换/模板刷新),这里只暂停刷新即可。
StopTimeUpdate();
} }
/// <summary> /// <summary>