From 07de74b775a05f53290207acde4e9bb62a00c0c5 Mon Sep 17 00:00:00 2001
From: CJKmkp <2564608840@qq.com>
Date: Wed, 18 Feb 2026 22:22:58 +0800
Subject: [PATCH] =?UTF-8?q?improve:=E5=AE=89=E5=85=A8=E9=9D=A2=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SettingsViews/SecurityPanel.xaml | 1 -
.../SettingsViews/SecurityPanel.xaml.cs | 16 ----------------
2 files changed, 17 deletions(-)
diff --git a/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml b/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml
index 66d85eb0..9d5a199c 100644
--- a/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml
+++ b/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml
@@ -66,7 +66,6 @@
-
diff --git a/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml.cs b/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml.cs
index 0dddbfe8..ed3284a6 100644
--- a/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml.cs
+++ b/Ink Canvas/Windows/SettingsViews/SettingsViews/SecurityPanel.xaml.cs
@@ -43,7 +43,6 @@ namespace Ink_Canvas.Windows.SettingsViews
var enabled = sec != null && sec.PasswordEnabled;
if (BtnSetOrChangePassword != null) BtnSetOrChangePassword.IsEnabled = enabled;
- if (BtnDisablePassword != null) BtnDisablePassword.IsEnabled = enabled;
// 用途开关:仅在启用密码功能时可操作
var usageEnabled = enabled;
@@ -155,21 +154,6 @@ namespace Ink_Canvas.Windows.SettingsViews
}
}
- private void BtnDisablePassword_Click(object sender, RoutedEventArgs e)
- {
- // 触发和开关一致的逻辑
- if (FindToggleSwitch("ToggleSwitchPasswordEnabled") is Border b)
- {
- // 模拟点击到 off
- if (MainWindow.Settings?.Security?.PasswordEnabled == true)
- {
- _isLoaded = true;
- SetToggleSwitchState(b, false);
- HandleToggleSwitchChange("PasswordEnabled", false);
- }
- }
- }
-
public event EventHandler IsTopBarNeedShadowEffect;
public event EventHandler IsTopBarNeedNoShadowEffect;