add:快捷键面板
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.HotkeyPage"
|
||||
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"
|
||||
xmlns:hk="clr-namespace:Ink_Canvas.Windows"
|
||||
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}">
|
||||
|
||||
<ui:InfoBar IsClosable="False"
|
||||
IsOpen="True"
|
||||
Severity="Informational"
|
||||
Title="说明"
|
||||
Message="在这里可以自定义全局快捷键。全局快捷键在任何情况下都能生效,即使应用程序不在焦点状态。" />
|
||||
|
||||
<!-- 鼠标模式 -->
|
||||
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
||||
Text="鼠标模式" />
|
||||
|
||||
<controls:LabeledSettingsCard x:Name="CardEnableHotkeysInMouseMode"
|
||||
Header="在鼠标模式下启用快捷键"
|
||||
Description="开启后,即使在鼠标模式下快捷键也会生效"
|
||||
Icon="{x:Static ui:SegoeFluentIcons.KeyboardStandard}"
|
||||
SwitchName="ToggleSwitchEnableHotkeysInMouseMode"
|
||||
Toggled="ToggleSwitchEnableHotkeysInMouseMode_Toggled" />
|
||||
|
||||
<!-- 基本操作 -->
|
||||
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
||||
Text="基本操作" />
|
||||
|
||||
<hk:HotkeyItem x:Name="UndoHotkey"
|
||||
Title="撤销"
|
||||
Description="撤销上一步操作"
|
||||
DefaultKey="Z"
|
||||
DefaultModifiers="Control" />
|
||||
<hk:HotkeyItem x:Name="RedoHotkey"
|
||||
Title="重做"
|
||||
Description="重做上一步操作"
|
||||
DefaultKey="Y"
|
||||
DefaultModifiers="Control" />
|
||||
<hk:HotkeyItem x:Name="ClearHotkey"
|
||||
Title="清空"
|
||||
Description="清空当前画板内容"
|
||||
DefaultKey="E"
|
||||
DefaultModifiers="Control" />
|
||||
<hk:HotkeyItem x:Name="PasteHotkey"
|
||||
Title="粘贴"
|
||||
Description="粘贴剪贴板内容"
|
||||
DefaultKey="V"
|
||||
DefaultModifiers="Control" />
|
||||
|
||||
<!-- 工具切换 -->
|
||||
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
||||
Text="工具切换" />
|
||||
|
||||
<hk:HotkeyItem x:Name="SelectToolHotkey"
|
||||
Title="选择工具"
|
||||
Description="切换到选择工具"
|
||||
DefaultKey="S"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="DrawToolHotkey"
|
||||
Title="绘图工具"
|
||||
Description="切换到绘图工具"
|
||||
DefaultKey="D"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="EraserToolHotkey"
|
||||
Title="橡皮擦工具"
|
||||
Description="切换到橡皮擦工具"
|
||||
DefaultKey="E"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="BlackboardToolHotkey"
|
||||
Title="黑板工具"
|
||||
Description="切换到黑板工具"
|
||||
DefaultKey="B"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="QuitDrawToolHotkey"
|
||||
Title="退出绘图/白板"
|
||||
Description="退出绘图模式或白板模式"
|
||||
DefaultKey="Q"
|
||||
DefaultModifiers="Alt" />
|
||||
|
||||
<!-- 画笔设置 -->
|
||||
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
||||
Text="画笔设置" />
|
||||
|
||||
<hk:HotkeyItem x:Name="Pen1Hotkey"
|
||||
Title="画笔1"
|
||||
Description="选择画笔1"
|
||||
DefaultKey="D1"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="Pen2Hotkey"
|
||||
Title="画笔2"
|
||||
Description="选择画笔2"
|
||||
DefaultKey="D2"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="Pen3Hotkey"
|
||||
Title="画笔3"
|
||||
Description="选择画笔3"
|
||||
DefaultKey="D3"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="Pen4Hotkey"
|
||||
Title="画笔4"
|
||||
Description="选择画笔4"
|
||||
DefaultKey="D4"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="Pen5Hotkey"
|
||||
Title="画笔5"
|
||||
Description="选择画笔5"
|
||||
DefaultKey="D5"
|
||||
DefaultModifiers="Alt" />
|
||||
|
||||
<!-- 功能快捷键 -->
|
||||
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
||||
Text="功能快捷键" />
|
||||
|
||||
<hk:HotkeyItem x:Name="DrawLineHotkey"
|
||||
Title="绘制直线"
|
||||
Description="绘制直线工具"
|
||||
DefaultKey="L"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="ScreenshotHotkey"
|
||||
Title="截图"
|
||||
Description="保存屏幕截图到桌面"
|
||||
DefaultKey="C"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="QuickDrawHotkey"
|
||||
Title="快抽"
|
||||
Description="打开快抽窗口(与悬浮快抽按钮相同)"
|
||||
DefaultKey="K"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="HideHotkey"
|
||||
Title="隐藏"
|
||||
Description="隐藏应用程序"
|
||||
DefaultKey="V"
|
||||
DefaultModifiers="Alt" />
|
||||
<hk:HotkeyItem x:Name="ExitHotkey"
|
||||
Title="退出"
|
||||
Description="退出当前模式或应用程序"
|
||||
DefaultKey="Escape"
|
||||
DefaultModifiers="None" />
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Right"
|
||||
Spacing="10"
|
||||
Margin="0,20,0,0">
|
||||
<Button x:Name="BtnResetToDefault"
|
||||
Content="重置为默认"
|
||||
MinWidth="120"
|
||||
Click="BtnResetToDefault_Click" />
|
||||
<Button x:Name="BtnSave"
|
||||
Content="保存设置"
|
||||
MinWidth="120"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Click="BtnSave_Click" />
|
||||
</ikw:SimpleStackPanel>
|
||||
|
||||
<Rectangle Height="48" />
|
||||
|
||||
</ikw:SimpleStackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
Reference in New Issue
Block a user