public QueryResult <SolidBrush> GetBrushFor(DataMeterValueCategory dataMeterValueCategory) { if (DataMeterValueBrushes.ContainsKey(dataMeterValueCategory)) { return(QueryResult <SolidBrush> .Create(DataMeterValueBrushes[dataMeterValueCategory])); } return(QueryResult <SolidBrush> .Empty); }
public Color?GetColorFor(DataMeterValueCategory dataMeterValueCategory) { if (DataMeterValueBrushes.ContainsKey(dataMeterValueCategory)) { return(DataMeterValueBrushes[dataMeterValueCategory]); } return(null); }
public QueryResult <SolidBrush> GetBrushFor(DataMeterValueCategory dataMeterValueCategory) { var result = DatameterColourDefinitions.Instance.GetColorFor(dataMeterValueCategory); if (result.HasValue) { var color = result.Value.ToSysDrawingColor(); return(BrushCache.GetOrAdd(color, c => new SolidBrush(result.Value.ToSysDrawingColor())).ToQueryResult()); } return(QueryResult <SolidBrush> .Empty); }
public DataMeterResult( DataMeter dataMeter, int amount, decimal percentageScore, DataMeterValueCategory valueCategory ) { _dataMeter = dataMeter; PercentageScore = percentageScore; ValueCategory = valueCategory; Amount = amount; }
public Threshold(int minMeasureUnitTreshold, int maxMeasureUnitThreshold, DataMeterValueCategory category) { MinMeasureUnitThreshold = minMeasureUnitTreshold; MaxMeasureUnitThreshold = maxMeasureUnitThreshold; Category = category; }