private Boolean setNextProcess(CSIProc newProc) { if (newProc == null) { //AppI_Debug.ShowMsg("setNextProcess: ERROR: NULL!"); return(false); } CSIProc oldProc = _currentProc; _previousProc = _currentProc; _currentProc = newProc; _nextProc = null; // Old Proc gets notified it is changing out. if (oldProc != null) { oldProc.ExitProcess(); } // New Proc finds out it is coming in. if (_currentProc != null) { _currentProc.EnterProcess(); } //Note the time at which we entered this Proc. _enteredProcTime = TimeHelp.GetCurrentMS(); return(true); }
public string getProcessName(CSIProc proc) { if (proc == null) { //AppI_Debug.ShowMsg("getProcessName: ERROR: PROC NULL!"); return("NULL"); } foreach (KeyValuePair <string, CSIProc> dictEntry in controllerProcs) { if (controllerProcs[dictEntry.Key] == proc) { return(dictEntry.Key); } } AppI_Debug.ShowMsg("getProcessName: ERROR: NOT FOUND! " + proc.GetProcessStateName()); return("NoControllerProc"); }
//forced to by pass the queue public Boolean setNextProcNamed(string name) { Boolean retVal = false; CSIProc newProc = getProc(name); retVal = setNextProcess(newProc); if (newProc != null) { _currentProc.StopProcess(); newProc.StartProcess(); _currentProc = newProc; retVal = true; } if (retVal == false) { AppI_Debug.ShowMsg("Process Not Found Warning: " + name); } return(retVal); }
public void addProc(string key, CSIProc proc) { controllerProcs[key] = proc; }