public async Task Pause() { IPlaybackManager currentPlaybackManager = CurrentPlaybackManager; if (currentPlaybackManager != null) { await currentPlaybackManager.Pause(); } }
private async void RadioPowerManager_PowerStateChanged(object sender, PowerStateChangedEventArgs e) { switch (e.PowerState) { case PowerState.Powered: await Task.Delay(_config.Delay); if (null != currentUri) { await playChannel(currentUri); } break; case PowerState.Standby: _radioPlaybackManager.Pause(); await Task.Delay(_config.Delay); break; } }