improve:窗口模式

This commit is contained in:
2025-12-13 17:03:58 +08:00
parent 430fff0515
commit 287d31a3a9
5 changed files with 38 additions and 1 deletions
+19
View File
@@ -514,6 +514,9 @@ namespace Ink_Canvas
// 加载自定义背景颜色
LoadCustomBackgroundColor();
// 设置窗口模式
SetWindowMode();
// 注册设置面板滚动事件
if (SettingsPanelScrollViewer != null)
{
@@ -769,6 +772,22 @@ namespace Ink_Canvas
}
}
private void SetWindowMode()
{
if (Settings.Advanced.WindowMode)
{
WindowState = WindowState.Normal;
Left = 0.0;
Top = 0.0;
Height = SystemParameters.PrimaryScreenHeight;
Width = SystemParameters.PrimaryScreenWidth;
}
else // 全屏
{
WindowState = WindowState.Maximized;
}
}
private void Window_Closing(object sender, CancelEventArgs e)
{
LogHelper.WriteLogToFile("Ink Canvas closing", LogHelper.LogType.Event);