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); }
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(); } }
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? }