improve:仅PPT模式
优化浮动栏显示
This commit is contained in:
@@ -303,7 +303,6 @@ namespace Ink_Canvas.Helpers
|
||||
if (positionToSave > 0)
|
||||
{
|
||||
File.WriteAllText(Path.Combine(folderPath, "Position"), positionToSave.ToString());
|
||||
LogHelper.WriteLogToFile($"已保存PPT播放位置: {positionToSave}", LogHelper.LogType.Trace);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -3022,7 +3022,6 @@ namespace Ink_Canvas
|
||||
else if (!isInSlideShow && IsVisible)
|
||||
{
|
||||
Hide();
|
||||
LogHelper.WriteLogToFile("PPT放映结束,隐藏主窗口(仅PPT模式)", LogHelper.LogType.Trace);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1812,7 +1812,7 @@ namespace Ink_Canvas
|
||||
});
|
||||
}
|
||||
|
||||
public async void PureViewboxFloatingBarMarginAnimationInPPTMode()
|
||||
public async void PureViewboxFloatingBarMarginAnimationInPPTMode(bool isRetry = false)
|
||||
{
|
||||
// 新增:在白板模式下不执行浮动栏动画
|
||||
if (currentMode == 1)
|
||||
@@ -1908,6 +1908,25 @@ namespace Ink_Canvas
|
||||
{
|
||||
ViewboxFloatingBar.Margin = new Thickness(pos.X, pos.Y, -2000, -200);
|
||||
});
|
||||
|
||||
if (Settings.ModeSettings.IsPPTOnlyMode && !isRetry)
|
||||
{
|
||||
await Task.Delay(2000); // 等待动画完成后再检查
|
||||
|
||||
bool isFloatingBarVisible = false;
|
||||
await Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
// 检查浮动栏是否真的显示了
|
||||
isFloatingBarVisible = ViewboxFloatingBar.Visibility == Visibility.Visible &&
|
||||
ViewboxFloatingBar.Margin.Left >= 0 &&
|
||||
ViewboxFloatingBar.Margin.Top >= 0;
|
||||
});
|
||||
|
||||
if (!isFloatingBarVisible)
|
||||
{
|
||||
PureViewboxFloatingBarMarginAnimationInPPTMode(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal async void CursorIcon_Click(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user