public ProcessWrapper(string fileLocation, string parameters, lineReceived _lineFromAI) { ProcessStartInfo startInfo; if (parameters == "") startInfo = new ProcessStartInfo(fileLocation); else startInfo = new ProcessStartInfo(fileLocation, parameters); startInfo.UseShellExecute = false; startInfo.RedirectStandardInput = true; startInfo.RedirectStandardOutput = true; goProcess = Process.Start(startInfo); name = goProcess.ProcessName; lineFromAI = _lineFromAI; messageOrganizer = new GTPBasics.SendAndRecieve(simpleMessagePasser); readThread = new Thread(new ThreadStart(ReadFromStandardInput)); readThread.Start(); }
//_lineFromAI can be null public ProcessWrapper(string fileLocation, lineReceived _lineFromAI) : this(fileLocation, "", _lineFromAI) { }