private void PlayPause() { PlayerHost.IsPlaying = !PlayerHost.IsPlaying; if (PlayerHost.IsPlaying) { PlayCommandExecuted?.Invoke(this, new EventArgs()); } else { PauseCommandExecuted?.Invoke(this, new EventArgs()); } }
private void PlayPause() { if (PlayerHost == null) { return; } PlayerHost.IsPlaying = !PlayerHost.IsPlaying; if (PlayerHost.IsPlaying) { PlayCommandExecuted?.Invoke(this, EventArgs.Empty); } else { PauseCommandExecuted?.Invoke(this, EventArgs.Empty); } }