コード例 #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);
            }
        }