/// <summary> /// This method shuffles songs then sets to playlist. /// </summary> private void Shuffling() { PlayList.SetSelected(_currentSongPLaylistIndex, false); int _playListLength = PlayList.Items.Count; Random _rand = new Random(); _currentSongPLaylistIndex = _rand.Next(_playListLength); //It rerolls if an song is the same as the last song. while (_lastSong == _currentSongPLaylistIndex) { _currentSongPLaylistIndex = _rand.Next(_playListLength); } PlayList.SetSelected(_currentSongPLaylistIndex, true); }
public void UpdateList() { PlayList.Update(); }
public void AddTrackToList(Track track) { PlayList.Items.Add(track); PlayList.Update(); }