private void OnPlayFoundTrack(object sender, RoutedEventArgs e) { LocalTrack track = FoundTracks[m_foundDataGrid.SelectedIndex]; m_streamingSystemManager = m_streamingSystemManagers[(int)StreamingSystemType.Spotify]; m_streamingSystemManager.Play(track); CurrentTrack = track; }
private void PlayNextTrackInCurrentPlaylist() { int index = CurrentPlaylist.CurrentIndex; if (index < CurrentPlaylist.Tracks.Count) { PlayingPlaylist = true; CurrentTrack = CurrentPlaylist.Tracks[index]; m_streamingSystemManager = m_streamingSystemManagers[(int)CurrentTrack.Type]; m_streamingSystemManager.Play(CurrentTrack); CurrentPlaylist.CurrentIndex++; } else { PlayingPlaylist = false; m_streamingSystemManager.Pause(); } }