Files
Better-Seewo/Manager/Pages/InstallPage.xaml
miao-moe 8dd1eed519 feat: Better-Seewo v2.0.0 - 希沃白板功能增强插件
- Fluent Design 风格 UI,深色/浅色主题切换
- 平滑过渡动画(页面切换、按钮交互、状态变化)
- 五大核心功能:安装管理、墨迹管理、格式转换、触摸设置、激活管理
- 基于 dotnetCampus.EasiPlugin.Sdk v2.1.1-alpha.3 插件框架
- WPF 安装向导(欢迎页 -> 安装页 -> 完成页)
2026-06-28 06:51:35 +00:00

459 lines
27 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Page x:Class="Better_Seewo.Manager.Pages.InstallPage"
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"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="900"
FontFamily="Microsoft YaHei UI"
Title="安装管理">
<!-- 页面资源字典 -->
<Page.Resources>
<!-- 按钮悬停缩放动画 -->
<Style x:Key="ActionButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource AccentBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="Medium"/>
<Setter Property="Padding" Value="20,10"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="btnBorder"
Background="{TemplateBinding Background}"
CornerRadius="6"
Padding="{TemplateBinding Padding}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform ScaleX="1.0" ScaleY="1.0"/>
</Border.RenderTransform>
<ContentPresenter x:Name="contentPresenter"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<!-- 悬停缩放动画 1.0 -> 1.05, 150ms -->
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleX)"
To="1.05" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleY)"
To="1.05" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleX)"
To="1.0" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleY)"
To="1.0" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 次要按钮样式 -->
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="Medium"/>
<Setter Property="Padding" Value="20,10"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="btnBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="6"
Padding="{TemplateBinding Padding}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform ScaleX="1.0" ScaleY="1.0"/>
</Border.RenderTransform>
<ContentPresenter x:Name="contentPresenter"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleX)"
To="1.05" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleY)"
To="1.05" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleX)"
To="1.0" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
<DoubleAnimation Storyboard.TargetName="btnBorder"
Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleY)"
To="1.0" Duration="0:0:0.150"
EasingFunction="{StaticResource CubicEase}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 缓动函数引用 -->
<CubicEase x:Key="CubicEase" EasingMode="EaseOut"/>
<QuadraticEase x:Key="QuadraticEase" EasingMode="EaseOut"/>
<!-- 状态卡片样式 -->
<Style x:Key="StatusCardStyle" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource CardBackgroundBrush}"/>
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="20"/>
<Setter Property="Margin" Value="8"/>
</Style>
</Page.Resources>
<!-- 主背景 -->
<Grid Background="{DynamicResource BackgroundBrush}">
<!-- 滚动视图 -->
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled">
<StackPanel Margin="40,30,40,40">
<!-- ====== 顶部标题区域 ====== -->
<StackPanel Margin="0,0,0,25">
<TextBlock Text="安装管理"
FontSize="28"
FontWeight="Bold"
Foreground="{DynamicResource TextPrimaryBrush}"/>
<TextBlock Text="管理 Better-Seewo 插件的安装与配置"
FontSize="13"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,4,0,0"/>
</StackPanel>
<!-- ====== 状态检测卡片区域 (2x2 Grid) ====== -->
<Grid Margin="0,0,0,25">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 卡片1: EN5安装状态 -->
<Border x:Name="Card1"
Grid.Column="0" Grid.Row="0"
Style="{StaticResource StatusCardStyle}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TranslateTransform X="0" Y="30" Opacity="0"/>
</Border.RenderTransform>
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
<!-- 状态图标容器 -->
<Ellipse x:Name="En5StatusIcon"
Width="40" Height="40"
Margin="0,0,12,0">
<Ellipse.Fill>
<SolidColorBrush Color="Gray"/>
</Ellipse.Fill>
<!-- 绿色勾号 Path已安装状态 -->
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Fill" Value="#FFAAAAAA"/>
</Style>
</Ellipse.Style>
</Ellipse>
<StackPanel>
<TextBlock Text="EN5 安装状态"
FontSize="16"
FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"/>
<TextBlock Text="检测希沃白板5安装情况"
FontSize="12"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,2,0,0"/>
</StackPanel>
</StackPanel>
<!-- 状态信息 -->
<Border Background="{DynamicResource BackgroundBrush}"
CornerRadius="6"
Padding="12">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="状态:" FontSize="13"
Foreground="{DynamicResource TextSecondaryBrush}"/>
<TextBlock x:Name="En5StatusText" Text="检测中..."
FontSize="13" FontWeight="Medium"
Foreground="{DynamicResource TextPrimaryBrush}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
<TextBlock Text="版本:" FontSize="13"
Foreground="{DynamicResource TextSecondaryBrush}"/>
<TextBlock x:Name="En5VersionText" Text="-"
FontSize="13" FontWeight="Medium"
Foreground="{DynamicResource TextPrimaryBrush}"/>
</StackPanel>
<TextBlock x:Name="En5PathText" Text="路径:-"
FontSize="11"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,4,0,0"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
</Border>
</StackPanel>
</Border>
<!-- 卡片2: 插件状态 -->
<Border x:Name="Card2"
Grid.Column="1" Grid.Row="0"
Style="{StaticResource StatusCardStyle}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TranslateTransform X="0" Y="30" Opacity="0"/>
</Border.RenderTransform>
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
<Ellipse x:Name="PluginStatusIcon"
Width="40" Height="40"
Margin="0,0,12,0"/>
<StackPanel>
<TextBlock Text="插件状态"
FontSize="16"
FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"/>
<TextBlock Text="检测 Better-EN5 插件安装情况"
FontSize="12"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,2,0,0"/>
</StackPanel>
</StackPanel>
<Border Background="{DynamicResource BackgroundBrush}"
CornerRadius="6"
Padding="12">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="状态:" FontSize="13"
Foreground="{DynamicResource TextSecondaryBrush}"/>
<TextBlock x:Name="PluginStatusText" Text="检测中..."
FontSize="13" FontWeight="Medium"
Foreground="{DynamicResource TextPrimaryBrush}"/>
</StackPanel>
<TextBlock x:Name="PluginPathText" Text="路径:-"
FontSize="11"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,4,0,0"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
</Border>
</StackPanel>
</Border>
<!-- 卡片3: 管理器状态 -->
<Border x:Name="Card3"
Grid.Column="0" Grid.Row="1"
Style="{StaticResource StatusCardStyle}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TranslateTransform X="0" Y="30" Opacity="0"/>
</Border.RenderTransform>
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
<Ellipse x:Name="ManagerStatusIcon"
Width="40" Height="40"
Margin="0,0,12,0"/>
<StackPanel>
<TextBlock Text="管理器状态"
FontSize="16"
FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"/>
<TextBlock Text="检测管理器程序安装情况"
FontSize="12"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,2,0,0"/>
</StackPanel>
</StackPanel>
<Border Background="{DynamicResource BackgroundBrush}"
CornerRadius="6"
Padding="12">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="状态:" FontSize="13"
Foreground="{DynamicResource TextSecondaryBrush}"/>
<TextBlock x:Name="ManagerStatusText" Text="检测中..."
FontSize="13" FontWeight="Medium"
Foreground="{DynamicResource TextPrimaryBrush}"/>
</StackPanel>
<TextBlock x:Name="ManagerPathText" Text="路径:-"
FontSize="11"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,4,0,0"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
</Border>
</StackPanel>
</Border>
<!-- 卡片4: 安装路径 -->
<Border x:Name="Card4"
Grid.Column="1" Grid.Row="1"
Style="{StaticResource StatusCardStyle}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TranslateTransform X="0" Y="30" Opacity="0"/>
</Border.RenderTransform>
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
<Ellipse x:Name="PathStatusIcon"
Width="40" Height="40"
Margin="0,0,12,0"/>
<StackPanel>
<TextBlock Text="安装路径"
FontSize="16"
FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"/>
<TextBlock Text="当前检测到的EN5安装路径"
FontSize="12"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,2,0,0"/>
</StackPanel>
</StackPanel>
<Border Background="{DynamicResource BackgroundBrush}"
CornerRadius="6"
Padding="12">
<StackPanel>
<TextBlock Text="EN5 路径:"
FontSize="13"
Foreground="{DynamicResource TextSecondaryBrush}"/>
<TextBlock x:Name="InstallPathText" Text="检测中..."
FontSize="13" FontWeight="Medium"
Foreground="{DynamicResource AccentBrush}"
Margin="0,2,0,0"
TextTrimming="CharacterEllipsis"/>
<TextBlock x:Name="InstallPathValidText"
Text="路径有效性:检测中"
FontSize="11"
Foreground="{DynamicResource TextSecondaryBrush}"
Margin="0,6,0,0"/>
</StackPanel>
</Border>
</StackPanel>
</Border>
</Grid>
<!-- ====== 操作日志区域 ====== -->
<Border Background="{DynamicResource CardBackgroundBrush}"
CornerRadius="10"
Padding="20"
Margin="8,0,8,20">
<StackPanel>
<TextBlock Text="操作日志"
FontSize="15"
FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"
Margin="0,0,0,10"/>
<Border Background="{DynamicResource BackgroundBrush}"
CornerRadius="6"
MaxHeight="120"
Padding="8">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<TextBlock x:Name="LogText"
Text="等待操作..."
FontSize="12"
Foreground="{DynamicResource TextSecondaryBrush}"
FontFamily="Consolas, Microsoft YaHei UI"/>
</ScrollViewer>
</Border>
</StackPanel>
</Border>
<!-- ====== 底部操作按钮区域 ====== -->
<Border Background="{DynamicResource CardBackgroundBrush}"
CornerRadius="10"
Padding="20">
<StackPanel>
<TextBlock Text="快捷操作"
FontSize="15"
FontWeight="SemiBold"
Foreground="{DynamicResource TextPrimaryBrush}"
Margin="0,0,0,15"/>
<!-- 第一行:安装按钮 -->
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,0,0,10">
<Button x:Name="BtnInstallPlugin"
Content="安装插件"
Style="{StaticResource ActionButtonStyle}"
Click="BtnInstallPlugin_Click"/>
<Button x:Name="BtnUninstallPlugin"
Content="卸载插件"
Style="{StaticResource SecondaryButtonStyle}"
Click="BtnUninstallPlugin_Click"/>
<Button x:Name="BtnInstallManager"
Content="安装管理器"
Style="{StaticResource ActionButtonStyle}"
Click="BtnInstallManager_Click"/>
<Button x:Name="BtnUninstallManager"
Content="卸载管理器"
Style="{StaticResource SecondaryButtonStyle}"
Click="BtnUninstallManager_Click"/>
</StackPanel>
<!-- 第二行:刷新按钮 -->
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<Button x:Name="BtnRefresh"
Content="刷新状态"
Style="{StaticResource SecondaryButtonStyle}"
Click="BtnRefresh_Click"/>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
</Grid>
</Page>