mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 21:02:08 +08:00
27 lines
724 B
C#
27 lines
724 B
C#
using System;
|
|
using System.Diagnostics;
|
|
using SheasCore;
|
|
|
|
namespace Sheas_Cealer.Utils;
|
|
|
|
internal class Command : Proc
|
|
{
|
|
internal bool EnvironmentExitAfterProcessExited = true;
|
|
|
|
internal Command(bool environmentExitAfterProcessExited) : base("Cmd.exe")
|
|
{
|
|
EnvironmentExitAfterProcessExited = environmentExitAfterProcessExited;
|
|
}
|
|
|
|
public override void Process_OutputDataReceived(object sender, DataReceivedEventArgs e)
|
|
{
|
|
}
|
|
public override void Process_ErrorDataReceived(object sender, DataReceivedEventArgs e)
|
|
{
|
|
}
|
|
public override void Process_Exited(object sender, EventArgs e)
|
|
{
|
|
if (EnvironmentExitAfterProcessExited)
|
|
Environment.Exit(0);
|
|
}
|
|
} |