public static void StopProcess(PROCESS process) { lock (Lockers[(int)process]) { GenericProcess currentProcess = Processes[(int)process]; if (currentProcess != null) { currentProcess.Stop(); } Processes[(int)process] = null; } }
public static bool WriteLineToStandardInput(PROCESS process, string line) { try { GenericProcess currentProcess = Processes[(int)process]; if (currentProcess != null && !currentProcess.hasExited) { return(currentProcess.SendLine(line)); } } catch (Exception) { } return(false); }
public static void StartProcess(PROCESS process) { lock (Lockers[(int)process]) { GenericProcess currentProcess = Processes[(int)process]; if (currentProcess != null && !currentProcess.hasExited) { return; } if (process == PROCESS.LOCKING_DEVICE && Program.IPAddressServer != null) { Processes[(int)process] = new LockerProcess(Program.IPAddressServer.ToString()); } else if (process == PROCESS.VIDEO_STREAMING && Program.IPAddressServer != null) { //Processes[(int)process] = new VideoStreamerProcess(Program.IPAddressServer.ToString()); } } }