Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LorisYounger committed Mar 9, 2024
1 parent bcd1b6f commit 53b728a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,4 @@ MigrationBackup/
*_PDLC_*
*_DLC_*
VPet-Simulator.Windows/mod/1111_ChatGPTPlus
VPet.Solution/Properties/launchSettings.json
9 changes: 3 additions & 6 deletions VPet.Solution/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -25,12 +22,12 @@ protected override void OnStartup(StartupEventArgs e)
{
File.Delete(path);
}
return;
break;
case "launchsteam":
Process.Start("steam://rungameid/1920960");
return;
break;
}
Application.Current.Shutdown();
}
IsDone = false;
}
}
7 changes: 1 addition & 6 deletions VPet.Solution/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 53b728a

Please sign in to comment.