ef5377f85c
重构主题和语言设置功能,将相关代码从主窗口迁移至新增的个性化设置页面 优化浮动工具栏图标选择逻辑,移除冗余代码 统一设置页面中开关控件的样式和行为 修复设置页面导航项的选择状态问题
107 lines
5.6 KiB
XML
107 lines
5.6 KiB
XML
<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.StartupPage"
|
|
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:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
|
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="启动设置" />
|
|
|
|
<!-- 开机时运行 -->
|
|
<controls:LabeledSettingsCard x:Name="CardRunAtStartup"
|
|
Header="{i18n:I18n Key=Startup_RunAtStartup}"
|
|
Description="{i18n:I18n Key=Startup_RunAtStartupHint}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Settings}"
|
|
SwitchName="ToggleSwitchRunAtStartup"
|
|
Toggled="ToggleSwitchRunAtStartup_Toggled" />
|
|
|
|
<!-- 开机运行后收纳到侧边栏 -->
|
|
<controls:LabeledSettingsCard x:Name="CardFoldAtStartup"
|
|
Header="{i18n:I18n Key=Startup_FoldAtStartup}"
|
|
Description="{i18n:I18n Key=Startup_FoldAtStartupHint}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.ChevronLeft}"
|
|
SwitchName="ToggleSwitchFoldAtStartup"
|
|
Toggled="ToggleSwitchFoldAtStartup_Toggled" />
|
|
|
|
<!-- 外部协议调用 -->
|
|
<controls:LabeledSettingsCard x:Name="CardExternalProtocol"
|
|
Header="{i18n:I18n Key=Startup_ExternalProtocol}"
|
|
Description="{i18n:I18n Key=Startup_ExternalProtocolHint}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Link}"
|
|
SwitchName="ToggleSwitchExternalProtocol"
|
|
Toggled="ToggleSwitchExternalProtocol_Toggled" />
|
|
|
|
<!-- 运行模式 -->
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="{i18n:I18n Key=Settings_ModeDesc_1}" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardPPTOnlyMode"
|
|
Header="{i18n:I18n Key=Mode_PPTOnly}"
|
|
Description="{i18n:I18n Key=Settings_ModeDesc}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.Settings}"
|
|
SwitchName="ToggleSwitchPPTOnlyMode"
|
|
Toggled="ToggleSwitchPPTOnlyMode_Toggled" />
|
|
|
|
<!-- 笔尖模式 -->
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="{i18n:I18n Key=Startup_EnableNibMode}" />
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardEnableNibMode"
|
|
Header="{i18n:I18n Key=Startup_EnableNibMode}"
|
|
Description="{i18n:I18n Key=Startup_EnableNibModeHint}"
|
|
Icon="{x:Static ui:SegoeFluentIcons.TouchPointer}"
|
|
SwitchName="ToggleSwitchEnableNibMode"
|
|
Toggled="ToggleSwitchEnableNibMode_Toggled" />
|
|
|
|
<!-- 崩溃后操作 -->
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
Text="{i18n:I18n Key=Crash_Title}" />
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Crash_Title}"
|
|
Description="{i18n:I18n Key=Crash_Desc}">
|
|
<ui:SettingsCard.HeaderIcon>
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Warning}" />
|
|
</ui:SettingsCard.HeaderIcon>
|
|
<ComboBox x:Name="ComboBoxCrashAction"
|
|
SelectionChanged="ComboBoxCrashAction_SelectionChanged">
|
|
<ComboBoxItem Content="{i18n:I18n Key=Crash_SilentRestart}" Tag="0" />
|
|
<ComboBoxItem Content="{i18n:I18n Key=Crash_NoAction}" Tag="1" />
|
|
</ComboBox>
|
|
</ui:SettingsCard>
|
|
|
|
<!-- 底部空白 -->
|
|
<Rectangle Height="48" />
|
|
|
|
</ikw:SimpleStackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</ui:Page>
|