Example #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();

        }
Example #2
0
 void _currentState_StateChanged(State newState)
 {
     ApplyState(newState);
 }
Example #3
0
 protected void RiseStateChangedEvent(State nextState)
 {
     StateChanged(nextState);
 }