Пример #1
0
        public static void QueueSong(string songName, QueueType queueType = QueueType.WaitForCurrent)
        {
            QueueSongNames.Enqueue(songName);

            if (queueType == QueueType.PlayImmediately)
            {
                PlayNextSong();
            }
        }
Пример #2
0
        public static void QueueSongs(List <string> songs, QueueType queueType = QueueType.WaitForCurrent)
        {
            // If we are not adding any songs, don't bother doing the rest of this function
            if (songs.Count == 0)
            {
                return;
            }

            foreach (string song in songs)
            {
                QueueSongNames.Enqueue(song);
            }

            if (queueType == QueueType.PlayImmediately)
            {
                PlayNextSong();
            }
        }