/// <summary> /// Plays the pause. /// </summary> public virtual void PlayPause() { if (null == CurrentTrack) { var i = 0; DoTheNextOne(ref i); return; } if (CurrentTrack.IsPaused) { CurrentTrack.Play(1f); } else { CurrentTrack.Pause(); } UpdateState(); }
private void OnShutdown(ShutdownEvent shutdownEvent) { if (null == CurrentTrack) { return; } CurrentTrack.Pause(); var file = CurrentTrack.File; if (null == file) { return; } LastPlayed.Value = file.Id; LastPlayedOffset.Value = CurrentTrack.CurrentPositionMillisecond; Stop(); Dispose(); VolumeValue.Store(); }