예제 #1
0
        private static void NextSong(int direction)
        {
            Stop();

            if (IsRepeating && _queue.ActiveSongIndex >= _queue.Count - 1)
            {
                _queue.ActiveSongIndex = 0;

                // Setting direction to 0 will force the first song
                // in the queue to be played.
                // if we're on "shuffle", then it'll pick a random one
                // anyway, regardless of the "direction".
                direction = 0;
            }

            var nextSong = _queue.GetNextSong(direction, IsShuffled);

            if (nextSong != null)
            {
                PlaySong(nextSong, null);
            }

            if (ActiveSongChanged != null)
            {
                ActiveSongChanged.Invoke(null, null);
            }
        }
예제 #2
0
        private static void NextSong(int direction)
        {
            var nextSong = _queue.GetNextSong(direction, IsShuffled);

            if (nextSong == null)
            {
                Stop();
            }
            else
            {
                Play(nextSong);
            }
        }
예제 #3
0
        private static void NextSong(int direction)
        {
            var nextSong = _queue.GetNextSong(direction, IsShuffled);

            if (nextSong == null)
            {
                Stop();
            }
            else
            {
                Play(nextSong);
            }

            if (ActiveSongChanged != null)
            {
                ActiveSongChanged.Invoke(null, null);
            }
        }