예제 #1
0
        protected virtual void OnEnteringState(StateEventArgs e)
        {
            EnteringStateEventHandler handler = EnteringState;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: PLS54/CSharpCode
 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;
     }
 }
예제 #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);
            }
        }