Revert "优化代码"

This reverts commit 92bb458345.
This commit is contained in:
2025-09-30 19:15:03 +08:00
parent d9e3524211
commit a9b0ac0595
16 changed files with 131 additions and 71 deletions
@@ -53,7 +53,8 @@ namespace Ink_Canvas
foreach (var kvp in Settings.Automation.FloatingWindowInterceptor.InterceptRules)
{
var toggleName = $"ToggleSwitch{kvp.Key}";
if (FindName(toggleName) is ToggleSwitch toggle)
var toggle = FindName(toggleName) as ToggleSwitch;
if (toggle != null)
{
toggle.IsOn = kvp.Value;
}