mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
Fix #332
This commit is contained in:
parent
bcd1b6f1df
commit
53b728aa14
1
.gitignore
vendored
1
.gitignore
vendored
@ -354,3 +354,4 @@ MigrationBackup/
|
||||
*_PDLC_*
|
||||
*_DLC_*
|
||||
VPet-Simulator.Windows/mod/1111_ChatGPTPlus
|
||||
VPet.Solution/Properties/launchSettings.json
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user