优化代码

This commit is contained in:
2026-04-30 14:29:06 +08:00
parent 988af60a30
commit d30ed9e726
35 changed files with 46 additions and 85 deletions
@@ -7,7 +7,6 @@ using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
using ContentDialog = iNKORE.UI.WPF.Modern.Controls.ContentDialog;
using MessageBox = System.Windows.MessageBox;
using Page = iNKORE.UI.WPF.Modern.Controls.Page;
@@ -354,7 +354,9 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
{
var checkBox = new CheckBox
{
Content = category.Value, Tag = category.Key, FontSize = 13,
Content = category.Value,
Tag = category.Key,
FontSize = 13,
IsChecked = implicitAllCategories || savedHitokoto.Contains(category.Key),
Margin = new Thickness(0, 0, 0, 8)
};
@@ -89,7 +89,12 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
CardAutoDelSavedFiles.IsOn = auto.AutoDelSavedFiles;
ComboBoxAutoDelSavedFilesDaysThreshold.SelectedIndex = auto.AutoDelSavedFilesDaysThreshold switch
{
7 => 0, 14 => 1, 30 => 2, 60 => 3, 90 => 4, _ => 2
7 => 0,
14 => 1,
30 => 2,
60 => 3,
90 => 4,
_ => 2
};
SideControlMinimumAutomationSlider.Value = auto.MinimumAutomationStrokeNumber;
@@ -1,6 +1,4 @@
using Ink_Canvas.Helpers;
using Ink_Canvas.Windows.SettingsViews.Helpers;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;