add:安全中心

This commit is contained in:
2026-02-16 20:22:41 +08:00
parent 2f8c368eef
commit 45dc3cb537
18 changed files with 1167 additions and 49 deletions
@@ -153,6 +153,14 @@ namespace Ink_Canvas.Windows
Type = SidebarItemType.Separator
});
SidebarItems.Add(new SidebarItem()
{
Type = SidebarItemType.Item,
Title = "安全",
Name = "SecurityItem",
IconSource = FindResource("SecurityIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem()
{
Type = SidebarItemType.Item,
Title = "更新中心",
@@ -169,6 +177,7 @@ namespace Ink_Canvas.Windows
Selected = false,
});
SettingsPanes = new Grid[] {
SecurityPane,
UpdateCenterPane,
AboutPane,
CanvasAndInkPane,
@@ -186,6 +195,7 @@ namespace Ink_Canvas.Windows
};
SettingsPaneScrollViewers = new ScrollViewer[] {
SecurityPanel.ScrollViewerEx,
UpdateCenterPanel.UpdateCenterScrollViewerEx,
SettingsAboutPanel.AboutScrollViewerEx,
CanvasAndInkPanel.ScrollViewerEx,
@@ -203,6 +213,7 @@ namespace Ink_Canvas.Windows
};
SettingsPaneTitles = new string[] {
"安全",
"更新中心",
"关于",
"画板和墨迹",
@@ -220,6 +231,7 @@ namespace Ink_Canvas.Windows
};
SettingsPaneNames = new string[] {
"SecurityItem",
"UpdateCenterItem",
"AboutItem",
"CanvasAndInkItem",
@@ -271,6 +283,8 @@ namespace Ink_Canvas.Windows
AdvancedPanel.IsTopBarNeedNoShadowEffect += (o, s) => DropShadowEffectTopBar.Opacity = 0;
SnapshotPanel.IsTopBarNeedShadowEffect += (o, s) => DropShadowEffectTopBar.Opacity = 0.25;
SnapshotPanel.IsTopBarNeedNoShadowEffect += (o, s) => DropShadowEffectTopBar.Opacity = 0;
SecurityPanel.IsTopBarNeedShadowEffect += (o, s) => DropShadowEffectTopBar.Opacity = 0.25;
SecurityPanel.IsTopBarNeedNoShadowEffect += (o, s) => DropShadowEffectTopBar.Opacity = 0;
UpdateCenterPanel.IsTopBarNeedShadowEffect += (o, s) => DropShadowEffectTopBar.Opacity = 0.25;
UpdateCenterPanel.IsTopBarNeedNoShadowEffect += (o, s) => DropShadowEffectTopBar.Opacity = 0;
@@ -321,7 +335,7 @@ namespace Ink_Canvas.Windows
// 使用反射调用所有面板的 ApplyTheme 方法(如果存在)
var panels = new UserControl[]
{
UpdateCenterPanel, StartupPanel, CanvasAndInkPanel, GesturesPanel, InkRecognitionPanel,
SecurityPanel, UpdateCenterPanel, StartupPanel, CanvasAndInkPanel, GesturesPanel, InkRecognitionPanel,
ThemePanel, ShortcutsPanel, CrashActionPanel, PowerPointPanel,
AutomationPanel, LuckyRandomPanel, AdvancedPanel, SnapshotPanel,
SettingsAboutPanel, AppearancePanel, SearchPanelControl
@@ -766,6 +780,7 @@ namespace Ink_Canvas.Windows
LuckyRandomPanel,
AdvancedPanel,
SnapshotPanel,
SecurityPanel,
UpdateCenterPanel,
SettingsAboutPanel,
AppearancePanel
@@ -960,6 +975,7 @@ namespace Ink_Canvas.Windows
{ "LuckyRandomItem", LuckyRandomPanel },
{ "AdvancedItem", AdvancedPanel },
{ "SnapshotItem", SnapshotPanel },
{ "SecurityItem", SecurityPanel },
{ "UpdateCenterItem", UpdateCenterPanel },
{ "AppearanceItem", AppearancePanel }
};
@@ -978,6 +994,7 @@ namespace Ink_Canvas.Windows
if (LuckyRandomPane != null) LuckyRandomPane.Visibility = _selectedSidebarItemName == "LuckyRandomItem" ? Visibility.Visible : Visibility.Collapsed;
if (AdvancedPane != null) AdvancedPane.Visibility = _selectedSidebarItemName == "AdvancedItem" ? Visibility.Visible : Visibility.Collapsed;
if (SnapshotPane != null) SnapshotPane.Visibility = _selectedSidebarItemName == "SnapshotItem" ? Visibility.Visible : Visibility.Collapsed;
if (SecurityPane != null) SecurityPane.Visibility = _selectedSidebarItemName == "SecurityItem" ? Visibility.Visible : Visibility.Collapsed;
if (UpdateCenterPane != null) UpdateCenterPane.Visibility = _selectedSidebarItemName == "UpdateCenterItem" ? Visibility.Visible : Visibility.Collapsed;
// 为新显示的面板应用主题(延迟执行,确保面板已完全显示)