This commit is contained in:
ZouJin 2024-03-09 19:37:51 +08:00
parent bcd1b6f1df
commit 53b728aa14
3 changed files with 5 additions and 12 deletions

1
.gitignore vendored
View File

@ -354,3 +354,4 @@ MigrationBackup/
*_PDLC_*
*_DLC_*
VPet-Simulator.Windows/mod/1111_ChatGPTPlus
VPet.Solution/Properties/launchSettings.json

View File

@ -8,13 +8,10 @@ namespace VPet.Solution;
/// </summary>
public partial class App : Application
{
public static bool IsDone { get; set; } = false;
protected override void OnStartup(StartupEventArgs e)
{
if (e.Args != null && e.Args.Count() > 0)
{
IsDone = true;
switch (e.Args[0].ToLower())
{
case "removestarup":
@ -25,12 +22,12 @@ public partial class App : Application
{
File.Delete(path);
}
return;
break;
case "launchsteam":
Process.Start("steam://rungameid/1920960");
return;
break;
}
Application.Current.Shutdown();
}
IsDone = false;
}
}

View File

@ -24,12 +24,7 @@ public partial class MainWindow : WindowX
public SaveWindow SaveWindow { get; } = new();
public MainWindow()
{
if (App.IsDone)
{
Close();
return;
}
{
InitializeComponent();
this.SetViewModel<MainWindowVM>();
Closed += MainWindow_Closed;