Exemple #1
0
 public static ClientDataMeterZoneInfo Create(IReadOnlyZoneInfo zoneInfo, ZoneInfoDataMeter zoneInfoDataMeter)
 {
     return(new ClientDataMeterZoneInfo
     {
         colour = DatameterColourDefinitions
                  .Instance
                  .GetColorFor(zoneInfoDataMeter.GetDataMeterResult(zoneInfo).ValueCategory)
                  .Pipe(x => x.HasValue ? x.Value.ToHex() : string.Empty),
         x = zoneInfo.Point.X,
         y = zoneInfo.Point.Y
     });
 }
 public static ClientDataMeterZoneInfo Create(IReadOnlyZoneInfo zoneInfo, ZoneInfoDataMeter zoneInfoDataMeter)
 {
     return(new ClientDataMeterZoneInfo
     {
         colour = BrushManager
                  .Instance
                  .GetBrushFor(zoneInfoDataMeter.GetDataMeterResult(zoneInfo).ValueCategory)
                  .WithResultIfHasMatch(brush => System.Drawing.ColorTranslator.ToHtml(brush.Color), string.Empty),
         x = zoneInfo.Point.X,
         y = zoneInfo.Point.Y
     });
 }
Exemple #3
0
 public DataMeterPublishState(ZoneInfoDataMeter dataMeter, Func <IEnumerable <IReadOnlyZoneInfo> > getZoneInfos)
 {
     DataMeter     = dataMeter;
     _getZoneInfos = getZoneInfos;
 }