コード例 #1
0
ファイル: ArtistDetail.cs プロジェクト: hunghuy201280/Tify
        public void setTrackDetailInfo(List <TrackInfo> trackInfos, ArtistContainer callFm)
        {
            this.trackInfos  = trackInfos;
            artistContainers = callFm;
            track_gridView.Rows.Clear();
            track_gridView.Rows.Add();
            track_gridView.Rows[0].Visible = false;
            rows.Clear();
            foreach (TrackInfo track in trackInfos)
            {
                DataGridViewRow tempRow = (DataGridViewRow)track_gridView.Rows[0].Clone();
                tempRow.Visible        = true;
                tempRow.Tag            = track;
                tempRow.Cells[0].Value = track.Cover;
                tempRow.Cells[1].Value = track.Title;
                tempRow.Cells[2].Value = track.Artist;
                tempRow.Cells[3].Value = track.Time;
                tempRow.Cells[4].Value = Properties.Resources.add;
                if (track.IsLoved)
                {
                    tempRow.Cells[5].Value = Properties.Resources.liked;
                }
                else
                {
                    tempRow.Cells[5].Value = Properties.Resources.like;
                }
                rows.Add(tempRow);
            }

            track_gridView.Rows.AddRange(rows.ToArray());


            artistName_label.Text  = callFm.artistName_Label.Text;
            cover_pictureBox.Image = callFm.artistCover_panel.BackgroundImage;



            artistForm.openChildForm(this);
            track_gridView.Rows.Remove(track_gridView.Rows[0]);
            checkLoved();
            hideLoading();
        }
コード例 #2
0
ファイル: ArtistDetail.cs プロジェクト: hunghuy201280/Tify
 public void setAlbumInfo(List <AlbumContainer> albumContainers, ArtistContainer callFm)
 {
     artistAlbum_container.clearItem();
     artistAlbum_container.setContainerName("Albums");
     artistAlbum_container.addRangeItem(albumContainers.ToArray());
 }