public static int Start(this IComputerProcesses computerProcesses, IComputerSoftwareProgram computerSoftwareProgram, params object[] arguments) //Command command, { ComputerProcess computerProcess = new ComputerProcess(computerSoftwareProgram, arguments); //command, int pid = computerProcess.Start(); computerProcesses.ComputerProcessDictionary.Add(pid, computerProcess); return(pid); }
public static void Close(this ComputerProcess computerProcess) { computerProcess.Command.Process.Close(); }
public static void Kill(this ComputerProcess computerProcess) { computerProcess.Command.Process.Kill(); }
public static bool CloseMainWindow(this ComputerProcess computerProcess) { return(computerProcess.Command.Process.CloseMainWindow()); }
public static int Start(this ComputerProcess computerProcess) { computerProcess.Command = Command.Run(computerProcess.ComputerSoftwareProgram.ComputerSoftwareProgramSignil.ProcessPath, computerProcess.Arguments, options: o => o.DisposeOnExit(false)); return(computerProcess.Command.ProcessId); }