112 lines
6.2 KiB
XML
112 lines
6.2 KiB
XML
<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.SecurityPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
|
mc:Ignorable="d"
|
|
|
|
Title="安全">
|
|
|
|
<ScrollViewer PanningMode="VerticalFirst">
|
|
<Grid Margin="59,0,59,0">
|
|
<FrameworkElement.Resources>
|
|
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
|
|
<Style x:Key="SettingsSectionHeaderTextBlockStyle"
|
|
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
|
|
TargetType="TextBlock">
|
|
<Style.Setters>
|
|
<Setter Property="Margin" Value="1,30,0,6" />
|
|
</Style.Setters>
|
|
</Style>
|
|
</FrameworkElement.Resources>
|
|
<Grid>
|
|
<ikw:SimpleStackPanel MaxWidth="1000"
|
|
HorizontalAlignment="Stretch"
|
|
Spacing="{StaticResource SettingsCardSpacing}">
|
|
|
|
<!-- 安全密码 -->
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="安全密码" />
|
|
|
|
<ui:InfoBar IsClosable="False"
|
|
IsOpen="True"
|
|
Severity="Informational"
|
|
Title="说明"
|
|
Message="安全密码默认关闭。开启后可用于退出软件、进入设置与重置配置等操作时的二次验证。" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardPasswordEnabled"
|
|
Header="启用安全密码"
|
|
Description="开启后需要设置密码"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Permissions}"
|
|
SwitchName="ToggleSwitchPasswordEnabled"
|
|
Toggled="ToggleSwitchPasswordEnabled_Toggled" />
|
|
|
|
<ui:SettingsCard x:Name="CardPasswordManage"
|
|
Header="密码管理"
|
|
Description="设置或修改安全密码">
|
|
<ui:SettingsCard.HeaderIcon>
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Lock}" />
|
|
</ui:SettingsCard.HeaderIcon>
|
|
<Button x:Name="BtnSetOrChangePassword"
|
|
Content="设置/修改密码"
|
|
MinWidth="120"
|
|
Click="BtnSetOrChangePassword_Click" />
|
|
</ui:SettingsCard>
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardRequirePasswordOnExit"
|
|
Header="退出软件需要密码"
|
|
Description="关闭 InkCanvasForClass 时进行密码验证"
|
|
Icon="{x:Static ui:SegoeFluentIcons.SignOut}"
|
|
SwitchName="ToggleSwitchRequirePasswordOnExit"
|
|
Toggled="ToggleSwitchRequirePasswordOnExit_Toggled" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardRequirePasswordOnEnterSettings"
|
|
Header="进入设置需要密码"
|
|
Description="打开设置面板/新设置窗口时进行验证"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Settings}"
|
|
SwitchName="ToggleSwitchRequirePasswordOnEnterSettings"
|
|
Toggled="ToggleSwitchRequirePasswordOnEnterSettings_Toggled" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardRequirePasswordOnResetConfig"
|
|
Header="重置配置需要密码"
|
|
Description="重置 Settings.json 前进行二次验证"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Refresh}"
|
|
SwitchName="ToggleSwitchRequirePasswordOnResetConfig"
|
|
Toggled="ToggleSwitchRequirePasswordOnResetConfig_Toggled" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardRequirePasswordOnModifyOrClearNameList"
|
|
Header="修改/清空点名名单需要密码"
|
|
Description="对点名名单进行修改或清空前进行验证"
|
|
Icon="{x:Static ui:SegoeFluentIcons.People}"
|
|
SwitchName="ToggleSwitchRequirePasswordOnModifyOrClearNameList"
|
|
Toggled="ToggleSwitchRequirePasswordOnModifyOrClearNameList_Toggled" />
|
|
|
|
<!-- 进程保护 -->
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="进程保护" />
|
|
|
|
<ui:InfoBar IsClosable="False"
|
|
IsOpen="True"
|
|
Severity="Informational"
|
|
Title="说明"
|
|
Message="进程保护默认开启:运行期间保护根目录下的程序文件(exe/dll/config)不被外部修改。" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardEnableProcessProtection"
|
|
Header="进程保护"
|
|
Description="开启后关键文件会被只读占用"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Shield}"
|
|
SwitchName="ToggleSwitchEnableProcessProtection"
|
|
Toggled="ToggleSwitchEnableProcessProtection_Toggled" />
|
|
|
|
<Rectangle Height="48" />
|
|
|
|
</ikw:SimpleStackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</ui:Page> |