/// <summary> /// Provides custom title for find results view tab /// </summary> /// <returns></returns> public override string GetResultsTitle(OccurenceSection section) { string form = "location"; string title; int foundCount = section.TotalCount; if (foundCount > 0) { if (foundCount > 1) { form = NounUtil.GetPlural(form); } title = foundCount == section.FilteredCount ? string.Format("Found {0} {1}", foundCount, form) : string.Format("Displaying {0} of {1} found {2}", section.FilteredCount, foundCount, form); } else { title = string.Format("No locations found"); } return(title); }
public override string GetResultsTitle(OccurenceSection section) { string singular = "registered component"; int totalCount = section.TotalCount; string str; if (totalCount > 0) { if (totalCount > 1) { singular = NounUtil.GetPlural(singular); } str = totalCount == section.FilteredCount ? string.Format("Found {0} {1}", totalCount, singular) : string.Format("Displaying {0} of {1} found {2}", section.FilteredCount, totalCount, singular); } else { str = string.Format("No registered components", new object[0]); } return(str); }