namespace Yw.WinFrmUI { /// /// /// public class HydroPumpListItemExtendViewModel { /// /// /// public HydroPumpListItemExtendViewModel ( Yw.Model.HydroPumpInfo rhs, List allPumpList, Yw.Model.HydroModelInfo hydroInfo ) { this.Code = rhs.Code; this.Name = rhs.Name; if (allPumpList != null && allPumpList.Count > 0) { var index = allPumpList.IndexOf(rhs); this.Color = HydroPumpCurveColorHelper.GetRandomColor(index); } this.Hz = Math.Round(rhs.RatedHz * rhs.SpeedRatio, 1); this.Extend = 100; this.RunStatus = rhs.LinkStatus == Yw.Hydro.LinkStatus.Open; this.Vmo = rhs; this.HydroInfo = hydroInfo; } /// /// 编码 /// [Display(Name = "编码")] public string Code { get; set; } /// /// 名称 /// [Display(Name = "名称")] public string Name { get; set; } /// /// 颜色 /// [Display(Name = "颜色")] public Color Color { get; set; } /// /// 频率 /// [Display(Name = "频率(hz)")] public double Hz { get; set; } /// /// 延长 /// [Display(Name = "延长(%)")] public double Extend { get; set; } /// /// 运行状态 /// [Display(Name = "运行状态")] public bool RunStatus { get; set; } /// /// /// public Yw.Model.HydroPumpInfo Vmo { get; set; } /// /// /// public Yw.Model.HydroModelInfo HydroInfo { get; set; } } }