private void AddToPlaylistClick(object sender, RoutedEventArgs e)
        {
            MenuItem SongItem         = sender as MenuItem;
            int      PlaylistID       = Convert.ToInt32(SongItem.Name.Substring(9));
            Song     song             = (Song)SongItem.Tag;
            Playlist relevantPlaylist = user.Playlists.Where(i => i.playlistID == PlaylistID).FirstOrDefault();

            relevantPlaylist.AddSongToPlaylist(song);
        }
Esempio n. 2
0
        private void AddToPlaylistClick(object sender, RoutedEventArgs e)
        {
            MenuItem PlaylistItem = sender as MenuItem;
            Playlist playlist     = (Playlist)PlaylistItem.Tag;

            foreach (Song s in songs)
            {
                playlist.AddSongToPlaylist(s);
            }
        }