| | |
| | | public HydroResistanceViewModel(Yw.Model.HydroResistanceInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo) |
| | | { |
| | | this.LinkStatus = HydroResistanceStatusHelper.GetStatusName(rhs.LinkStatus); |
| | | this.UpdatePropStatus(nameof(this.LinkStatus), rhs, nameof(rhs.LinkStatus)); |
| | | this.Material = rhs.Material; |
| | | this.UpdatePropStatus(nameof(this.Material), rhs, nameof(rhs.Material)); |
| | | this.Diameter = rhs.Diameter; |
| | | this.UpdatePropStatus(nameof(this.Diameter), rhs, nameof(rhs.Diameter)); |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.UpdatePropStatus(nameof(this.MinorLoss), rhs, nameof(rhs.MinorLoss)); |
| | | this.CurveQL = rhs.CurveQL; |
| | | this.UpdatePropStatus(nameof(this.CurveQL), rhs, nameof(rhs.CurveQL)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 开关状态 |
| | | /// 模式 |
| | | /// </summary> |
| | | [Category("数据")] |
| | | [DisplayName("开关状态")] |
| | | [Display(Name = "开关状态")] |
| | | [Description("[默认]使用水头损失曲线;[开启]使用局阻系数")] |
| | | [DisplayName("模式")] |
| | | [Display(Name = "模式")] |
| | | [PropertyOrder(103)] |
| | | [Browsable(true)] |
| | | [TypeConverter(typeof(HydroResistanceStatusConverter))] |
| | |
| | | /// </summary> |
| | | [Category("数据")] |
| | | [DisplayName("水头损失曲线")] |
| | | [HydroCurvePro(HydroCurve.ResistanceQL, HydroCurveType.CurveQL)] |
| | | [HydroCurvePro(HydroCurve.Resistance, HydroCurveType.CurveQL)] |
| | | [PropertyOrder(1004)] |
| | | [Browsable(true)] |
| | | [Browsable(false)] |
| | | public virtual string Curve |
| | | { |
| | | get |
| | |
| | | [DisplayName("水头损失曲线")] |
| | | [PropertyOrder(1005)] |
| | | [HydroCurvePro(HydroCurve.Resistance, HydroCurveType.CurveQL)] |
| | | [Browsable(false)] |
| | | public string CurveQL { get; set; } |
| | | [Browsable(true)] |
| | | public virtual string CurveQL { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 沿程损失 |
| | |
| | | { |
| | | base.UpdateProperty(); |
| | | this.LinkStatus = HydroResistanceStatusHelper.GetStatusName(this.Vmo.LinkStatus); |
| | | this.UpdatePropStatus(nameof(this.LinkStatus), this.Vmo, nameof(this.Vmo.LinkStatus)); |
| | | this.Material = this.Vmo.Material; |
| | | this.UpdatePropStatus(nameof(this.Material), this.Vmo, nameof(this.Vmo.Material)); |
| | | this.Diameter = this.Vmo.Diameter; |
| | | this.UpdatePropStatus(nameof(this.Diameter), this.Vmo, nameof(this.Vmo.Diameter)); |
| | | this.MinorLoss = this.Vmo.MinorLoss; |
| | | this.UpdatePropStatus(nameof(this.MinorLoss), this.Vmo, nameof(this.Vmo.MinorLoss)); |
| | | this.CurveQL = this.Vmo.CurveQL; |
| | | this.UpdatePropStatus(nameof(this.CurveQL), this.Vmo, nameof(this.Vmo.CurveQL)); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | base.UpdateVmoProperty(); |
| | | this.Vmo.LinkStatus = HydroResistanceStatusHelper.GetStatusCode(this.LinkStatus); |
| | | this.Vmo.UpdatePropStatus(nameof(this.Vmo.LinkStatus), this, nameof(this.LinkStatus)); |
| | | this.Vmo.Material = this.Material; |
| | | this.Vmo.UpdatePropStatus(nameof(this.Vmo.Material), this, nameof(this.Material)); |
| | | this.Vmo.Diameter = this.Diameter; |
| | | this.Vmo.UpdatePropStatus(nameof(this.Vmo.Diameter), this, nameof(this.Diameter)); |
| | | this.Vmo.MinorLoss = this.MinorLoss; |
| | | this.Vmo.UpdatePropStatus(nameof(this.Vmo.MinorLoss), this, nameof(this.MinorLoss)); |
| | | this.Vmo.CurveQL = this.CurveQL; |
| | | this.Vmo.UpdatePropStatus(nameof(this.Vmo.CurveQL), this, nameof(this.CurveQL)); |
| | | } |
| | | |
| | | /// <summary> |