public void ListenClick() { switch (_StateManager.Tlf.Listen.State) { case FunctionState.Idle: _StateManager.Tlf.Listen.State = FunctionState.Ready; break; case FunctionState.Ready: _StateManager.Tlf.Listen.State = FunctionState.Idle; break; case FunctionState.Executing: _EngineCmdManager.CancelListen(); break; case FunctionState.Error: _EngineCmdManager.RecognizeListenState(); break; } }
public void OnJacksStateEngine(object sender, JacksStateMsg msg) { _Logger.Trace("Procesando {0}: {1}", EventTopicNames.JacksStateEngine, msg); _StateManager.Jacks.Reset(msg.LeftJack, msg.RightJack); if (_StateManager.Jacks.SomeJack) { ResetTimer = false; _ScreenSaverTimer.Enabled = false; _HangupCallsTimer.Enabled = false; _StateManager.Tft.Enabled = true; _StateManager.ScreenSaver.On = false; _EngineCmdManager.SendTrapScreenSaver(false); _StateManager.Radio.ResetAssignatedState(); } else { if (_StateManager.Tlf.Priority.State != FunctionState.Idle) { _StateManager.Tlf.Priority.Reset(); } if (_StateManager.Tlf.Listen.State == FunctionState.Ready) { _StateManager.Tlf.Listen.State = FunctionState.Idle; } else if (_StateManager.Tlf.Listen.State == FunctionState.Executing) { _EngineCmdManager.CancelListen(); } else if (_StateManager.Tlf.Listen.State == FunctionState.Error) { _EngineCmdManager.RecognizeListenState(); } if (_StateManager.Tlf.Transfer.State == FunctionState.Ready) { _StateManager.Tlf.Transfer.State = FunctionState.Idle; } else if (_StateManager.Tlf.Transfer.State == FunctionState.Executing) { _EngineCmdManager.CancelTransfer(); } else if (_StateManager.Tlf.Transfer.State == FunctionState.Error) { _EngineCmdManager.RecognizeTransferState(); } _HangupCallsTimer.Enabled = true; if (!_StateManager.ScreenSaver.On) { if (ResetTimer) { _StateManager.ScreenSaver.On = true; _EngineCmdManager.SendTrapScreenSaver(true); ResetTimer = false; } else { _ScreenSaverTimer.Enabled = true; } } } }