public void PlayNextSongAfterPreviousTest()
        {
            var playControlViewModel = new PlayControlViewModel();

            playControlViewModel.IsRepeatSong = false;
            playControlViewModel.index        = 0;
            playControlViewModel.PlayNextSongAfterPrevious();
            Assert.AreEqual(1, playControlViewModel.index);
        }
        void mediaPlayer_MediaEnded(object sender, EventArgs e)
        {
            if (sender.GetType().ToString() == "System.Windows.Media.MediaPlayer")
            {
                timer.Stop();

                ControlExtensions.InvokeIfRequired(this, (x) =>
                {
                    elapsedTimeTextBlock.Text = x.ToString();
                }, "00:00");

                ControlExtensions.InvokeIfRequired(this, (x) =>
                {
                    durationSlider.Value = x;
                }, 0);
            }

            playControlViewModel.PlayNextSongAfterPrevious();
            timer.Start();
        }