namespace Yw.WinFrmUI { /// /// /// public class HydroValveViewModel : HydroLinkViewModel { /// /// /// public HydroValveViewModel() : base() { } /// /// /// public HydroValveViewModel(Yw.Model.HydroValveInfo rhs) : base(rhs) { this.Material = rhs.Material; this.Diameter = rhs.Diameter; this.MinorLoss = rhs.MinorLoss; this.ValveType = rhs.ValveType; this.OpeningDegree = rhs.OpeningDegree; this.ValveSetting = rhs.ValveSetting; this.Vmo = rhs; } /// /// /// public HydroValveViewModel(Yw.Model.HydroValveInfo rhs, Yw.WinFrmUI.HydroCalcuLinkResult calcuResult) : base(rhs, calcuResult) { this.Material = rhs.Material; this.Diameter = rhs.Diameter; this.MinorLoss = rhs.MinorLoss; this.ValveType = rhs.ValveType; this.OpeningDegree = rhs.OpeningDegree; this.ValveSetting = rhs.ValveSetting; this.Vmo = rhs; } /// /// 阀门状态 /// [DisplayName("阀门状态")] public override string LinkStatus { get; set; } /// /// 材质 /// [DisplayName("材质")] public string Material { get; set; } /// /// 直径(mm) /// [DisplayName("直径(mm)")] public double Diameter { get; set; } /// /// 局阻系数 /// [DisplayName("局阻系数")] public double MinorLoss { get; set; } /// /// 阀门类型 /// [DisplayName("阀门类型")] public string ValveType { get; set; } /// /// 阀门开度 /// [DisplayName("阀门开度")] public double OpeningDegree { get; set; } /// /// 阀门设置 /// [DisplayName("阀门设置")] public string ValveSetting { get; set; } /// /// /// public new Yw.Model.HydroValveInfo Vmo { get; set; } /// /// 更新 /// public override void Update() { base.Update(); if (this.Vmo != null) { this.Material = this.Vmo.Material; this.Diameter = this.Vmo.Diameter; this.MinorLoss = this.Vmo.MinorLoss; this.ValveType = this.Vmo.ValveType; this.OpeningDegree = this.Vmo.OpeningDegree; this.ValveSetting = this.Vmo.ValveSetting; } } } }