Beispiel #1
0
 /// <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();
 }
Beispiel #2
0
        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();
        }