Example #1
0
 private void Window_Closed(object sender, EventArgs e)
 {
     m_streamingSystemManager?.Pause();
     if (m_streamingSystemManager != null)
     {
         m_streamingSystemManager.OnTrackTimeChange -= OnCurrentTrackTimeChange;
         m_streamingSystemManager.OnTrackChange     -= OnTrackChanged;
         m_streamingSystemManager.OnPlayStateChange -= OnPlayStateChanged;
     }
 }
Example #2
0
        private void PlayNextTrackInCurrentPlaylist()
        {
            int index = CurrentPlaylistTrackIndex;

            if (index < CurrentPlaylist.Count)
            {
                PlayingPlaylist = true;
                CurrentTrack    = CurrentPlaylist[index];
                m_streamingSystemManager.Play(CurrentTrack);
                IsPlaying = true;
                CurrentPlaylistTrackIndex++;
            }
            else
            {
                PlayingPlaylist = false;
                m_streamingSystemManager.Pause();
                IsPlaying = false;
            }
        }