public override void HandleNextEvent(StateMachine context) { context.MoveNext (); context.PlaySoundStart (); //context.ResetTimer (); context.ChangeState (PlayingInManualState.Instance); }
public PhrasesPresenterIml(PhrasesView view, SoundPlayer player, Database db, int lessonNumber, State initialState) { this.view = view; this.player = player; this.db = db; this.lessonNumber = lessonNumber; player.PlayingFinished += (s, e) => { HandlePlaySoundStopEvent (); // new DelayedAction (() => { // // HandleNextEvent (); // }, 5000); HandleTimeoutEvent (); }; stateMachine = new StateMachine (this, initialState); var phrases = db.GetPhrasesByLesson (lessonNumber); enumerator = phrases.GetLoopedTwoWayEnumerator (); HandleNextEvent (); }
public override void EnterState(StateMachine context) { context.EnterAutoMode (); }
public override void HandlePreviousEvent(StateMachine context) { context.MovePrevious (); context.PlaySoundStart (); context.ChangeState (PlayingInManualState.Instance); }
public override void HandlePreviousEvent(StateMachine context) { context.MovePrevious (); context.PlaySoundStart (); }
public abstract void HandleTimeoutEvent(StateMachine stateMachine);
public abstract void HandlePlaySoundStopEvent(StateMachine context);
public abstract void HandleEnterManualModeEvent(StateMachine context);
public override void EnterState(StateMachine context) { context.EnterManualMode (); }
public override void HandleEnterManualModeEvent(StateMachine context) { context.ChangeState (AwaitingInManualState.Instance); }
public override void HandleTimeoutEvent(StateMachine stateMachine) { }
public override void HandlePlaySoundStopEvent(StateMachine context) { context.ChangeState (AwaitingInAutoState.Instance); }
public override void HandlePlaySoundStartEvent(StateMachine context) { context.PlaySoundStart (); }
public override void HandleEnterAutoModeEvent(StateMachine context) { }
public override void HandleEnterManualModeEvent(StateMachine context) { // Empty default implementation }
public override void HandlePlaySoundStartEvent(StateMachine context) { context.PlaySoundStart (); context.ChangeState (PlayingInAutoState.Instance); }
public override void HandleTimeoutEvent(StateMachine stateMachine) { // Empty default implementation }
public override void HandleTimeoutEvent(StateMachine context) { context.MoveNext (); context.PlaySoundStart (); }
public abstract void HandleEnterAutoModeEvent(StateMachine context);
public void SetUpEach() { presenter = new PhrasesPresenterMock (); stateMachine = new StateMachine (presenter); }
public abstract void HandleNextEvent(StateMachine context);
public override void HandleEnterAutoModeEvent(StateMachine context) { context.MoveNext (); context.PlaySoundStart (); context.ChangeState (AwaitingInAutoState.Instance); }
public abstract void HandlePreviousEvent(StateMachine context);
public override void HandlePlaySoundStopEvent(StateMachine context) { //throw new InvalidStateTransitionException (); }
public virtual void EnterState(StateMachine context) { // Empty default implementation }
public override void HandleEnterAutoModeEvent(StateMachine context) { context.ChangeState (PlayingInAutoState.Instance); }