@@ -2817,7 +2817,7 @@ namespace Ink_Canvas
|
|||||||
if (isOpeningOrHidingSettingsPane) return;
|
if (isOpeningOrHidingSettingsPane) return;
|
||||||
HideSubPanels();
|
HideSubPanels();
|
||||||
{
|
{
|
||||||
var settingsWindow = new Windows.SettingsViews2.SettingsWindow2();
|
var settingsWindow = new Windows.SettingsViews.SettingsWindow();
|
||||||
settingsWindow.Owner = this;
|
settingsWindow.Owner = this;
|
||||||
settingsWindow.ShowDialog();
|
settingsWindow.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +1,70 @@
|
|||||||
<UserControl x:Class="Ink_Canvas.Windows.HotkeyItem"
|
<UserControl x:Class="Ink_Canvas.Windows.HotkeyItem"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
||||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="60" d:DesignWidth="600">
|
d:DesignHeight="60"
|
||||||
|
d:DesignWidth="600">
|
||||||
<Border Background="White"
|
|
||||||
BorderBrush="#E0E0E0"
|
<Border Background="#2d2d30"
|
||||||
BorderThickness="1"
|
BorderBrush="#3f3f46"
|
||||||
CornerRadius="5"
|
BorderThickness="1"
|
||||||
Margin="0,2">
|
CornerRadius="6"
|
||||||
<Grid Margin="15,10">
|
Margin="0,2"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<Grid Margin="14,10">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- 左侧信息 -->
|
|
||||||
<ikw:SimpleStackPanel Grid.Column="0" VerticalAlignment="Center">
|
<ikw:SimpleStackPanel Grid.Column="0" VerticalAlignment="Center">
|
||||||
<TextBlock x:Name="TitleTextBlock"
|
<TextBlock x:Name="TitleTextBlock"
|
||||||
Text="快捷键标题"
|
Text="快捷键标题"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
Foreground="#333333"/>
|
Foreground="#fafafa" />
|
||||||
<TextBlock x:Name="DescriptionTextBlock"
|
<TextBlock x:Name="DescriptionTextBlock"
|
||||||
Text="快捷键描述"
|
Text="快捷键描述"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="#666666"
|
Foreground="#a1a1aa"
|
||||||
Margin="0,2,0,0"/>
|
Margin="0,2,0,0"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
</ikw:SimpleStackPanel>
|
</ikw:SimpleStackPanel>
|
||||||
|
|
||||||
<!-- 当前快捷键显示 -->
|
<Border Grid.Column="1"
|
||||||
<Border Grid.Column="1"
|
Background="#3f3f46"
|
||||||
Background="#F5F5F5"
|
BorderBrush="#71717a"
|
||||||
BorderBrush="#D0D0D0"
|
BorderThickness="1"
|
||||||
BorderThickness="1"
|
CornerRadius="4"
|
||||||
CornerRadius="3"
|
Margin="10,0,0,0"
|
||||||
Margin="10,0,0,0"
|
Padding="10,6"
|
||||||
Padding="8,4">
|
VerticalAlignment="Center">
|
||||||
<TextBlock x:Name="CurrentHotkeyTextBlock"
|
<TextBlock x:Name="CurrentHotkeyTextBlock"
|
||||||
Text="未设置"
|
Text="未设置"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="#666666"
|
FontFamily="Consolas"
|
||||||
MinWidth="80"
|
FontWeight="SemiBold"
|
||||||
TextAlignment="Center"/>
|
Foreground="#fafafa"
|
||||||
|
MinWidth="88"
|
||||||
|
TextAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- 设置按钮 -->
|
<Button x:Name="BtnSetHotkey"
|
||||||
<Button x:Name="BtnSetHotkey"
|
Grid.Column="2"
|
||||||
Grid.Column="2"
|
Content="设置"
|
||||||
Content="设置"
|
Width="72"
|
||||||
Width="60"
|
Height="30"
|
||||||
Height="28"
|
FontSize="12"
|
||||||
Background="#0066BF"
|
|
||||||
Foreground="White"
|
|
||||||
FontSize="12"
|
|
||||||
Margin="10,0,0,0"
|
Margin="10,0,0,0"
|
||||||
Click="BtnSetHotkey_Click"/>
|
VerticalAlignment="Center"
|
||||||
|
Style="{DynamicResource PrimaryButtonStyle}"
|
||||||
|
Padding="12,4"
|
||||||
|
Click="BtnSetHotkey_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -11,6 +11,16 @@ namespace Ink_Canvas.Windows
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class HotkeyItem : UserControl
|
public partial class HotkeyItem : UserControl
|
||||||
{
|
{
|
||||||
|
private static readonly SolidColorBrush HotkeyValueForeground = CreateFrozenBrush(0xFA, 0xFA, 0xFA);
|
||||||
|
private static readonly SolidColorBrush HotkeyPlaceholderForeground = CreateFrozenBrush(0xA1, 0xA1, 0xAA);
|
||||||
|
|
||||||
|
private static SolidColorBrush CreateFrozenBrush(byte r, byte g, byte b)
|
||||||
|
{
|
||||||
|
var brush = new SolidColorBrush(Color.FromRgb(r, g, b));
|
||||||
|
brush.Freeze();
|
||||||
|
return brush;
|
||||||
|
}
|
||||||
|
|
||||||
#region Events
|
#region Events
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 快捷键变更事件
|
/// 快捷键变更事件
|
||||||
@@ -80,13 +90,13 @@ namespace Ink_Canvas.Windows
|
|||||||
if (_currentKey == Key.None)
|
if (_currentKey == Key.None)
|
||||||
{
|
{
|
||||||
CurrentHotkeyTextBlock.Text = "未设置";
|
CurrentHotkeyTextBlock.Text = "未设置";
|
||||||
CurrentHotkeyTextBlock.Foreground = Brushes.Gray;
|
CurrentHotkeyTextBlock.Foreground = HotkeyPlaceholderForeground;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var modifiersText = _currentModifiers == ModifierKeys.None ? "" : $"{_currentModifiers}+";
|
var modifiersText = _currentModifiers == ModifierKeys.None ? "" : $"{_currentModifiers}+";
|
||||||
CurrentHotkeyTextBlock.Text = $"{modifiersText}{_currentKey}";
|
CurrentHotkeyTextBlock.Text = $"{modifiersText}{_currentKey}";
|
||||||
CurrentHotkeyTextBlock.Foreground = Brushes.Black;
|
CurrentHotkeyTextBlock.Foreground = HotkeyValueForeground;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +116,7 @@ namespace Ink_Canvas.Windows
|
|||||||
private void StopHotkeyCapture()
|
private void StopHotkeyCapture()
|
||||||
{
|
{
|
||||||
BtnSetHotkey.Content = "设置";
|
BtnSetHotkey.Content = "设置";
|
||||||
BtnSetHotkey.Background = Brushes.DodgerBlue;
|
BtnSetHotkey.ClearValue(Button.BackgroundProperty);
|
||||||
|
|
||||||
// 移除键盘事件处理器
|
// 移除键盘事件处理器
|
||||||
KeyDown -= HotkeyItem_KeyDown;
|
KeyDown -= HotkeyItem_KeyDown;
|
||||||
|
|||||||
@@ -6,216 +6,370 @@
|
|||||||
xmlns:local="clr-namespace:Ink_Canvas.Windows"
|
xmlns:local="clr-namespace:Ink_Canvas.Windows"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
ui:ThemeManager.RequestedTheme="Light"
|
mc:Ignorable="d"
|
||||||
Background="#F9F9F9"
|
Title="快捷键设置"
|
||||||
AllowsTransparency="True"
|
Height="600"
|
||||||
mc:Ignorable="d"
|
Width="800"
|
||||||
WindowStyle="None"
|
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
ResizeMode="CanResize"
|
ResizeMode="CanResize"
|
||||||
Title="快捷键设置"
|
FontFamily="Microsoft YaHei UI"
|
||||||
Height="600"
|
ui:ThemeManager.IsThemeAware="True"
|
||||||
Width="800">
|
ui:TitleBar.ExtendViewIntoTitleBar="True"
|
||||||
|
ui:WindowHelper.SystemBackdropType="Mica"
|
||||||
|
ui:WindowHelper.UseModernWindowStyle="True"
|
||||||
|
ui:TitleBar.Height="48">
|
||||||
|
|
||||||
|
<Window.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<SolidColorBrush x:Key="WindowBackground" Color="#1e1e1e" />
|
||||||
|
<SolidColorBrush x:Key="BorderBrush" Color="#3f3f46" />
|
||||||
|
<SolidColorBrush x:Key="TextForeground" Color="#fafafa" />
|
||||||
|
<SolidColorBrush x:Key="TextSecondary" Color="#a1a1aa" />
|
||||||
|
<SolidColorBrush x:Key="AccentColor" Color="#3b82f6" />
|
||||||
|
<SolidColorBrush x:Key="TitleForeground" Color="#fafafa" />
|
||||||
|
|
||||||
|
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Background" Value="{StaticResource AccentColor}" />
|
||||||
|
<Setter Property="Foreground" Value="White" />
|
||||||
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
<Setter Property="FontWeight" Value="SemiBold" />
|
||||||
|
<Setter Property="Padding" Value="16,8" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="{TemplateBinding Background}"
|
||||||
|
CornerRadius="4"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
|
<ContentPresenter HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#2563eb" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="#1d4ed8" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource TextForeground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="FontWeight" Value="SemiBold" />
|
||||||
|
<Setter Property="Padding" Value="16,8" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="4"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
|
<ContentPresenter HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#27272a" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- 标题栏 -->
|
<!-- 标题栏(与云存储管理等新设置窗口一致) -->
|
||||||
<Border Grid.Row="0" Background="#3B82F6" Height="60"
|
<Border x:Name="Border_TitleBarRoot"
|
||||||
|
Grid.Row="0"
|
||||||
|
Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.Height)}"
|
||||||
MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
|
MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
|
||||||
<Grid>
|
<Grid>
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0,0,0">
|
<Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="快捷键设置"
|
<ColumnDefinition />
|
||||||
Foreground="White"
|
<ColumnDefinition Width="Auto" />
|
||||||
FontSize="22"
|
<ColumnDefinition Width="Auto" />
|
||||||
FontWeight="SemiBold"
|
</Grid.ColumnDefinitions>
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
</StackPanel>
|
<TextBlock Grid.Column="0"
|
||||||
<Button x:Name="BtnClose"
|
Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=Title}"
|
||||||
Content=""
|
VerticalAlignment="Center"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
Margin="12,0,0,0"
|
||||||
HorizontalAlignment="Right"
|
FontSize="12"
|
||||||
VerticalAlignment="Center"
|
FontWeight="SemiBold"
|
||||||
Margin="0,0,20,0"
|
Foreground="{StaticResource TitleForeground}" />
|
||||||
Background="Transparent"
|
|
||||||
BorderThickness="0"
|
<ikw:SimpleStackPanel x:Name="StackPanel_RightButtons"
|
||||||
FontSize="16"
|
Grid.Column="1"
|
||||||
Foreground="White"
|
Orientation="Horizontal"
|
||||||
Click="BtnClose_Click"/>
|
Spacing="5"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
|
||||||
|
<Rectangle Grid.Column="2"
|
||||||
|
Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.SystemOverlayRightInset)}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- 主内容区 -->
|
<!-- 主内容 -->
|
||||||
<ScrollViewer Grid.Row="1" Margin="20" VerticalScrollBarVisibility="Auto">
|
<Border Grid.Row="1"
|
||||||
<ikw:SimpleStackPanel Margin="20">
|
Background="{StaticResource WindowBackground}"
|
||||||
<!-- 说明文字 -->
|
Padding="20,10,20,16">
|
||||||
<TextBlock Text="在这里可以自定义全局快捷键设置。全局快捷键在任何情况下都能生效,即使应用程序不在焦点状态。"
|
<ui:ScrollViewerEx VerticalScrollBarVisibility="Auto"
|
||||||
TextWrapping="Wrap"
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
Margin="0,0,0,20"
|
PanningMode="VerticalOnly"
|
||||||
Foreground="#666666"/>
|
ui:ThemeManager.RequestedTheme="Dark">
|
||||||
|
<ikw:SimpleStackPanel Spacing="14">
|
||||||
|
<TextBlock Text="在这里可以自定义全局快捷键设置。全局快捷键在任何情况下都能生效,即使应用程序不在焦点状态。"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Foreground="{StaticResource TextSecondary}"
|
||||||
|
FontSize="14"
|
||||||
|
LineHeight="20" />
|
||||||
|
|
||||||
<!-- 鼠标模式快捷键设置 -->
|
<Border BorderThickness="1"
|
||||||
<GroupBox Header="鼠标模式设置" Margin="0,0,0,20">
|
BorderBrush="{StaticResource BorderBrush}"
|
||||||
<ikw:SimpleStackPanel>
|
CornerRadius="8"
|
||||||
<ikw:SimpleStackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
Padding="18,16"
|
||||||
<ui:ToggleSwitch x:Name="ToggleSwitchEnableHotkeysInMouseMode"
|
Background="#27272a">
|
||||||
Header="在鼠标模式下启用快捷键"
|
<ikw:SimpleStackPanel Spacing="10">
|
||||||
Margin="0,0,10,0"
|
<TextBlock Text="鼠标模式"
|
||||||
Width="200"/>
|
FontSize="18"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{StaticResource TextForeground}" />
|
||||||
|
<Border Height="1"
|
||||||
|
Background="{StaticResource BorderBrush}"
|
||||||
|
HorizontalAlignment="Stretch" />
|
||||||
|
<ikw:SimpleStackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
|
<ui:ToggleSwitch x:Name="ToggleSwitchEnableHotkeysInMouseMode"
|
||||||
|
Header="在鼠标模式下启用快捷键"
|
||||||
|
OnContent=""
|
||||||
|
OffContent=""
|
||||||
|
FontFamily="Microsoft YaHei UI"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Margin="0,0,10,0"
|
||||||
|
Width="220" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
<TextBlock Text="开启后,即使在鼠标模式下快捷键也会生效"
|
||||||
|
Foreground="{StaticResource TextSecondary}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
FontSize="13" />
|
||||||
</ikw:SimpleStackPanel>
|
</ikw:SimpleStackPanel>
|
||||||
<TextBlock Text="开启后,即使在鼠标模式下快捷键也会生效"
|
</Border>
|
||||||
Foreground="#666666"
|
|
||||||
VerticalAlignment="Center"
|
<ikw:SimpleStackPanel x:Name="HotkeyList" Spacing="12">
|
||||||
TextWrapping="Wrap"/>
|
<!-- 基本操作 -->
|
||||||
|
<Border BorderThickness="1"
|
||||||
|
BorderBrush="{StaticResource BorderBrush}"
|
||||||
|
CornerRadius="8"
|
||||||
|
Padding="18,16"
|
||||||
|
Background="#27272a">
|
||||||
|
<ikw:SimpleStackPanel Spacing="10">
|
||||||
|
<TextBlock Text="基本操作"
|
||||||
|
FontSize="18"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{StaticResource TextForeground}" />
|
||||||
|
<Border Height="1"
|
||||||
|
Background="{StaticResource BorderBrush}"
|
||||||
|
HorizontalAlignment="Stretch" />
|
||||||
|
<ikw:SimpleStackPanel Spacing="4">
|
||||||
|
<local:HotkeyItem x:Name="UndoHotkey"
|
||||||
|
Title="撤销"
|
||||||
|
Description="撤销上一步操作"
|
||||||
|
DefaultKey="Z"
|
||||||
|
DefaultModifiers="Control" />
|
||||||
|
<local:HotkeyItem x:Name="RedoHotkey"
|
||||||
|
Title="重做"
|
||||||
|
Description="重做上一步操作"
|
||||||
|
DefaultKey="Y"
|
||||||
|
DefaultModifiers="Control" />
|
||||||
|
<local:HotkeyItem x:Name="ClearHotkey"
|
||||||
|
Title="清空"
|
||||||
|
Description="清空当前画板内容"
|
||||||
|
DefaultKey="E"
|
||||||
|
DefaultModifiers="Control" />
|
||||||
|
<local:HotkeyItem x:Name="PasteHotkey"
|
||||||
|
Title="粘贴"
|
||||||
|
Description="粘贴剪贴板内容"
|
||||||
|
DefaultKey="V"
|
||||||
|
DefaultModifiers="Control" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 工具切换 -->
|
||||||
|
<Border BorderThickness="1"
|
||||||
|
BorderBrush="{StaticResource BorderBrush}"
|
||||||
|
CornerRadius="8"
|
||||||
|
Padding="18,16"
|
||||||
|
Background="#27272a">
|
||||||
|
<ikw:SimpleStackPanel Spacing="10">
|
||||||
|
<TextBlock Text="工具切换"
|
||||||
|
FontSize="18"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{StaticResource TextForeground}" />
|
||||||
|
<Border Height="1"
|
||||||
|
Background="{StaticResource BorderBrush}"
|
||||||
|
HorizontalAlignment="Stretch" />
|
||||||
|
<ikw:SimpleStackPanel Spacing="4">
|
||||||
|
<local:HotkeyItem x:Name="SelectToolHotkey"
|
||||||
|
Title="选择工具"
|
||||||
|
Description="切换到选择工具"
|
||||||
|
DefaultKey="S"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="DrawToolHotkey"
|
||||||
|
Title="绘图工具"
|
||||||
|
Description="切换到绘图工具"
|
||||||
|
DefaultKey="D"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="EraserToolHotkey"
|
||||||
|
Title="橡皮擦工具"
|
||||||
|
Description="切换到橡皮擦工具"
|
||||||
|
DefaultKey="E"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="BlackboardToolHotkey"
|
||||||
|
Title="黑板工具"
|
||||||
|
Description="切换到黑板工具"
|
||||||
|
DefaultKey="B"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="QuitDrawToolHotkey"
|
||||||
|
Title="退出绘图/白板"
|
||||||
|
Description="退出绘图模式或白板模式"
|
||||||
|
DefaultKey="Q"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 画笔设置 -->
|
||||||
|
<Border BorderThickness="1"
|
||||||
|
BorderBrush="{StaticResource BorderBrush}"
|
||||||
|
CornerRadius="8"
|
||||||
|
Padding="18,16"
|
||||||
|
Background="#27272a">
|
||||||
|
<ikw:SimpleStackPanel Spacing="10">
|
||||||
|
<TextBlock Text="画笔设置"
|
||||||
|
FontSize="18"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{StaticResource TextForeground}" />
|
||||||
|
<Border Height="1"
|
||||||
|
Background="{StaticResource BorderBrush}"
|
||||||
|
HorizontalAlignment="Stretch" />
|
||||||
|
<ikw:SimpleStackPanel Spacing="4">
|
||||||
|
<local:HotkeyItem x:Name="Pen1Hotkey"
|
||||||
|
Title="画笔1"
|
||||||
|
Description="选择画笔1"
|
||||||
|
DefaultKey="D1"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="Pen2Hotkey"
|
||||||
|
Title="画笔2"
|
||||||
|
Description="选择画笔2"
|
||||||
|
DefaultKey="D2"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="Pen3Hotkey"
|
||||||
|
Title="画笔3"
|
||||||
|
Description="选择画笔3"
|
||||||
|
DefaultKey="D3"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="Pen4Hotkey"
|
||||||
|
Title="画笔4"
|
||||||
|
Description="选择画笔4"
|
||||||
|
DefaultKey="D4"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="Pen5Hotkey"
|
||||||
|
Title="画笔5"
|
||||||
|
Description="选择画笔5"
|
||||||
|
DefaultKey="D5"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 功能快捷键 -->
|
||||||
|
<Border BorderThickness="1"
|
||||||
|
BorderBrush="{StaticResource BorderBrush}"
|
||||||
|
CornerRadius="8"
|
||||||
|
Padding="18,16"
|
||||||
|
Background="#27272a">
|
||||||
|
<ikw:SimpleStackPanel Spacing="10">
|
||||||
|
<TextBlock Text="功能快捷键"
|
||||||
|
FontSize="18"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{StaticResource TextForeground}" />
|
||||||
|
<Border Height="1"
|
||||||
|
Background="{StaticResource BorderBrush}"
|
||||||
|
HorizontalAlignment="Stretch" />
|
||||||
|
<ikw:SimpleStackPanel Spacing="4">
|
||||||
|
<local:HotkeyItem x:Name="DrawLineHotkey"
|
||||||
|
Title="绘制直线"
|
||||||
|
Description="绘制直线工具"
|
||||||
|
DefaultKey="L"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="ScreenshotHotkey"
|
||||||
|
Title="截图"
|
||||||
|
Description="保存屏幕截图到桌面"
|
||||||
|
DefaultKey="C"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="QuickDrawHotkey"
|
||||||
|
Title="快抽"
|
||||||
|
Description="打开快抽窗口(与悬浮快抽按钮相同)"
|
||||||
|
DefaultKey="K"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="HideHotkey"
|
||||||
|
Title="隐藏"
|
||||||
|
Description="隐藏应用程序"
|
||||||
|
DefaultKey="V"
|
||||||
|
DefaultModifiers="Alt" />
|
||||||
|
<local:HotkeyItem x:Name="ExitHotkey"
|
||||||
|
Title="退出"
|
||||||
|
Description="退出当前模式或应用程序"
|
||||||
|
DefaultKey="Escape"
|
||||||
|
DefaultModifiers="None" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Border>
|
||||||
</ikw:SimpleStackPanel>
|
</ikw:SimpleStackPanel>
|
||||||
</GroupBox>
|
</ikw:SimpleStackPanel>
|
||||||
|
</ui:ScrollViewerEx>
|
||||||
<!-- 快捷键列表 -->
|
</Border>
|
||||||
<ikw:SimpleStackPanel x:Name="HotkeyList" Margin="0,0,0,20">
|
|
||||||
<!-- 基本操作 -->
|
|
||||||
<GroupBox Header="基本操作" Margin="0,0,0,15">
|
|
||||||
<ikw:SimpleStackPanel>
|
|
||||||
<local:HotkeyItem x:Name="UndoHotkey"
|
|
||||||
Title="撤销"
|
|
||||||
Description="撤销上一步操作"
|
|
||||||
DefaultKey="Z"
|
|
||||||
DefaultModifiers="Control"/>
|
|
||||||
<local:HotkeyItem x:Name="RedoHotkey"
|
|
||||||
Title="重做"
|
|
||||||
Description="重做上一步操作"
|
|
||||||
DefaultKey="Y"
|
|
||||||
DefaultModifiers="Control"/>
|
|
||||||
<local:HotkeyItem x:Name="ClearHotkey"
|
|
||||||
Title="清空"
|
|
||||||
Description="清空当前画板内容"
|
|
||||||
DefaultKey="E"
|
|
||||||
DefaultModifiers="Control"/>
|
|
||||||
<local:HotkeyItem x:Name="PasteHotkey"
|
|
||||||
Title="粘贴"
|
|
||||||
Description="粘贴剪贴板内容"
|
|
||||||
DefaultKey="V"
|
|
||||||
DefaultModifiers="Control"/>
|
|
||||||
</ikw:SimpleStackPanel>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
<!-- 工具切换 -->
|
|
||||||
<GroupBox Header="工具切换" Margin="0,0,0,15">
|
|
||||||
<ikw:SimpleStackPanel>
|
|
||||||
<local:HotkeyItem x:Name="SelectToolHotkey"
|
|
||||||
Title="选择工具"
|
|
||||||
Description="切换到选择工具"
|
|
||||||
DefaultKey="S"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="DrawToolHotkey"
|
|
||||||
Title="绘图工具"
|
|
||||||
Description="切换到绘图工具"
|
|
||||||
DefaultKey="D"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="EraserToolHotkey"
|
|
||||||
Title="橡皮擦工具"
|
|
||||||
Description="切换到橡皮擦工具"
|
|
||||||
DefaultKey="E"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="BlackboardToolHotkey"
|
|
||||||
Title="黑板工具"
|
|
||||||
Description="切换到黑板工具"
|
|
||||||
DefaultKey="B"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="QuitDrawToolHotkey"
|
|
||||||
Title="退出绘图/白板"
|
|
||||||
Description="退出绘图模式或白板模式"
|
|
||||||
DefaultKey="Q"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
</ikw:SimpleStackPanel>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
<!-- 画笔设置 -->
|
|
||||||
<GroupBox Header="画笔设置" Margin="0,0,0,15">
|
|
||||||
<ikw:SimpleStackPanel>
|
|
||||||
<local:HotkeyItem x:Name="Pen1Hotkey"
|
|
||||||
Title="画笔1"
|
|
||||||
Description="选择画笔1"
|
|
||||||
DefaultKey="D1"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="Pen2Hotkey"
|
|
||||||
Title="画笔2"
|
|
||||||
Description="选择画笔2"
|
|
||||||
DefaultKey="D2"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="Pen3Hotkey"
|
|
||||||
Title="画笔3"
|
|
||||||
Description="选择画笔3"
|
|
||||||
DefaultKey="D3"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="Pen4Hotkey"
|
|
||||||
Title="画笔4"
|
|
||||||
Description="选择画笔4"
|
|
||||||
DefaultKey="D4"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="Pen5Hotkey"
|
|
||||||
Title="画笔5"
|
|
||||||
Description="选择画笔5"
|
|
||||||
DefaultKey="D5"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
</ikw:SimpleStackPanel>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
<!-- 功能快捷键 -->
|
|
||||||
<GroupBox Header="功能快捷键" Margin="0,0,0,15">
|
|
||||||
<ikw:SimpleStackPanel>
|
|
||||||
<local:HotkeyItem x:Name="DrawLineHotkey"
|
|
||||||
Title="绘制直线"
|
|
||||||
Description="绘制直线工具"
|
|
||||||
DefaultKey="L"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="ScreenshotHotkey"
|
|
||||||
Title="截图"
|
|
||||||
Description="保存屏幕截图到桌面"
|
|
||||||
DefaultKey="C"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="QuickDrawHotkey"
|
|
||||||
Title="快抽"
|
|
||||||
Description="打开快抽窗口(与悬浮快抽按钮相同)"
|
|
||||||
DefaultKey="K"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="HideHotkey"
|
|
||||||
Title="隐藏"
|
|
||||||
Description="隐藏应用程序"
|
|
||||||
DefaultKey="V"
|
|
||||||
DefaultModifiers="Alt"/>
|
|
||||||
<local:HotkeyItem x:Name="ExitHotkey"
|
|
||||||
Title="退出"
|
|
||||||
Description="退出当前模式或应用程序"
|
|
||||||
DefaultKey="Escape"
|
|
||||||
DefaultModifiers="None"/>
|
|
||||||
</ikw:SimpleStackPanel>
|
|
||||||
</GroupBox>
|
|
||||||
</ikw:SimpleStackPanel></ikw:SimpleStackPanel>
|
|
||||||
</ScrollViewer>
|
|
||||||
|
|
||||||
<!-- 底部操作栏 -->
|
<!-- 底部操作栏 -->
|
||||||
<Border Grid.Row="2" Background="#F0F0F0" Height="60">
|
<Border Grid.Row="2"
|
||||||
<Grid>
|
Background="#18181b"
|
||||||
<ikw:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0">
|
BorderBrush="{StaticResource BorderBrush}"
|
||||||
<Button x:Name="BtnResetToDefault"
|
BorderThickness="0,1,0,0"
|
||||||
Content="重置为默认"
|
Padding="16,12">
|
||||||
Width="100"
|
<ikw:SimpleStackPanel Orientation="Horizontal"
|
||||||
Height="35"
|
HorizontalAlignment="Right"
|
||||||
Margin="0,0,10,0"
|
VerticalAlignment="Center"
|
||||||
Click="BtnResetToDefault_Click"/>
|
Spacing="10">
|
||||||
<Button x:Name="BtnSave"
|
<Button x:Name="BtnResetToDefault"
|
||||||
Content="保存设置"
|
Content="重置为默认"
|
||||||
Width="100"
|
MinWidth="100"
|
||||||
Height="35"
|
Height="36"
|
||||||
Background="#3B82F6"
|
Style="{StaticResource SecondaryButtonStyle}"
|
||||||
Foreground="White"
|
Click="BtnResetToDefault_Click" />
|
||||||
Click="BtnSave_Click"/>
|
<Button x:Name="BtnSave"
|
||||||
</ikw:SimpleStackPanel>
|
Content="保存设置"
|
||||||
</Grid>
|
MinWidth="100"
|
||||||
|
Height="36"
|
||||||
|
Style="{StaticResource PrimaryButtonStyle}"
|
||||||
|
Click="BtnSave_Click" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -541,11 +541,6 @@ namespace Ink_Canvas.Windows
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Event Handlers
|
#region Event Handlers
|
||||||
private void BtnClose_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标题栏拖拽事件
|
/// 标题栏拖拽事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+4
-4
@@ -7,7 +7,7 @@ using System.Windows.Controls;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Media = System.Windows.Media;
|
using Media = System.Windows.Media;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
{
|
{
|
||||||
public static class MainWindowSettingsHelper
|
public static class MainWindowSettingsHelper
|
||||||
{
|
{
|
||||||
@@ -331,7 +331,7 @@ namespace Ink_Canvas.Windows.SettingsViews2
|
|||||||
// 查找所有打开的设置窗口
|
// 查找所有打开的设置窗口
|
||||||
foreach (Window window in Application.Current.Windows)
|
foreach (Window window in Application.Current.Windows)
|
||||||
{
|
{
|
||||||
if (window.GetType().Name == "SettingsWindow2")
|
if (window.GetType().Name == "SettingsWindow")
|
||||||
{
|
{
|
||||||
// 同步所有面板(保守策略)
|
// 同步所有面板(保守策略)
|
||||||
SyncAllPanels(window);
|
SyncAllPanels(window);
|
||||||
@@ -456,8 +456,8 @@ namespace Ink_Canvas.Windows.SettingsViews2
|
|||||||
// 查找所有打开的设置窗口
|
// 查找所有打开的设置窗口
|
||||||
foreach (Window window in Application.Current.Windows)
|
foreach (Window window in Application.Current.Windows)
|
||||||
{
|
{
|
||||||
// 使用类型名称匹配,因为 SettingsWindow2 在不同的命名空间中
|
// 使用类型名称匹配,因为 SettingsWindow 在不同的命名空间中
|
||||||
if (window.GetType().Name == "SettingsWindow2")
|
if (window.GetType().Name == "SettingsWindow")
|
||||||
{
|
{
|
||||||
// 同时调用 ApplyTheme 方法更新窗口本身
|
// 同时调用 ApplyTheme 方法更新窗口本身
|
||||||
var applyThemeMethod = window.GetType().GetMethod("ApplyTheme",
|
var applyThemeMethod = window.GetType().GetMethod("ApplyTheme",
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ui:Page
|
<ui:Page
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.AboutPage"
|
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.AboutPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class AboutPage : Page
|
public partial class AboutPage : Page
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.AppearancePage"
|
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.AppearancePage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
+4
-4
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class AppearancePage : Page
|
public partial class AppearancePage : Page
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Click(object sender, RoutedEventArgs e)
|
private void SettingsCard_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
settingsWindow.NavigateToPage("ThemePage");
|
settingsWindow.NavigateToPage("ThemePage");
|
||||||
@@ -33,7 +33,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Click_1(object sender, RoutedEventArgs e)
|
private void SettingsCard_Click_1(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
settingsWindow.NavigateToPage("ColorsPage");
|
settingsWindow.NavigateToPage("ColorsPage");
|
||||||
@@ -42,7 +42,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Click_2(object sender, RoutedEventArgs e)
|
private void SettingsCard_Click_2(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
settingsWindow.NavigateToPage("FontsPage");
|
settingsWindow.NavigateToPage("FontsPage");
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.BasicPage"
|
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.BasicPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
||||||
+3
-3
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Basic.xaml 的交互逻辑
|
/// Basic.xaml 的交互逻辑
|
||||||
@@ -27,8 +27,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Click(object sender, RoutedEventArgs e)
|
private void SettingsCard_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// 找到SettingsWindow2窗口
|
// 找到SettingsWindow窗口
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
// 调用NavigateToPage方法导航到启动页面
|
// 调用NavigateToPage方法导航到启动页面
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ui:Page
|
<ui:Page
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.ColorsPage"
|
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.ColorsPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class ColorsPage : Page
|
public partial class ColorsPage : Page
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.DesignPage"
|
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.DesignPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
+3
-3
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class DesignPage : Page
|
public partial class DesignPage : Page
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Click(object sender, RoutedEventArgs e)
|
private void SettingsCard_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
settingsWindow.NavigateToPage("IconographyPage");
|
settingsWindow.NavigateToPage("IconographyPage");
|
||||||
@@ -33,7 +33,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Click_1(object sender, RoutedEventArgs e)
|
private void SettingsCard_Click_1(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
settingsWindow.NavigateToPage("TypographyPage");
|
settingsWindow.NavigateToPage("TypographyPage");
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ui:Page
|
<ui:Page
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.FontsPage"
|
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.FontsPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class FontsPage : Page
|
public partial class FontsPage : Page
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.HomePage"
|
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.HomePage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
||||||
+9
-9
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HomePage.xaml 的交互逻辑
|
/// HomePage.xaml 的交互逻辑
|
||||||
@@ -27,8 +27,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Basic_Click(object sender, RoutedEventArgs e)
|
private void SettingsCard_Basic_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// 找到SettingsWindow2窗口
|
// 找到SettingsWindow窗口
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
// 调用NavigateToPage方法导航到基本设置页面
|
// 调用NavigateToPage方法导航到基本设置页面
|
||||||
@@ -38,8 +38,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Page2_Click(object sender, RoutedEventArgs e)
|
private void SettingsCard_Page2_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// 找到SettingsWindow2窗口
|
// 找到SettingsWindow窗口
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
// 调用NavigateToPage方法导航到页面2
|
// 调用NavigateToPage方法导航到页面2
|
||||||
@@ -49,8 +49,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Design_Click(object sender, RoutedEventArgs e)
|
private void SettingsCard_Design_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// 找到SettingsWindow2窗口
|
// 找到SettingsWindow窗口
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
// 调用NavigateToPage方法导航到设计设置页面
|
// 调用NavigateToPage方法导航到设计设置页面
|
||||||
@@ -60,8 +60,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
|
|
||||||
private void SettingsCard_Appearance_Click(object sender, RoutedEventArgs e)
|
private void SettingsCard_Appearance_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// 找到SettingsWindow2窗口
|
// 找到SettingsWindow窗口
|
||||||
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
|
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
|
||||||
if (settingsWindow != null)
|
if (settingsWindow != null)
|
||||||
{
|
{
|
||||||
// 调用NavigateToPage方法导航到外观设置页面
|
// 调用NavigateToPage方法导航到外观设置页面
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ui:Page
|
<ui:Page
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.IconographyPage"
|
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.IconographyPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class IconographyPage : iNKORE.UI.WPF.Modern.Controls.Page
|
public partial class IconographyPage : iNKORE.UI.WPF.Modern.Controls.Page
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.Page2Page"
|
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.Page2Page"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
Title="Page2">
|
Title="Page2">
|
||||||
+1
-1
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Page2.xaml 的交互逻辑
|
/// Page2.xaml 的交互逻辑
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ui:Page
|
<ui:Page
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.SettingsPage"
|
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.SettingsPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class SettingsPage : Page
|
public partial class SettingsPage : Page
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.StartupPage"
|
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.StartupPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
||||||
+8
-8
@@ -2,7 +2,7 @@ using System;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// StartupPage.xaml 的交互逻辑
|
/// StartupPage.xaml 的交互逻辑
|
||||||
@@ -97,7 +97,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
bool newState = ToggleSwitchNoFocusMode.IsOn;
|
bool newState = ToggleSwitchNoFocusMode.IsOn;
|
||||||
|
|
||||||
// 使用Helper类更新设置并应用
|
// 使用Helper类更新设置并应用
|
||||||
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchNoFocusMode", newState);
|
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchNoFocusMode", newState);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -117,7 +117,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
bool newState = ToggleSwitchWindowMode.IsOn;
|
bool newState = ToggleSwitchWindowMode.IsOn;
|
||||||
|
|
||||||
// 使用Helper类更新设置并应用
|
// 使用Helper类更新设置并应用
|
||||||
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchWindowMode", newState);
|
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchWindowMode", newState);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -137,7 +137,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
bool newState = ToggleSwitchAlwaysOnTop.IsOn;
|
bool newState = ToggleSwitchAlwaysOnTop.IsOn;
|
||||||
|
|
||||||
// 使用Helper类更新设置并应用
|
// 使用Helper类更新设置并应用
|
||||||
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchAlwaysOnTop", newState);
|
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchAlwaysOnTop", newState);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -166,7 +166,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
MainWindow.SaveSettingsToFile();
|
MainWindow.SaveSettingsToFile();
|
||||||
|
|
||||||
// 通知其他面板同步状态
|
// 通知其他面板同步状态
|
||||||
Windows.SettingsViews2.MainWindowSettingsHelper.NotifySettingsPanelsSyncState("ToggleSwitchUIAccessTopMost");
|
Windows.SettingsViews.MainWindowSettingsHelper.NotifySettingsPanelsSyncState("ToggleSwitchUIAccessTopMost");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -190,7 +190,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
bool newState = ToggleSwitchRunAtStartup.IsOn;
|
bool newState = ToggleSwitchRunAtStartup.IsOn;
|
||||||
|
|
||||||
// 使用Helper类更新设置并应用
|
// 使用Helper类更新设置并应用
|
||||||
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchRunAtStartup", newState);
|
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchRunAtStartup", newState);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -210,7 +210,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
bool newState = ToggleSwitchFoldAtStartup.IsOn;
|
bool newState = ToggleSwitchFoldAtStartup.IsOn;
|
||||||
|
|
||||||
// 使用Helper类更新设置并应用
|
// 使用Helper类更新设置并应用
|
||||||
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchFoldAtStartup", newState);
|
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchFoldAtStartup", newState);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -234,7 +234,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
|||||||
bool newState = ToggleSwitchPPTOnlyMode.IsOn;
|
bool newState = ToggleSwitchPPTOnlyMode.IsOn;
|
||||||
|
|
||||||
// 使用Helper类更新设置并应用
|
// 使用Helper类更新设置并应用
|
||||||
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchMode", newState);
|
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchMode", newState);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ui:Page
|
<ui:Page
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.ThemePage"
|
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.ThemePage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class ThemePage : Page
|
public partial class ThemePage : Page
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ui:Page
|
<ui:Page
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.TypographyPage"
|
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.TypographyPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2.Pages
|
namespace Ink_Canvas.Windows.SettingsViews.Pages
|
||||||
{
|
{
|
||||||
public partial class TypographyPage : Page
|
public partial class TypographyPage : Page
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<Window
|
<Window
|
||||||
x:Class="Ink_Canvas.Windows.SettingsViews2.SettingsWindow2"
|
x:Class="Ink_Canvas.Windows.SettingsViews.SettingsWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
using Ink_Canvas.Windows.SettingsViews2.Pages;
|
using Ink_Canvas.Windows.SettingsViews.Pages;
|
||||||
using iNKORE.UI.WPF.Modern.Controls;
|
using iNKORE.UI.WPF.Modern.Controls;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -10,9 +10,9 @@ using System.Linq;
|
|||||||
using MessageBox = System.Windows.MessageBox;
|
using MessageBox = System.Windows.MessageBox;
|
||||||
using Screen = System.Windows.Forms.Screen;
|
using Screen = System.Windows.Forms.Screen;
|
||||||
|
|
||||||
namespace Ink_Canvas.Windows.SettingsViews2
|
namespace Ink_Canvas.Windows.SettingsViews
|
||||||
{
|
{
|
||||||
public partial class SettingsWindow2 : Window
|
public partial class SettingsWindow : Window
|
||||||
{
|
{
|
||||||
private readonly Dictionary<string, Type> _pageTypes;
|
private readonly Dictionary<string, Type> _pageTypes;
|
||||||
private readonly Dictionary<string, object> _pages = new Dictionary<string, object>();
|
private readonly Dictionary<string, object> _pages = new Dictionary<string, object>();
|
||||||
@@ -26,7 +26,7 @@ namespace Ink_Canvas.Windows.SettingsViews2
|
|||||||
// 标记窗口是否曾经最大化过
|
// 标记窗口是否曾经最大化过
|
||||||
private bool _wasMaximized = false;
|
private bool _wasMaximized = false;
|
||||||
|
|
||||||
public SettingsWindow2()
|
public SettingsWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
Reference in New Issue
Block a user