Пример #1
0
        /// <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);
        }
Пример #2
0
 public void UpdateList()
 {
     PlayList.Update();
 }
Пример #3
0
 public void AddTrackToList(Track track)
 {
     PlayList.Items.Add(track);
     PlayList.Update();
 }