fix:开关状态显示错误

This commit is contained in:
2025-08-24 16:24:29 +08:00
parent 441f40886f
commit b4250b9161
4 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -1121,7 +1121,7 @@
<TextBlock Foreground="#fafafa" Text="在调色盘窗口中显示 笔尖模式 按钮" <TextBlock Foreground="#fafafa" Text="在调色盘窗口中显示 笔尖模式 按钮"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" /> VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent="" <ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchEnableDisPlayNibModeToggle" IsOn="True" Name="ToggleSwitchEnableDisPlayNibModeToggle" IsOn="False"
FontFamily="Microsoft YaHei UI" FontWeight="Bold" FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchEnableDisPlayNibModeToggle_Toggled" /> Toggled="ToggleSwitchEnableDisPlayNibModeToggle_Toggled" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
+1 -1
View File
@@ -2028,7 +2028,7 @@ namespace Ink_Canvas
LoadSettings(); LoadSettings();
isLoaded = true; isLoaded = true;
ToggleSwitchRunAtStartup.IsOn = true; ToggleSwitchRunAtStartup.IsOn = false;
} }
catch { } catch { }
@@ -54,10 +54,15 @@ namespace Ink_Canvas
{ {
ToggleSwitchRunAtStartup.IsOn = true; ToggleSwitchRunAtStartup.IsOn = true;
} }
else
{
ToggleSwitchRunAtStartup.IsOn = false;
}
} }
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.WriteLogToFile(ex.ToString(), LogHelper.LogType.Error); LogHelper.WriteLogToFile(ex.ToString(), LogHelper.LogType.Error);
ToggleSwitchRunAtStartup.IsOn = false;
} }
if (Settings.Startup != null) if (Settings.Startup != null)
@@ -141,6 +146,10 @@ namespace Ink_Canvas
else else
{ {
Settings.Startup = new Startup(); Settings.Startup = new Startup();
Settings.Startup.IsEnableNibMode = false; // 默认关闭笔尖模式
ToggleSwitchEnableNibMode.IsOn = false; // 默认关闭笔尖模式
BoardToggleSwitchEnableNibMode.IsOn = false; // 默认关闭笔尖模式
BoundsWidth = Settings.Advanced.FingerModeBoundsWidth; // 使用手指模式边界宽度
} }
// 恢复崩溃后操作设置 // 恢复崩溃后操作设置
+1 -1
View File
@@ -150,7 +150,7 @@ namespace Ink_Canvas
[JsonProperty("skippedVersion")] [JsonProperty("skippedVersion")]
public string SkippedVersion { get; set; } = ""; public string SkippedVersion { get; set; } = "";
[JsonProperty("isEnableNibMode")] [JsonProperty("isEnableNibMode")]
public bool IsEnableNibMode { get; set; } public bool IsEnableNibMode { get; set; } = false;
[JsonProperty("isFoldAtStartup")] [JsonProperty("isFoldAtStartup")]
public bool IsFoldAtStartup { get; set; } public bool IsFoldAtStartup { get; set; }
[JsonProperty("crashAction")] [JsonProperty("crashAction")]