XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

HaloPixelToolBox

【WinUI3】基于USB HID通讯的花再音响工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
using CommunityToolkit.Mvvm.Input;
using HaloPixelToolBox.Installer.Profiles;
using HaloPixelToolBox.Installer.ViewModel.Windows;
using HaloPixelToolBox.Installer.Views.Pages;
using System.Diagnostics;
using System.IO;

namespace HaloPixelToolBox.Installer.ViewModel.Pages;

public partial class InstallProgressPageViewModel(InstallProgressPage viewPage) : ViewModelBase
{
    public InstallProgressPage ViewPage { get; set; } = viewPage;

    [RelayCommand]
    void ConfirmSuccess()
    {
        var startInfo = new ProcessStartInfo(Path.Combine(SystemProfile.InstallPath, "HaloPixelToolBox.Client.exe"))
        {
            UseShellExecute = true,
            WorkingDirectory = SystemProfile.InstallPath
        };
        Process.Start(startInfo);
        MainWindowViewModel.CloseWindow();
    }
}