improve:OOBE
This commit is contained in:
@@ -0,0 +1,293 @@
|
|||||||
|
<Window x:Class="Ink_Canvas.Windows.OobePresetWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="选择预设配置 - InkCanvasForClass CE"
|
||||||
|
Height="560" Width="680"
|
||||||
|
MinHeight="420" MinWidth="520"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Topmost="True"
|
||||||
|
ui:ThemeManager.IsThemeAware="True"
|
||||||
|
ui:TitleBar.ExtendViewIntoTitleBar="True"
|
||||||
|
ui:WindowHelper.SystemBackdropType="Mica"
|
||||||
|
ui:WindowHelper.UseModernWindowStyle="True"
|
||||||
|
ui:TitleBar.Height="40">
|
||||||
|
|
||||||
|
<Window.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ui:ThemeResources CanBeAccessedAcrossThreads="True">
|
||||||
|
<ui:ThemeResources.ThemeDictionaries />
|
||||||
|
</ui:ThemeResources>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<Border Grid.Row="0"
|
||||||
|
x:Name="AppTitleBar"
|
||||||
|
Height="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.Height)}"
|
||||||
|
Background="Transparent"
|
||||||
|
IsHitTestVisible="True"
|
||||||
|
Canvas.ZIndex="10">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition Width="137" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ikw:SimpleStackPanel Grid.Column="0"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="12"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="16,0,0,0">
|
||||||
|
<Image Source="\Resources\icc.ico" Width="18"
|
||||||
|
RenderOptions.BitmapScalingMode="HighQuality" />
|
||||||
|
<TextBlock VerticalAlignment="Center"
|
||||||
|
Text="选择预设配置"
|
||||||
|
TextWrapping="NoWrap" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
<Rectangle Grid.Column="2"
|
||||||
|
Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=(ui:TitleBar.SystemOverlayRightInset)}" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Banner Header -->
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
Padding="36,16,36,16"
|
||||||
|
BorderThickness="0,0,0,1"
|
||||||
|
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}">
|
||||||
|
<Border.Background>
|
||||||
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
||||||
|
<GradientStop Color="#1F3B82F6" Offset="0" />
|
||||||
|
<GradientStop Color="#0A10B981" Offset="1" />
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.Background>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Grid.Column="0"
|
||||||
|
Width="44" Height="44"
|
||||||
|
Margin="0,0,14,0"
|
||||||
|
CornerRadius="10"
|
||||||
|
Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}">
|
||||||
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Repair}"
|
||||||
|
FontSize="22"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<ikw:SimpleStackPanel Grid.Column="1" Spacing="2" VerticalAlignment="Center">
|
||||||
|
<TextBlock Style="{DynamicResource TitleTextBlockStyle}"
|
||||||
|
Text="选择预设配置" />
|
||||||
|
<TextBlock Style="{DynamicResource BodyTextBlockStyle}"
|
||||||
|
Opacity="0.85"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="选择一套由开发者调校的推荐配置,一键完成设置。所有选项可在「设置」中随时修改。" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 预设列表 -->
|
||||||
|
<ScrollViewer Grid.Row="2"
|
||||||
|
VerticalScrollBarVisibility="Auto"
|
||||||
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
|
PanningMode="VerticalFirst"
|
||||||
|
Padding="36,16,36,8">
|
||||||
|
<ikw:SimpleStackPanel Spacing="10">
|
||||||
|
|
||||||
|
<!-- 预设卡片: 课堂标准配置 -->
|
||||||
|
<Border x:Name="CardStandard"
|
||||||
|
CornerRadius="8"
|
||||||
|
Padding="20,16"
|
||||||
|
BorderThickness="2"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseLeftButtonDown="CardStandard_Click">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseLowBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" />
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Grid.Column="0"
|
||||||
|
Width="40" Height="40"
|
||||||
|
CornerRadius="8"
|
||||||
|
Margin="0,0,14,0"
|
||||||
|
Background="{DynamicResource SystemControlBackgroundAccentBrush}">
|
||||||
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Slideshow}"
|
||||||
|
FontSize="20"
|
||||||
|
Foreground="White"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<ikw:SimpleStackPanel Grid.Column="1" Spacing="3" VerticalAlignment="Center">
|
||||||
|
<TextBlock Style="{DynamicResource BodyStrongTextBlockStyle}"
|
||||||
|
Text="课堂标准配置" />
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Opacity="0.75"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="启用 PPT 联动、自动保存墨迹、托盘图标、双指手势,适合大多数课堂场景。" />
|
||||||
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="6" Margin="0,4,0,0">
|
||||||
|
<Border CornerRadius="4" Padding="6,2"
|
||||||
|
Background="{DynamicResource SystemControlBackgroundAccentBrush}">
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Foreground="White" Text="PPT 联动" />
|
||||||
|
</Border>
|
||||||
|
<Border CornerRadius="4" Padding="6,2"
|
||||||
|
Background="{DynamicResource SystemControlBackgroundAccentBrush}">
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Foreground="White" Text="自动保存" />
|
||||||
|
</Border>
|
||||||
|
<Border CornerRadius="4" Padding="6,2"
|
||||||
|
Background="{DynamicResource SystemControlBackgroundAccentBrush}">
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Foreground="White" Text="双指手势" />
|
||||||
|
</Border>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
<ui:FontIcon x:Name="IconStandard"
|
||||||
|
Grid.Column="2"
|
||||||
|
Icon="{x:Static ui:SegoeFluentIcons.RadioBullet}"
|
||||||
|
FontSize="20"
|
||||||
|
Margin="12,0,0,0"
|
||||||
|
Opacity="0"
|
||||||
|
Foreground="{DynamicResource SystemControlForegroundAccentBrush}"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 预设卡片: 简洁轻量配置 -->
|
||||||
|
<Border x:Name="CardLite"
|
||||||
|
CornerRadius="8"
|
||||||
|
Padding="20,16"
|
||||||
|
BorderThickness="2"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseLeftButtonDown="CardLite_Click">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseLowBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" />
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Grid.Column="0"
|
||||||
|
Width="40" Height="40"
|
||||||
|
CornerRadius="8"
|
||||||
|
Margin="0,0,14,0"
|
||||||
|
Background="#FF6366F1">
|
||||||
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"
|
||||||
|
FontSize="20"
|
||||||
|
Foreground="White"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<ikw:SimpleStackPanel Grid.Column="1" Spacing="3" VerticalAlignment="Center">
|
||||||
|
<TextBlock Style="{DynamicResource BodyStrongTextBlockStyle}"
|
||||||
|
Text="简洁轻量配置" />
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Opacity="0.75"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="关闭大部分自动化与联动功能,保持最小后台行为,适合简单批注场景。" />
|
||||||
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="6" Margin="0,4,0,0">
|
||||||
|
<Border CornerRadius="4" Padding="6,2"
|
||||||
|
Background="#FF6366F1">
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Foreground="White" Text="PPT 联动" />
|
||||||
|
</Border>
|
||||||
|
<Border CornerRadius="4" Padding="6,2"
|
||||||
|
Background="#FF6366F1">
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Foreground="White" Text="托盘图标" />
|
||||||
|
</Border>
|
||||||
|
<Border CornerRadius="4" Padding="6,2"
|
||||||
|
Background="#FF6366F1">
|
||||||
|
<TextBlock Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Foreground="White" Text="自动保存" />
|
||||||
|
</Border>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
<ui:FontIcon x:Name="IconLite"
|
||||||
|
Grid.Column="2"
|
||||||
|
Icon="{x:Static ui:SegoeFluentIcons.RadioBullet}"
|
||||||
|
FontSize="20"
|
||||||
|
Margin="12,0,0,0"
|
||||||
|
Opacity="0"
|
||||||
|
Foreground="{DynamicResource SystemControlForegroundAccentBrush}"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<Border Grid.Row="3"
|
||||||
|
Padding="36,12,36,16"
|
||||||
|
BorderThickness="0,1,0,0"
|
||||||
|
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{DynamicResource CaptionTextBlockStyle}"
|
||||||
|
Opacity="0.7"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="选择预设后将直接完成初始设置,无需逐步配置。" />
|
||||||
|
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
x:Name="BtnCancel"
|
||||||
|
MinWidth="96"
|
||||||
|
Height="32"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
Click="BtnCancel_Click">
|
||||||
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Back}" FontSize="12" />
|
||||||
|
<TextBlock Text="返回" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
x:Name="BtnApply"
|
||||||
|
MinWidth="140"
|
||||||
|
Height="32"
|
||||||
|
IsEnabled="False"
|
||||||
|
Style="{DynamicResource AccentButtonStyle}"
|
||||||
|
Click="BtnApply_Click">
|
||||||
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Accept}" FontSize="12" />
|
||||||
|
<TextBlock Text="应用并开始使用" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace Ink_Canvas.Windows
|
||||||
|
{
|
||||||
|
public partial class OobePresetWindow : Window
|
||||||
|
{
|
||||||
|
public enum PresetKind { None, Standard, Lite }
|
||||||
|
|
||||||
|
public PresetKind SelectedPreset { get; private set; } = PresetKind.None;
|
||||||
|
|
||||||
|
public OobePresetWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SelectPreset(PresetKind kind)
|
||||||
|
{
|
||||||
|
SelectedPreset = kind;
|
||||||
|
|
||||||
|
// 重置所有卡片边框
|
||||||
|
var defaultBrush = (Brush)FindResource("SystemControlForegroundBaseLowBrush");
|
||||||
|
CardStandard.BorderBrush = defaultBrush;
|
||||||
|
CardLite.BorderBrush = defaultBrush;
|
||||||
|
IconStandard.Opacity = 0;
|
||||||
|
IconLite.Opacity = 0;
|
||||||
|
|
||||||
|
var accentBrush = (Brush)FindResource("SystemControlForegroundAccentBrush");
|
||||||
|
switch (kind)
|
||||||
|
{
|
||||||
|
case PresetKind.Standard:
|
||||||
|
CardStandard.BorderBrush = accentBrush;
|
||||||
|
IconStandard.Opacity = 1;
|
||||||
|
break;
|
||||||
|
case PresetKind.Lite:
|
||||||
|
CardLite.BorderBrush = accentBrush;
|
||||||
|
IconLite.Opacity = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
BtnApply.IsEnabled = kind != PresetKind.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CardStandard_Click(object sender, MouseButtonEventArgs e) => SelectPreset(PresetKind.Standard);
|
||||||
|
|
||||||
|
private void CardLite_Click(object sender, MouseButtonEventArgs e) => SelectPreset(PresetKind.Lite);
|
||||||
|
|
||||||
|
private void BtnApply_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (SelectedPreset == PresetKind.None) return;
|
||||||
|
DialogResult = true;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BtnCancel_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = false;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── 预设定义 ────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 课堂标准配置:适合大多数教学场景,启用 PPT 联动、自动保存、手势等。
|
||||||
|
/// </summary>
|
||||||
|
public static void ApplyStandard(Settings settings)
|
||||||
|
{
|
||||||
|
if (settings == null) return;
|
||||||
|
|
||||||
|
// 启动与隐私
|
||||||
|
settings.Startup.IsFoldAtStartup = true;
|
||||||
|
settings.Startup.IsAutoUpdate = true;
|
||||||
|
settings.Startup.CrashAction = 0; // 静默重启
|
||||||
|
settings.Startup.TelemetryUploadLevel = TelemetryUploadLevel.Basic;
|
||||||
|
settings.Startup.HasAcceptedTelemetryPrivacy = true;
|
||||||
|
|
||||||
|
// 画板与墨迹
|
||||||
|
settings.Canvas.IsShowCursor = false;
|
||||||
|
settings.Canvas.DisablePressure = false;
|
||||||
|
settings.Canvas.HideStrokeWhenSelecting = true;
|
||||||
|
settings.Canvas.EnablePalmEraser = true;
|
||||||
|
|
||||||
|
// 墨迹纠正
|
||||||
|
settings.InkToShape.IsInkToShapeEnabled = true;
|
||||||
|
|
||||||
|
// 手势
|
||||||
|
settings.Gesture.IsEnableTwoFingerZoom = true;
|
||||||
|
settings.Gesture.IsEnableTwoFingerTranslate = true;
|
||||||
|
settings.Gesture.AutoSwitchTwoFingerGesture = true;
|
||||||
|
|
||||||
|
// 个性化
|
||||||
|
settings.Appearance.Theme = 2; // 跟随系统
|
||||||
|
settings.Appearance.EnableSplashScreen = false;
|
||||||
|
settings.Appearance.EnableTrayIcon = true;
|
||||||
|
settings.Appearance.IsShowQuickPanel = true;
|
||||||
|
settings.Appearance.EnableHotkeysInMouseMode = false;
|
||||||
|
|
||||||
|
// PPT 联动
|
||||||
|
settings.PowerPointSettings.PowerPointSupport = true;
|
||||||
|
settings.PowerPointSettings.IsAutoSaveStrokesInPowerPoint = true;
|
||||||
|
settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint = true;
|
||||||
|
settings.PowerPointSettings.EnablePPTTimeCapsule = true;
|
||||||
|
|
||||||
|
// 自动化
|
||||||
|
settings.Automation.IsAutoFoldInPPTSlideShow = false;
|
||||||
|
settings.Automation.IsEnableAutoSaveStrokes = true;
|
||||||
|
settings.Automation.IsAutoSaveStrokesAtClear = true;
|
||||||
|
settings.Automation.IsSaveScreenshotsInDateFolders = true;
|
||||||
|
if (settings.Automation.FloatingWindowInterceptor != null)
|
||||||
|
settings.Automation.FloatingWindowInterceptor.IsEnabled = true;
|
||||||
|
|
||||||
|
// 随机点名
|
||||||
|
settings.RandSettings.ShowRandomAndSingleDraw = true;
|
||||||
|
|
||||||
|
// 高级
|
||||||
|
settings.Advanced.IsLogEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 简洁轻量配置:最小化后台行为,适合简单批注场景。
|
||||||
|
/// </summary>
|
||||||
|
public static void ApplyLite(Settings settings)
|
||||||
|
{
|
||||||
|
if (settings == null) return;
|
||||||
|
|
||||||
|
// 启动与隐私
|
||||||
|
settings.Startup.IsFoldAtStartup = true;
|
||||||
|
settings.Startup.IsAutoUpdate = true;
|
||||||
|
settings.Startup.CrashAction = 0;
|
||||||
|
settings.Startup.TelemetryUploadLevel = TelemetryUploadLevel.None;
|
||||||
|
settings.Startup.HasAcceptedTelemetryPrivacy = true;
|
||||||
|
|
||||||
|
// 画板与墨迹
|
||||||
|
settings.Canvas.IsShowCursor = false;
|
||||||
|
settings.Canvas.DisablePressure = false;
|
||||||
|
settings.Canvas.HideStrokeWhenSelecting = true;
|
||||||
|
settings.Canvas.EnablePalmEraser = false;
|
||||||
|
|
||||||
|
// 墨迹纠正
|
||||||
|
settings.InkToShape.IsInkToShapeEnabled = false;
|
||||||
|
|
||||||
|
// 手势
|
||||||
|
settings.Gesture.IsEnableTwoFingerZoom = false;
|
||||||
|
settings.Gesture.IsEnableTwoFingerTranslate = false;
|
||||||
|
settings.Gesture.AutoSwitchTwoFingerGesture = false;
|
||||||
|
|
||||||
|
// 个性化
|
||||||
|
settings.Appearance.Theme = 2; // 跟随系统
|
||||||
|
settings.Appearance.EnableSplashScreen = false;
|
||||||
|
settings.Appearance.EnableTrayIcon = true;
|
||||||
|
settings.Appearance.IsShowQuickPanel = false;
|
||||||
|
settings.Appearance.EnableHotkeysInMouseMode = false;
|
||||||
|
|
||||||
|
// PPT 联动
|
||||||
|
settings.PowerPointSettings.PowerPointSupport = true;
|
||||||
|
settings.PowerPointSettings.IsAutoSaveStrokesInPowerPoint = true;
|
||||||
|
settings.PowerPointSettings.IsAutoSaveScreenShotInPowerPoint = true;
|
||||||
|
settings.PowerPointSettings.EnablePPTTimeCapsule = false;
|
||||||
|
|
||||||
|
// 自动化
|
||||||
|
settings.Automation.IsAutoFoldInPPTSlideShow = false;
|
||||||
|
settings.Automation.IsEnableAutoSaveStrokes = true;
|
||||||
|
settings.Automation.IsAutoSaveStrokesAtClear = true;
|
||||||
|
settings.Automation.IsSaveScreenshotsInDateFolders = false;
|
||||||
|
if (settings.Automation.FloatingWindowInterceptor != null)
|
||||||
|
settings.Automation.FloatingWindowInterceptor.IsEnabled = false;
|
||||||
|
|
||||||
|
// 随机点名
|
||||||
|
settings.RandSettings.ShowRandomAndSingleDraw = true;
|
||||||
|
|
||||||
|
// 高级
|
||||||
|
settings.Advanced.IsLogEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -194,10 +194,21 @@
|
|||||||
Style="{DynamicResource AccentButtonStyle}"
|
Style="{DynamicResource AccentButtonStyle}"
|
||||||
Click="BtnStartWelcome_Click">
|
Click="BtnStartWelcome_Click">
|
||||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<TextBlock Text="开始" />
|
<TextBlock Text="开始逐步配置" />
|
||||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}" FontSize="12" />
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}" FontSize="12" />
|
||||||
</ikw:SimpleStackPanel>
|
</ikw:SimpleStackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<Button x:Name="BtnUsePreset"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
MinWidth="180"
|
||||||
|
Height="36"
|
||||||
|
Click="BtnUsePreset_Click">
|
||||||
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Repair}" FontSize="12" />
|
||||||
|
<TextBlock Text="使用预设配置" />
|
||||||
|
</ikw:SimpleStackPanel>
|
||||||
|
</Button>
|
||||||
</ikw:SimpleStackPanel>
|
</ikw:SimpleStackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -303,6 +303,28 @@ namespace Ink_Canvas.Windows
|
|||||||
NavigateTo(0, direction: 1);
|
NavigateTo(0, direction: 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BtnUsePreset_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var presetWindow = new OobePresetWindow { Owner = this };
|
||||||
|
bool? result = presetWindow.ShowDialog();
|
||||||
|
if (result != true) return;
|
||||||
|
|
||||||
|
switch (presetWindow.SelectedPreset)
|
||||||
|
{
|
||||||
|
case OobePresetWindow.PresetKind.Standard:
|
||||||
|
OobePresetWindow.ApplyStandard(_settings);
|
||||||
|
break;
|
||||||
|
case OobePresetWindow.PresetKind.Lite:
|
||||||
|
OobePresetWindow.ApplyLite(_settings);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogResult = true;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
private void BtnConfirm_Click(object sender, RoutedEventArgs e)
|
private void BtnConfirm_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (_currentStep == FinishIndex)
|
if (_currentStep == FinishIndex)
|
||||||
|
|||||||
Reference in New Issue
Block a user