private void Albums_AlbumAdded(AlbumCollection collection, AlbumEventArgs e) { var albumplaylist = new AlbumPlaylist(e.Album); playlists.Add(e.Album, albumplaylist); AddPlaylist(albumplaylist); }
public ArtistPlaylist(Artist artist) { _artist = artist; playlists = new Dictionary <Album, AlbumPlaylist>(); foreach (Album album in artist.Albums) { var albumplaylist = new AlbumPlaylist(album); playlists.Add(album, albumplaylist); AddPlaylist(albumplaylist); } _artist.Albums.AlbumAdded += Albums_AlbumAdded; _artist.Albums.AlbumRemoved += Albums_AlbumRemoved; }