Sheas-Cealer/Utils/CommandProc.cs
2024-05-30 14:22:56 +08:00

18 lines
480 B
C#

using System;
using System.Windows;
using SheasCore;
namespace Sheas_Cealer.Utils;
internal class CommandProc : Proc
{
internal bool ShutDownAppOnProcessExit;
internal CommandProc(bool shutDownAppOnProcessExit) : base("Cmd.exe") => ShutDownAppOnProcessExit = shutDownAppOnProcessExit;
public override void Process_Exited(object sender, EventArgs e)
{
if (ShutDownAppOnProcessExit)
Application.Current.Dispatcher.InvokeShutdown();
}
}