优化主窗口设置选项
This commit is contained in:
+99
-768
File diff suppressed because it is too large
Load Diff
@@ -1375,7 +1375,6 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
// 初始化UIA置顶开关
|
// 初始化UIA置顶开关
|
||||||
ToggleSwitchUIAccessTopMost.IsOn = Settings.Advanced.EnableUIAccessTopMost;
|
ToggleSwitchUIAccessTopMost.IsOn = Settings.Advanced.EnableUIAccessTopMost;
|
||||||
UpdateUIAccessTopMostVisibility();
|
|
||||||
|
|
||||||
App.IsUIAccessTopMostEnabled = Settings.Advanced.EnableUIAccessTopMost;
|
App.IsUIAccessTopMostEnabled = Settings.Advanced.EnableUIAccessTopMost;
|
||||||
|
|
||||||
@@ -3238,7 +3237,6 @@ namespace Ink_Canvas
|
|||||||
Settings.Advanced.IsAlwaysOnTop = toggle != null && toggle.IsOn;
|
Settings.Advanced.IsAlwaysOnTop = toggle != null && toggle.IsOn;
|
||||||
SaveSettingsToFile();
|
SaveSettingsToFile();
|
||||||
ApplyAlwaysOnTop();
|
ApplyAlwaysOnTop();
|
||||||
UpdateUIAccessTopMostVisibility();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToggleSwitchUIAccessTopMost_Toggled(object sender, RoutedEventArgs e)
|
private void ToggleSwitchUIAccessTopMost_Toggled(object sender, RoutedEventArgs e)
|
||||||
@@ -4627,31 +4625,6 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
#region UIA置顶功能
|
#region UIA置顶功能
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新UIA置顶开关的可见性
|
|
||||||
/// </summary>
|
|
||||||
private void UpdateUIAccessTopMostVisibility()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var visibility = Settings.Advanced.IsAlwaysOnTop ? Visibility.Visible : Visibility.Collapsed;
|
|
||||||
|
|
||||||
if (UIAccessTopMostPanel != null)
|
|
||||||
{
|
|
||||||
UIAccessTopMostPanel.Visibility = visibility;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UIAccessTopMostDescription != null)
|
|
||||||
{
|
|
||||||
UIAccessTopMostDescription.Visibility = visibility;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogToFile($"更新UIA置顶开关可见性时出错: {ex.Message}", LogHelper.LogType.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 应用UIA置顶功能
|
/// 应用UIA置顶功能
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -619,10 +619,6 @@ namespace Ink_Canvas
|
|||||||
if (!isLoaded) return;
|
if (!isLoaded) return;
|
||||||
Settings.Startup.IsAutoUpdate = ToggleSwitchIsAutoUpdate.IsOn;
|
Settings.Startup.IsAutoUpdate = ToggleSwitchIsAutoUpdate.IsOn;
|
||||||
|
|
||||||
// 自动更新关闭时隐藏静默更新选项
|
|
||||||
ToggleSwitchIsAutoUpdateWithSilence.Visibility =
|
|
||||||
ToggleSwitchIsAutoUpdate.IsOn ? Visibility.Visible : Visibility.Collapsed;
|
|
||||||
|
|
||||||
// 如果关闭了自动更新,同时也关闭静默更新
|
// 如果关闭了自动更新,同时也关闭静默更新
|
||||||
if (!ToggleSwitchIsAutoUpdate.IsOn)
|
if (!ToggleSwitchIsAutoUpdate.IsOn)
|
||||||
{
|
{
|
||||||
@@ -3270,7 +3266,7 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
if (!isLoaded) return;
|
if (!isLoaded) return;
|
||||||
Settings.Automation.IsAutoSaveStrokesAtScreenshot = ToggleSwitchAutoSaveStrokesAtScreenshot.IsOn;
|
Settings.Automation.IsAutoSaveStrokesAtScreenshot = ToggleSwitchAutoSaveStrokesAtScreenshot.IsOn;
|
||||||
ToggleSwitchAutoSaveStrokesAtClear.Header =
|
ToggleSwitchAutoSaveStrokesAtClear.Label =
|
||||||
ToggleSwitchAutoSaveStrokesAtScreenshot.IsOn ? "清屏时自动截图并保存墨迹" : "清屏时自动截图";
|
ToggleSwitchAutoSaveStrokesAtScreenshot.IsOn ? "清屏时自动截图并保存墨迹" : "清屏时自动截图";
|
||||||
SaveSettingsToFile();
|
SaveSettingsToFile();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,7 +282,6 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToggleSwitchIsAutoUpdateWithSilence.Visibility = Settings.Startup.IsAutoUpdate ? Visibility.Visible : Visibility.Collapsed;
|
|
||||||
if (Settings.Startup.IsAutoUpdateWithSilence)
|
if (Settings.Startup.IsAutoUpdateWithSilence)
|
||||||
{
|
{
|
||||||
ToggleSwitchIsAutoUpdateWithSilence.IsOn = true;
|
ToggleSwitchIsAutoUpdateWithSilence.IsOn = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user