mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
37 lines
982 B
C#
37 lines
982 B
C#
using System.Diagnostics;
|
|
using System.Windows;
|
|
|
|
namespace VPet.Solution;
|
|
|
|
/// <summary>
|
|
/// App.xaml 的交互逻辑
|
|
/// </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":
|
|
var path =
|
|
Environment.GetFolderPath(Environment.SpecialFolder.Startup)
|
|
+ @"\VPET_Simulator.lnk";
|
|
if (File.Exists(path))
|
|
{
|
|
File.Delete(path);
|
|
}
|
|
return;
|
|
case "launchsteam":
|
|
Process.Start("steam://rungameid/1920960");
|
|
return;
|
|
}
|
|
}
|
|
IsDone = false;
|
|
}
|
|
}
|