XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
UTF-8
using CommunityToolkit.Mvvm.Input;
using SpaceEngineersBlueprintEditor.Installer.Profiles;
using SpaceEngineersBlueprintEditor.Installer.ViewModel.Windows;
using SpaceEngineersBlueprintEditor.Installer.Views.Pages;
using System.Diagnostics;
using System.IO;

namespace SpaceEngineersBlueprintEditor.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, "SpaceEngineersBlueprintEditor.exe"))
        {
            UseShellExecute = true,
            WorkingDirectory = SystemProfile.InstallPath
        };
        Process.Start(startInfo);
        MainWindowViewModel.CloseWindow();
    }
}