Esempio n. 1
0
        public void ChangeMusicTrack(MusicTrack music, bool shouldPlay = false)
        {
            if (music == null)
            {
                return;
            }

            MusicPlayer.Open(new Uri(music.Path));

            MainWindow.albumArtPlace.Source    = GetImageFromAlbumArtProperty(music.Path);
            MainWindow.currentSongPlaying.Text = music.AlbumTitle;

            if (shouldPlay)
            {
                MusicPlayer.Play();
                IsPlaying = true;
                OnPlaySwitch.Invoke(this, IsPlaying);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Switch between Pause and Play.
 /// </summary>
 public void SwitchPlayPause()
 {
     IsPlaying = MusicPlayer.PlayWithPause(IsPlaying);
     OnPlaySwitch.Invoke(this, IsPlaying);
 }