public abstract void PopulateNames(SearchResult result, ChapterInfo chapterInfo, bool includeDurations);
public SearchResultItem(SearchResult search) { InitializeComponent(); this.Tag = search; lblName.Text = search.Name; if (search.Type != "Unknown") { lblSourceType.Text = search.Type; } else { lblSourceType.Text = string.Empty; } if (search.Duration != TimeSpan.Zero) { lblDuration.Text = search.Duration.ToShorterString(); } else { lblDuration.Text = string.Empty; } lblCount.Text = string.Format("{0} chapters", search.Count); lblRelevance.Text = search.Relevance.ToString(); //lblRelevance.BackColor = Color.Transparent; if (search.Relevance >= 8) { lblRelevance.ForeColor = green; //relBrush = new SolidBrush(green); } else if (search.Relevance >= 4) { //relBrush = new SolidBrush(Color.Orange); lblRelevance.ForeColor = Color.Orange; } else { //relBrush =new SolidBrush(Color.Gray); lblRelevance.ForeColor = Color.LightGray; } if (!search.HasNames.HasValue) { lblHasNames.Text = ""; lblHasNames.ForeColor = Color.LightGray; } else if (!search.HasNames.Value) { lblHasNames.Text = "";//#b94a48 lblHasNames.ForeColor = red; } else { lblHasNames.Text = ""; lblHasNames.ForeColor = Color.Green; } }