コード例 #1
0
        private void playSong(object sender, MouseButtonEventArgs mouseButtonEventArgs)
        {
            var    song  = (Song)GridSongs.SelectedItems[0];
            var    index = song.Count - 1;
            string path  = songDictionary[index];

            playMenu.setTitle(Configs.getTitleFromPath(path));

            Uri uri = new Uri(path);

            mediaPlayer.Open(uri);
            mediaPlayer.loopPlay(path);
        }
コード例 #2
0
 private void playMusic(object sender, EventArgs e)
 {
     //TODO: Change Image_Play icon when music is playing
     if (mediaPlayer.getPlaying())
     {
         songProgress = mediaPlayer.Position;
         mediaPlayer.Pause();
         mediaPlayer.setPlaying(false);
     }
     else
     {
         mediaPlayer.Position = songProgress;
         mediaPlayer.loopPlay();
     }
 }
コード例 #3
0
 private void PlayNext_OnClick(object sender, RoutedEventArgs routedEventArgs)
 {
     mediaPlayer.loopPlay(path);
     //TODO: Currently bugged, maybe related to the fact that it's not being called from the MainFrame itself?
 }