예제 #1
0
        public ArtistViewModel(Artist artist)
        {
            Name = artist.Name;
            Cover = artist.Cover;
            ArtistInfo = artist;
            if (artist.Cover != null)
            {
                BgImage = new BitmapImage();
                BgImage.UriSource = new Uri(artist.Cover);
            }
            if (artist.TrackList != null)
                foreach (var track in artist.TrackList)
                    TrackList.Add(new TrackViewModel(track));

            if (artist.AlbumList != null)
                foreach (var album in artist.AlbumList)
                    AlbumList.Add(new AlbumViewModel(album));
        }
예제 #2
0
 public void Coppy(ArtistViewModel artistVM)
 {
     Name = artistVM.Name;
     ArtistInfo = artistVM.ArtistInfo;
     Cover = artistVM.Cover;
     BgImage = artistVM.BgImage;
     AlbumList.Clear();
     TrackList.Clear();
     foreach (var album in artistVM.AlbumList)
         AlbumList.Add(album);
     foreach (var track in artistVM.TrackList)
         TrackList.Add(track);
     trackPage = artistVM.trackPage;
     albumPage = artistVM.albumPage;
 }