feat: Better-Seewo v2.0.0 - 希沃白板功能增强插件
- Fluent Design 风格 UI,深色/浅色主题切换 - 平滑过渡动画(页面切换、按钮交互、状态变化) - 五大核心功能:安装管理、墨迹管理、格式转换、触摸设置、激活管理 - 基于 dotnetCampus.EasiPlugin.Sdk v2.1.1-alpha.3 插件框架 - WPF 安装向导(欢迎页 -> 安装页 -> 完成页)
This commit is contained in:
109
Installer/Pages/CompletePage.xaml.cs
Normal file
109
Installer/Pages/CompletePage.xaml.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* CompletePage.xaml.cs - Better-Seewo 安装向导完成页面逻辑
|
||||
* 显示安装摘要信息,提供启动管理器和关闭安装程序的入口
|
||||
* 作者:雾启工作室
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Better_Seewo.Installer.Pages
|
||||
{
|
||||
/// <summary>
|
||||
/// CompletePage 的交互逻辑 - 安装向导完成页面
|
||||
/// </summary>
|
||||
public partial class CompletePage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数,初始化页面组件并填充安装摘要
|
||||
/// </summary>
|
||||
public CompletePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// 填充安装摘要信息
|
||||
LoadInstallSummary();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载安装摘要信息到界面
|
||||
/// </summary>
|
||||
private void LoadInstallSummary()
|
||||
{
|
||||
// 版本号
|
||||
TxtVersion.Text = $"v{App.AppVersion}";
|
||||
|
||||
// 安装路径
|
||||
TxtInstallPath.Text = App.InstallPath;
|
||||
|
||||
// 安装时间
|
||||
if (App.InstallStartTime != DateTime.MinValue)
|
||||
{
|
||||
var duration = DateTime.Now - App.InstallStartTime;
|
||||
TxtInstallTime.Text = $"{App.InstallStartTime:yyyy-MM-dd HH:mm:ss} (耗时 {duration.TotalSeconds:F1} 秒)";
|
||||
}
|
||||
else
|
||||
{
|
||||
TxtInstallTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启动管理器按钮点击 - 尝试启动 Better-Seewo Manager
|
||||
/// </summary>
|
||||
private void BtnLaunchManager_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 尝试查找并启动管理器可执行文件
|
||||
string managerPath = Path.Combine(
|
||||
Path.GetDirectoryName(App.InstallPath),
|
||||
"Better-Seewo.Manager.exe"
|
||||
);
|
||||
|
||||
if (File.Exists(managerPath))
|
||||
{
|
||||
// 启动管理器
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = managerPath,
|
||||
UseShellExecute = true
|
||||
});
|
||||
|
||||
// 关闭安装程序
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 管理器文件不存在,提示用户
|
||||
MessageBox.Show(
|
||||
"未找到管理器程序。您可以稍后手动启动 Better-Seewo 管理器。",
|
||||
"Better-Seewo 安装程序",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Information
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(
|
||||
$"启动管理器失败:{ex.Message}",
|
||||
"Better-Seewo 安装程序",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Warning
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭按钮点击 - 关闭安装程序
|
||||
/// </summary>
|
||||
private void BtnClose_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user