public string GetLabelText(eLabelType LabelType) { switch (LabelType) { case eLabelType.Text: return(LabelText); case eLabelType.TextItems: switch (this.PaintRating) { case 0: return(LabelText); //case // ERROR: Case labels with binary operators are unsupported : GreaterThan //LabelTextItems.GetUpperBound(0) + 1: //return ""; default: return((LabelTextItems.Length > this.PaintRating && this.PaintRating > 0) ? LabelTextItems[this.PaintRating - 1] : "n/a"); } case eLabelType.FormatString: return(string.Format(LabelFormatString, this.PaintRating, MaxRating)); default: return(""); } }
public string GetLabelText(eLabelType LabelType) { switch (LabelType) { case eLabelType.Text: return LabelText; case eLabelType.TextItems: switch (this.PaintRating) { case 0: return LabelText; //case // ERROR: Case labels with binary operators are unsupported : GreaterThan //LabelTextItems.GetUpperBound(0) + 1: //return ""; default: return (LabelTextItems.Length > this.PaintRating && this.PaintRating > 0) ? LabelTextItems[this.PaintRating - 1] : "n/a"; } case eLabelType.FormatString: return string.Format(LabelFormatString, this.PaintRating, MaxRating); default: return ""; } }