protected virtual void OnEnteringState(StateEventArgs e) { EnteringStateEventHandler handler = EnteringState; if (handler != null) { handler(this, e); } }
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; } }
private void ExitingStates() { StateEventArgs e = new StateEventArgs(currentState.ID, ActionResult); if (m_context != null) { m_context.Post(delegate(object state) { OnExitingState(e); }, null); } }