private static void OnPowerChange() { if (RadioModel.Power.Value == Turned.On) { RadioConnection.FlushAll(); radioLogic.Start(); radioLogic.Noise.Play(); RadioConnection.Player.Play(); OnTangentChange(); } else { StopStreaming(); radioLogic.Stop(); RadioConnection.Player.Pause(); radioLogic.Noise.Stop(); } }
private static void OnTangentChange() { if (RadioModel.Power.Value != Turned.On) { return; } if (RadioModel.WorkMode.Value == WorkModeState.Simplex && RadioModel.Tangent.Value == Turned.On) { RadioConnection.Player.Pause(); StartStreaming(); } else { RadioConnection.FlushAll(); RadioConnection.Player.Play(); StopStreaming(); } }