- Fluent Design 风格 UI,深色/浅色主题切换 - 平滑过渡动画(页面切换、按钮交互、状态变化) - 五大核心功能:安装管理、墨迹管理、格式转换、触摸设置、激活管理 - 基于 dotnetCampus.EasiPlugin.Sdk v2.1.1-alpha.3 插件框架 - WPF 安装向导(欢迎页 -> 安装页 -> 完成页)
306 lines
13 KiB
XML
306 lines
13 KiB
XML
<!--
|
||
InstallPage.xaml - Better-Seewo 安装向导安装页面
|
||
显示安装路径、进度条、安装日志和安装步骤状态
|
||
作者:雾启工作室
|
||
-->
|
||
|
||
<Page x:Class="Better_Seewo.Installer.Pages.InstallPage"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
Background="Transparent">
|
||
|
||
<!-- ===== 页面入场动画 ===== -->
|
||
<Page.Triggers>
|
||
<EventTrigger RoutedEvent="Page.Loaded">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<!-- 路径区域:淡入 -->
|
||
<DoubleAnimation Storyboard.TargetName="PathPanel"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="0" To="1"
|
||
Duration="0:0:0.400">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
|
||
<!-- 进度区域:淡入(延迟 100ms) -->
|
||
<DoubleAnimation Storyboard.TargetName="ProgressPanel"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="0" To="1"
|
||
Duration="0:0:0.400"
|
||
BeginTime="0:0:0.100">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
|
||
<!-- 步骤区域:淡入(延迟 200ms) -->
|
||
<DoubleAnimation Storyboard.TargetName="StepsPanel"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="0" To="1"
|
||
Duration="0:0:0.400"
|
||
BeginTime="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
|
||
<!-- 日志区域:淡入(延迟 300ms) -->
|
||
<DoubleAnimation Storyboard.TargetName="LogPanel"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="0" To="1"
|
||
Duration="0:0:0.400"
|
||
BeginTime="0:0:0.300">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
</Page.Triggers>
|
||
|
||
<!-- ===== 页面内容 ===== -->
|
||
<Grid Margin="40,24,40,16">
|
||
|
||
<Grid.RowDefinitions>
|
||
<!-- 标题 -->
|
||
<RowDefinition Height="Auto" />
|
||
<!-- 下方内容区 -->
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<!-- 标题 -->
|
||
<TextBlock Grid.Row="0"
|
||
Text="正在安装..."
|
||
FontSize="20"
|
||
FontWeight="SemiBold"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
Margin="0,0,0,16" />
|
||
|
||
<!-- 下方内容区 -->
|
||
<Grid Grid.Row="1">
|
||
<Grid.RowDefinitions>
|
||
<!-- 安装路径 -->
|
||
<RowDefinition Height="Auto" />
|
||
<!-- 进度条 -->
|
||
<RowDefinition Height="Auto" />
|
||
<!-- 安装步骤 -->
|
||
<RowDefinition Height="Auto" />
|
||
<!-- 安装日志(填充剩余空间) -->
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 安装路径 ===== -->
|
||
<!-- ============================== -->
|
||
<StackPanel x:Name="PathPanel"
|
||
Opacity="0"
|
||
Margin="0,0,0,16">
|
||
|
||
<!-- 路径标签 -->
|
||
<TextBlock Text="安装路径"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
Margin="0,0,0,4" />
|
||
|
||
<!-- 路径输入行 -->
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<!-- 路径输入框 -->
|
||
<ColumnDefinition Width="*" />
|
||
<!-- 浏览按钮 -->
|
||
<ColumnDefinition Width="Auto" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- 路径 TextBox -->
|
||
<TextBox x:Name="TxtInstallPath"
|
||
Grid.Column="0"
|
||
Text="C:\Program Files (x86)\Seewo\EasiNote5\Plugins\Better-EN5"
|
||
FontSize="12"
|
||
FontFamily="Microsoft YaHei UI"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
Background="{DynamicResource InputBackgroundBrush}"
|
||
BorderBrush="{DynamicResource BorderBrush}"
|
||
BorderThickness="1"
|
||
Padding="8,6"
|
||
VerticalContentAlignment="Center"
|
||
IsReadOnly="True" />
|
||
|
||
<!-- 浏览按钮 -->
|
||
<Button Grid.Column="1"
|
||
Content="浏览..."
|
||
FontSize="12"
|
||
Height="32"
|
||
Padding="12,0"
|
||
Margin="6,0,0,0"
|
||
Background="{DynamicResource CardBackgroundBrush}"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
BorderBrush="{DynamicResource BorderBrush}"
|
||
BorderThickness="1"
|
||
Cursor="Hand"
|
||
Click="BtnBrowse_Click" />
|
||
</Grid>
|
||
</StackPanel>
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 进度条 ===== -->
|
||
<!-- ============================== -->
|
||
<StackPanel x:Name="ProgressPanel"
|
||
Opacity="0"
|
||
Margin="0,0,0,16">
|
||
|
||
<!-- 进度条轨道背景 -->
|
||
<Border Background="{DynamicResource ProgressTrackBrush}"
|
||
CornerRadius="4"
|
||
Height="6"
|
||
Margin="0,0,0,4"
|
||
ClipToBounds="True">
|
||
|
||
<!-- 进度条前景(实际进度) -->
|
||
<Grid>
|
||
<!-- 百分比文字背景(覆盖在进度条上) -->
|
||
<Rectangle x:Name="ProgressFill"
|
||
Fill="{DynamicResource AccentBrush}"
|
||
Width="0"
|
||
HorizontalAlignment="Left" />
|
||
</Grid>
|
||
</Border>
|
||
|
||
<!-- 百分比文字 -->
|
||
<TextBlock x:Name="TxtProgress"
|
||
Text="0%"
|
||
FontSize="11"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
HorizontalAlignment="Right" />
|
||
</StackPanel>
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 安装步骤状态 ===== -->
|
||
<!-- ============================== -->
|
||
<StackPanel x:Name="StepsPanel"
|
||
Opacity="0"
|
||
Margin="0,0,0,16">
|
||
|
||
<!-- 步骤标签 -->
|
||
<TextBlock Text="安装步骤"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
Margin="0,0,0,8" />
|
||
|
||
<!-- 步骤 1:检测 EN5 安装状态 -->
|
||
<Grid Margin="0,0,0,6">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- 状态图标 -->
|
||
<TextBlock x:Name="Step1Icon"
|
||
Grid.Column="0"
|
||
Text="⏳"
|
||
FontSize="14"
|
||
VerticalAlignment="Center"
|
||
Margin="0,0,10,0" />
|
||
|
||
<!-- 步骤描述 -->
|
||
<TextBlock Grid.Column="1"
|
||
Text="检测 EN5 安装状态"
|
||
FontSize="13"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
VerticalAlignment="Center" />
|
||
</Grid>
|
||
|
||
<!-- 步骤 2:复制插件文件 -->
|
||
<Grid Margin="0,0,0,6">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- 状态图标 -->
|
||
<TextBlock x:Name="Step2Icon"
|
||
Grid.Column="0"
|
||
Text="⏳"
|
||
FontSize="14"
|
||
VerticalAlignment="Center"
|
||
Margin="0,0,10,0" />
|
||
|
||
<!-- 步骤描述 -->
|
||
<TextBlock Grid.Column="1"
|
||
Text="复制插件文件"
|
||
FontSize="13"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
VerticalAlignment="Center" />
|
||
</Grid>
|
||
|
||
<!-- 步骤 3:注册插件 -->
|
||
<Grid Margin="0,0,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- 状态图标 -->
|
||
<TextBlock x:Name="Step3Icon"
|
||
Grid.Column="0"
|
||
Text="⏳"
|
||
FontSize="14"
|
||
VerticalAlignment="Center"
|
||
Margin="0,0,10,0" />
|
||
|
||
<!-- 步骤描述 -->
|
||
<TextBlock Grid.Column="1"
|
||
Text="注册插件"
|
||
FontSize="13"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
VerticalAlignment="Center" />
|
||
</Grid>
|
||
</StackPanel>
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 安装日志 ===== -->
|
||
<!-- ============================== -->
|
||
<Grid x:Name="LogPanel"
|
||
Opacity="0">
|
||
|
||
<!-- 日志标签 -->
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<TextBlock Grid.Row="0"
|
||
Text="安装日志"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
Margin="0,0,0,4" />
|
||
|
||
<!-- 日志输出区域 -->
|
||
<Border Grid.Row="1"
|
||
Background="{DynamicResource InputBackgroundBrush}"
|
||
BorderBrush="{DynamicResource BorderBrush}"
|
||
BorderThickness="1"
|
||
CornerRadius="4"
|
||
Padding="4">
|
||
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
||
x:Name="LogScrollViewer">
|
||
<TextBox x:Name="TxtLog"
|
||
IsReadOnly="True"
|
||
TextWrapping="Wrap"
|
||
FontFamily="Cascadia Code, Microsoft YaHei UI"
|
||
FontSize="11"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
VerticalScrollBarVisibility="Disabled"
|
||
Text="" />
|
||
</ScrollViewer>
|
||
</Border>
|
||
</Grid>
|
||
</Grid>
|
||
</Grid>
|
||
|
||
</Page>
|