private void OnEngineStateChanged() { if (_StateManager.Engine.Connected) { _Logger.Trace("OnEngineStateChanged connected"); if (_EngineCmdManager.Name != "Ope") { _EngineCmdManager.SetBuzzerState(_StateManager.Buzzer.Enabled); if (_StateManager.Buzzer.Enabled) { _EngineCmdManager.SetBuzzerLevel(_StateManager.Buzzer.Level); } _EngineCmdManager.SetRdHeadPhonesLevel(_StateManager.RdHeadPhones.Level); _EngineCmdManager.SetRdSpeakerLevel(_StateManager.RdSpeaker.Level); _EngineCmdManager.SetTlfHeadPhonesLevel(_StateManager.TlfHeadPhones.Level); _EngineCmdManager.SetTlfSpeakerLevel(_StateManager.LcSpeaker.LevelTlf); _EngineCmdManager.SetLcSpeakerLevel(_StateManager.LcSpeaker.LevelLC); _EngineCmdManager.SetSplitMode(_StateManager.Split.Mode); _EngineCmdManager.SetRdHfSpeakerLevel(_StateManager.HfSpeaker.Level); _EngineCmdManager.SetAudioViaTlf(_StateManager.Tlf.AltavozTlfEstado); if (_StateManager.Tlf.SoloAltavoces) { _EngineCmdManager.ModoSoloAltavoces(); } if (_StateManager.Radio.DoubleRadioSpeaker) { _EngineCmdManager.SetDoubleRadioSpeaker(); } } } else { _Logger.Trace("OnEngineStateChanged not connected"); if (!_StateManager.ScreenSaver.On) { _ScreenSaverTimer.Enabled = true; } if (_StateManager.Tlf.Listen.State == FunctionState.Ready) { _StateManager.Tlf.Listen.State = FunctionState.Idle; } if (_StateManager.Tlf.Transfer.State == FunctionState.Ready) { _StateManager.Tlf.Transfer.State = FunctionState.Idle; } if (_StateManager.Tlf.Priority.State == FunctionState.Ready) { _StateManager.Tlf.Priority.Reset(); } //_StateManager.Scv.Active = -1; //_StateManager.Jacks.Reset(false, false); //_StateManager.Radio.Reset(); //_StateManager.Lc.Reset(); //_StateManager.Tlf.Reset(); } }
public void SpeakerTlfClick() { bool oldState = _StateManager.Tlf.AltavozTlfEstado; // si no hay altavoz, no se permite el cambio a altavoz if ((_StateManager.LcSpeaker.Presencia) || (oldState == true)) { if (_EngineCmdManager.SetAudioViaTlf(!_StateManager.Tlf.AltavozTlfEstado)) { _StateManager.Tlf.AltavozTlfEstado = !_StateManager.Tlf.AltavozTlfEstado; } } }