using Yw.Model; namespace Yw.WinFrmUI { /// /// 连接节点 /// public class HydroJunctionPropertyViewModel : HydroNodePropertyViewModel { /// /// /// public HydroJunctionPropertyViewModel() { } /// /// /// public HydroJunctionPropertyViewModel(Yw.Model.HydroJunctionInfo rhs) : base(rhs) { this.Elev = rhs.Elev; this.Demand = rhs.Demand; this.DemandPattern = rhs.DemandPattern; } /// /// 标高/高程 /// [Category("数据")] [DisplayName("标高")] [PropertyOrder(101)] [Browsable(true)] public double Elev { get; set; } /// /// 需水量 /// [Category("数据")] [DisplayName("需水量")] [PropertyOrder(102)] [Browsable(true)] public double? Demand { get; set; } /// /// 需水模式 /// [Category("数据")] [DisplayName("需水模式")] [PropertyOrder(103)] [IsHydroPatternPro(HydroPattern.Demand)] [Browsable(true)] public string DemandPattern { get; set; } /// /// 更新属性 /// /// /// public override void UpdateProperty(HydroParterInfo rhs, List allParterList) { base.UpdateProperty(rhs, allParterList); if (rhs is Yw.Model.HydroJunctionInfo hydroJunctionInfo) { this.Elev = hydroJunctionInfo.Elev; this.Demand = hydroJunctionInfo.Demand; this.DemandPattern = hydroJunctionInfo.DemandPattern; } } } }