improve:ROT联动

This commit is contained in:
2026-02-14 15:10:00 +08:00
parent 698478d826
commit e0cb877162
2 changed files with 10 additions and 11 deletions
+9 -10
View File
@@ -221,10 +221,9 @@ namespace Ink_Canvas.Helpers
{
try
{
if (!_isModuleUnloading)
{
CheckAndConnectToPPTViaRot();
}
if (_disposed || _isModuleUnloading)
return;
CheckAndConnectToPPTViaRot();
}
catch (Exception ex)
{
@@ -236,10 +235,9 @@ namespace Ink_Canvas.Helpers
{
try
{
if (!_isModuleUnloading && IsConnected)
{
CheckSlideShowState();
}
if (_disposed || _isModuleUnloading || !IsConnected)
return;
CheckSlideShowState();
}
catch (Exception ex)
{
@@ -249,7 +247,7 @@ namespace Ink_Canvas.Helpers
private void CheckAndConnectToPPTViaRot()
{
if (_isModuleUnloading) return;
if (_disposed || _isModuleUnloading) return;
if (_pptApplication != null && !IsConnected)
{
@@ -457,7 +455,8 @@ namespace Ink_Canvas.Helpers
System.Threading.Thread.Sleep(200);
_isModuleUnloading = false;
_unifiedRotTimer?.Start();
if (!_disposed)
_unifiedRotTimer?.Start();
}
catch (Exception ex)
{
+1 -1
View File
@@ -104,7 +104,7 @@ namespace Ink_Canvas
private const int SlideSwitchDebounceMs = 150; // 防抖延迟150毫秒
private DispatcherTimer _exitPPTModeAfterDisconnectTimer;
private const int ExitPPTModeAfterDisconnectDelayMs = 800;
private const int ExitPPTModeAfterDisconnectDelayMs = 1200;
#endregion
#region PPT Managers