improve:aovidfullsreen
This commit is contained in:
@@ -99,6 +99,8 @@ namespace Ink_Canvas.Helpers
|
|||||||
UpdateNavigationButtonStyles();
|
UpdateNavigationButtonStyles();
|
||||||
if (MainWindow.Settings.Advanced.IsEnableAvoidFullScreenHelper)
|
if (MainWindow.Settings.Advanced.IsEnableAvoidFullScreenHelper)
|
||||||
{
|
{
|
||||||
|
// 设置为画板模式,允许全屏操作
|
||||||
|
AvoidFullScreenHelper.SetBoardMode(true);
|
||||||
_dispatcher.BeginInvoke(new Action(() =>
|
_dispatcher.BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
MainWindow.MoveWindow(new WindowInteropHelper(_mainWindow).Handle, 0, 0,
|
MainWindow.MoveWindow(new WindowInteropHelper(_mainWindow).Handle, 0, 0,
|
||||||
@@ -114,11 +116,16 @@ namespace Ink_Canvas.Helpers
|
|||||||
HideAllNavigationPanels();
|
HideAllNavigationPanels();
|
||||||
if (MainWindow.Settings.Advanced.IsEnableAvoidFullScreenHelper)
|
if (MainWindow.Settings.Advanced.IsEnableAvoidFullScreenHelper)
|
||||||
{
|
{
|
||||||
|
// 恢复为非画板模式,重新启用全屏限制
|
||||||
|
AvoidFullScreenHelper.SetBoardMode(false);
|
||||||
|
|
||||||
_dispatcher.BeginInvoke(new Action(() =>
|
_dispatcher.BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
MainWindow.MoveWindow(new WindowInteropHelper(_mainWindow).Handle, 0, 0,
|
// 退出PPT放映模式,恢复到工作区域大小
|
||||||
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width,
|
var workingArea = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;
|
||||||
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height, true);
|
MainWindow.MoveWindow(new WindowInteropHelper(_mainWindow).Handle,
|
||||||
|
workingArea.X, workingArea.Y,
|
||||||
|
workingArea.Width, workingArea.Height, true);
|
||||||
}), DispatcherPriority.ApplicationIdle);
|
}), DispatcherPriority.ApplicationIdle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user