Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public virtual void enterController(CSIMachine machine)
 {
     //enter with the latest Proc machine
     if ((_currentProc != null) && (isPluggedIn == true))
     {
         _currentProc.EnterProcess();
     }
 }