private void DisplaySeries(Series series) { this.series = series; lbl_series_name.Text = series.SeriesName; lbl_description.Text = series.Description; pb_series_picture.Image = PictureHelper.BitmapFromByteArray(series.Picture); lbl_seasons.Text = series.Seasons.Count.ToString(); foreach (Genre genre in series.Genres) { Label label = new Label(); label.Text = genre.Description; label.BorderStyle = BorderStyle.FixedSingle; label.TextAlign = ContentAlignment.MiddleCenter; fp_genres.Controls.Add(label); } FillRatingAffiliatedElements(); }
public SeriesElement(Series serie) { InitializeComponent(); Series = serie; lbl_series_name.Text = serie.SeriesName; pb_series_picture.Image = PictureHelper.BitmapFromByteArray(serie.Picture); if (serie.AverageRating.AverageRatingValue > 0) { lbl_points.Text = serie.AverageRating.AverageRatingValue.ToString(); } else { lbl_points.Text = ""; } lbl_series_name.Click += new System.EventHandler(this.on_series_element_Click); pb_series_picture.Click += new System.EventHandler(this.on_series_element_Click); pnl_content.Left = (pnl_content.Parent.Width - pnl_content.Width) / 2; pnl_content.Top = (pnl_content.Parent.Height - pnl_content.Height) / 2; }