improve:ROT联动
This commit is contained in:
@@ -221,11 +221,10 @@ namespace Ink_Canvas.Helpers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!_isModuleUnloading)
|
||||
{
|
||||
if (_disposed || _isModuleUnloading)
|
||||
return;
|
||||
CheckAndConnectToPPTViaRot();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"[ROT] PPT 连接检查失败: {ex}", LogHelper.LogType.Error);
|
||||
@@ -236,11 +235,10 @@ namespace Ink_Canvas.Helpers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!_isModuleUnloading && IsConnected)
|
||||
{
|
||||
if (_disposed || _isModuleUnloading || !IsConnected)
|
||||
return;
|
||||
CheckSlideShowState();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"[ROT] PPT 放映状态检查失败: {ex}", LogHelper.LogType.Error);
|
||||
@@ -249,7 +247,7 @@ namespace Ink_Canvas.Helpers
|
||||
|
||||
private void CheckAndConnectToPPTViaRot()
|
||||
{
|
||||
if (_isModuleUnloading) return;
|
||||
if (_disposed || _isModuleUnloading) return;
|
||||
|
||||
if (_pptApplication != null && !IsConnected)
|
||||
{
|
||||
@@ -457,6 +455,7 @@ namespace Ink_Canvas.Helpers
|
||||
System.Threading.Thread.Sleep(200);
|
||||
|
||||
_isModuleUnloading = false;
|
||||
if (!_disposed)
|
||||
_unifiedRotTimer?.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user