add:快捷键面板
This commit is contained in:
@@ -15,25 +15,12 @@
|
|||||||
<ui:SettingsCard.HeaderIcon>
|
<ui:SettingsCard.HeaderIcon>
|
||||||
<ui:FontIcon x:Name="HeaderFontIcon" Icon="{x:Static ui:SegoeFluentIcons.KeyboardStandard}" />
|
<ui:FontIcon x:Name="HeaderFontIcon" Icon="{x:Static ui:SegoeFluentIcons.KeyboardStandard}" />
|
||||||
</ui:SettingsCard.HeaderIcon>
|
</ui:SettingsCard.HeaderIcon>
|
||||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
|
<Button x:Name="BtnSetHotkey"
|
||||||
<Border Background="{DynamicResource SubtleFillColorSecondaryBrush}"
|
MinWidth="120"
|
||||||
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
FontFamily="Consolas"
|
||||||
BorderThickness="1"
|
FontWeight="SemiBold"
|
||||||
CornerRadius="4"
|
Click="BtnSetHotkey_Click">
|
||||||
Padding="10,4"
|
<TextBlock x:Name="CurrentHotkeyTextBlock" Text="未设置" />
|
||||||
VerticalAlignment="Center">
|
</Button>
|
||||||
<TextBlock x:Name="CurrentHotkeyTextBlock"
|
|
||||||
Text="未设置"
|
|
||||||
FontFamily="Consolas"
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
MinWidth="88"
|
|
||||||
TextAlignment="Center"
|
|
||||||
VerticalAlignment="Center" />
|
|
||||||
</Border>
|
|
||||||
<Button x:Name="BtnSetHotkey"
|
|
||||||
Content="设置"
|
|
||||||
MinWidth="64"
|
|
||||||
Click="BtnSetHotkey_Click" />
|
|
||||||
</ikw:SimpleStackPanel>
|
|
||||||
</ui:SettingsCard>
|
</ui:SettingsCard>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -79,7 +79,7 @@ namespace Ink_Canvas.Windows
|
|||||||
|
|
||||||
private void StartHotkeyCapture()
|
private void StartHotkeyCapture()
|
||||||
{
|
{
|
||||||
BtnSetHotkey.Content = "请按键...";
|
CurrentHotkeyTextBlock.Text = "请按键...";
|
||||||
Focus();
|
Focus();
|
||||||
KeyDown += HotkeyItem_KeyDown;
|
KeyDown += HotkeyItem_KeyDown;
|
||||||
KeyUp += HotkeyItem_KeyUp;
|
KeyUp += HotkeyItem_KeyUp;
|
||||||
@@ -87,7 +87,7 @@ namespace Ink_Canvas.Windows
|
|||||||
|
|
||||||
private void StopHotkeyCapture()
|
private void StopHotkeyCapture()
|
||||||
{
|
{
|
||||||
BtnSetHotkey.Content = "设置";
|
UpdateHotkeyDisplay();
|
||||||
KeyDown -= HotkeyItem_KeyDown;
|
KeyDown -= HotkeyItem_KeyDown;
|
||||||
KeyUp -= HotkeyItem_KeyUp;
|
KeyUp -= HotkeyItem_KeyUp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user