public void clickRemoveFromPlaylist(int index, media media) { if (index >= 0) { this.Playlist.Remove(media); if (index == this.IndexList) { this.stop(); this.next(); } } }
private void addToPlaylistFromLibraryClick(object sender, MouseButtonEventArgs e) { media media = new media(); media = (media)mediaLibrary.SelectedItem; this.mediaPlayer.addToPlaylistFromLibraryClick(media); }
public void addToPlaylistFromLibraryClick(media media) { if (media != null) { if (System.IO.File.Exists(media.Path)) this._playlist.Add(media); } }