コード例 #1
0
ファイル: ArtistViewModel.cs プロジェクト: thongbkvn/NCT
        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
ファイル: ArtistViewModel.cs プロジェクト: thongbkvn/NCT
 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;
 }