| | |
| | | /// <summary> |
| | | /// 连接节点 |
| | | /// </summary> |
| | | public class HydroJunctionViewModel : HydroNodeViewModel |
| | | public class HydroJunctionViewModel : HydroNodeViewModel, IHydroCalcuJunctionResult |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | public virtual string DemandPattern { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 压力 |
| | | /// </summary> |
| | | [Category("计算结果")] |
| | | [DisplayName("压力")] |
| | | [Display(Name = "压力(m)")] |
| | | [DisplayUnit("m")] |
| | | [HydroCalcuPro] |
| | | [PropertyOrder(11002)] |
| | | [ShowEditor(false)] |
| | | [Browsable(true)] |
| | | public virtual double? CalcuPr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Browsable(false)] |
| | |
| | | this.Vmo.UpdatePropStatus(nameof(this.Vmo.DemandPattern), this, nameof(this.DemandPattern)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新计算属性 |
| | | /// </summary> |
| | | public override void UpdateCalcuProperty(HydroCalcuVisualResult rhs) |
| | | { |
| | | base.UpdateCalcuProperty(rhs); |
| | | if (rhs is HydroCalcuJunctionResult calcuJunctionResult) |
| | | { |
| | | this.CalcuPr = calcuJunctionResult.CalcuPr.HasValue ? Math.Round(calcuJunctionResult.CalcuPr.Value, 2) : null; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |