public bool StartOrContinue(EncoderStruct es) { status = Status.RUNNING; this.es = es; //options change at every capture. So do at continueProcess and startProcess writeOptionsFile(); bool ok = true; if (ExecuteProcess.IsRunning(p) && ExecuteProcess.IsResponsive(p)) { LogB.Debug("calling continue"); ok = continueProcess(); } else { LogB.Debug("calling start"); ok = startProcess(); LogB.Debug("StartedOk: " + ok.ToString()); } status = Status.DONE; return(ok); }
public void SendEndProcess() { if (ExecuteProcess.IsRunning(p)) { LogB.Debug("Closing R script"); try { p.StandardInput.WriteLine("Q"); } catch { LogB.Warning("Seems stdin write gots broken"); } } else { LogB.Debug("R script is not working. Don't need to close."); } }