public void ForwardClick() { switch (_StateManager.Tlf.Forward.State) { case FunctionState.Idle: _StateManager.Tlf.Forward.State = FunctionState.Ready; break; case FunctionState.Ready: _StateManager.Tlf.Forward.State = FunctionState.Idle; break; case FunctionState.Executing: case FunctionState.Error: _EngineCmdManager.CancelForward(); break; } }