/// <summary> /// Switch to the new command state. /// </summary> /// <param name="newState">The state to switch to</param> private void ChangeState(CoSyState newState) { if (newState == CoSyState.MAIN) { _currentTopic = null; } _stateStack.Push(newState); }