Esempio n. 1
0
        protected virtual void OnEnteringState(StateEventArgs e)
        {
            EnteringStateEventHandler handler = EnteringState;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 2
0
 private void HandleExitingState(object sender, StateEventArgs e)
 {
     TimerUtil.TraceAndDebugMessage(string.Format("Transition Exiting:\tState ID: {0}", ((CurlingTimmerStateMachine.StateID)(e.StateID)).ToString()), 1);
     switch ((CurlingTimmerStateMachine.StateID)e.StateID)
     {
     case CurlingTimmerStateMachine.StateID.TimingTeam1:
     case CurlingTimmerStateMachine.StateID.TimingTeam2:
         FixTeamsNewTime((CurlingTimmerStateMachine.StateID)e.StateID);
         break;
     }
 }
Esempio n. 3
0
        private void ExitingStates()
        {
            StateEventArgs e = new StateEventArgs(currentState.ID, ActionResult);

            if (m_context != null)
            {
                m_context.Post(delegate(object state)
                {
                    OnExitingState(e);
                }, null);
            }
        }