public void PriorityClick() { switch (_StateManager.Tlf.Priority.State) { case FunctionState.Idle: if (_StateManager.Tlf[TlfState.Congestion] + _StateManager.Tlf[TlfState.Busy] > 0) { int id = _StateManager.Tlf.GetFirstInState(TlfState.Congestion, TlfState.Busy); _EngineCmdManager.RetryTlfCall(id); _StateManager.Tlf.Priority.Reset(id); } else { _StateManager.Tlf.Priority.Reset(-1); } break; case FunctionState.Ready: case FunctionState.Executing: case FunctionState.Error: _StateManager.Tlf.Priority.Reset(); break; } }