add:新新设置

This commit is contained in:
PrefacedCorg
2026-04-18 22:32:08 +08:00
parent 8d74b6ee30
commit abe5992d21
12 changed files with 553 additions and 274 deletions
-50
View File
@@ -687,46 +687,6 @@ namespace Ink_Canvas
SaveSettingsToFile();
}
/// <summary>
/// 处理开机启动开关状态更改事件
/// </summary>
/// <param name="sender">事件发送者</param>
/// <param name="e">路由事件参数</param>
/// <remarks>
/// 当开机启动开关状态更改时:
/// 1. 如果开启,删除旧的启动项并创建新的启动项
/// 2. 如果关闭,删除所有启动项
/// </remarks>
private void ToggleSwitchRunAtStartup_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
if (ToggleSwitchRunAtStartup.IsOn)
{
StartAutomaticallyDel("InkCanvas");
StartAutomaticallyCreate("Ink Canvas Annotation");
}
else
{
StartAutomaticallyDel("InkCanvas");
StartAutomaticallyDel("Ink Canvas Annotation");
}
}
/// <summary>
/// 处理启动时折叠开关状态更改事件
/// </summary>
/// <param name="sender">事件发送者</param>
/// <param name="e">路由事件参数</param>
/// <remarks>
/// 当启动时折叠开关状态更改时,保存设置到文件
/// </remarks>
private void ToggleSwitchFoldAtStartup_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Startup.IsFoldAtStartup = ToggleSwitchFoldAtStartup.IsOn;
SaveSettingsToFile();
}
/// <summary>
/// 处理PowerPoint支持开关状态更改事件
/// </summary>
@@ -3917,8 +3877,6 @@ namespace Ink_Canvas
SaveSettingsToFile();
LoadSettings(isStartup: false, skipAutoUpdateCheck: true);
isLoaded = true;
ToggleSwitchRunAtStartup.IsOn = false;
}
catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); }
@@ -4205,14 +4163,6 @@ namespace Ink_Canvas
SaveSettingsToFile();
}
private void ToggleSwitchWindowMode_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Advanced.WindowMode = ToggleSwitchWindowMode.IsOn;
SaveSettingsToFile();
SetWindowMode();
}
private void ToggleSwitchIsAutoBackupBeforeUpdate_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
@@ -216,24 +216,6 @@ namespace Ink_Canvas
{
}
try
{
if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) +
"\\Ink Canvas Annotation.lnk"))
{
ToggleSwitchRunAtStartup.IsOn = true;
}
else
{
ToggleSwitchRunAtStartup.IsOn = false;
}
}
catch (Exception ex)
{
LogHelper.WriteLogToFile(ex.ToString(), LogHelper.LogType.Error);
ToggleSwitchRunAtStartup.IsOn = false;
}
if (Settings.Startup != null)
{
if (isStartup)
@@ -243,11 +225,6 @@ namespace Ink_Canvas
DelAutoSavedFiles.DeleteFilesOlder(Settings.Automation.AutoSavedStrokesLocation,
Settings.Automation.AutoDelSavedFilesDaysThreshold);
}
if (Settings.Startup.IsFoldAtStartup && !App.StartWithBoardMode)
{
FoldFloatingBar_MouseUp(Fold_Icon, null);
}
}
if (Settings.Startup.IsEnableNibMode)
@@ -331,8 +308,6 @@ namespace Ink_Canvas
AutoUpdateWithSilenceStartTimeComboBox, AutoUpdateWithSilenceEndTimeComboBox);
AutoUpdateWithSilenceStartTimeComboBox.SelectedItem = Settings.Startup.AutoUpdateWithSilenceStartTime;
AutoUpdateWithSilenceEndTimeComboBox.SelectedItem = Settings.Startup.AutoUpdateWithSilenceEndTime;
ToggleSwitchFoldAtStartup.IsOn = Settings.Startup.IsFoldAtStartup;
}
else
{
@@ -1003,7 +978,6 @@ namespace Ink_Canvas
ToggleSwitchIsLogEnabled.IsOn = Settings.Advanced.IsLogEnabled;
ToggleSwitchIsSaveLogByDate.IsOn = Settings.Advanced.IsSaveLogByDate;
ToggleSwitchIsSecondConfimeWhenShutdownApp.IsOn = Settings.Advanced.IsSecondConfirmWhenShutdownApp;
ToggleSwitchWindowMode.IsOn = Settings.Advanced.WindowMode;
ToggleSwitchIsSpecialScreen.IsOn = Settings.Advanced.IsSpecialScreen;
ToggleSwitchIsEnableUriScheme.IsOn = Settings.Advanced.IsEnableUriScheme;
ToggleSwitchIsQuadIR.IsOn = Settings.Advanced.IsQuadIR;