Ejemplo n.º 1
0
        private void ApplyState(State state)
        {
            RemoveEvents();

            if (_currentState != state)
            {
                //abort/dispose currently running job
                if (_currentState != null)
                    _currentState.Dispose();

                //update with new job
                _currentState = state;
                _currentState.DisplayContentChanged += _currentState_DisplayContentChanged;
                _currentState.StateChanged += _currentState_StateChanged;

            }
            AddEvents();

        }
Ejemplo n.º 2
0
 void _currentState_StateChanged(State newState)
 {
     ApplyState(newState);
 }
Ejemplo n.º 3
0
 protected void RiseStateChangedEvent(State nextState)
 {
     StateChanged(nextState);
 }