| | |
| | | /// <summary> |
| | | /// 管道视图 |
| | | /// </summary> |
| | | public class HydroPipeViewModel : HydroLinkViewModel |
| | | public class HydroPipeViewModel : HydroLinkViewModel, IHydroCalcuPipeResult |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | [Browsable(true)] |
| | | public double MinorLoss { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 流量 |
| | | /// </summary> |
| | | [Category("计算结果")] |
| | | [DisplayName("流量")] |
| | | [Display(Name = "流量(m³/h)")] |
| | | [PropertyOrder(11001)] |
| | | [Browsable(true)] |
| | | [DisplayUnit("m³/h")] |
| | | [HydroCalcuPro] |
| | | [ShowEditor(false)] |
| | | public virtual double? CalcuQ { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 进口压力 |
| | | /// </summary> |
| | | [Category("计算结果")] |
| | | [DisplayName("进口压力")] |
| | | [Display(Name = "进口压力(m)")] |
| | | [PropertyOrder(11002)] |
| | | [Browsable(true)] |
| | | [DisplayUnit("m")] |
| | | [HydroCalcuPro] |
| | | [ShowEditor(false)] |
| | | public virtual double? CalcuPr1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 出口压力 |
| | | /// </summary> |
| | | [Category("计算结果")] |
| | | [DisplayName("出口压力")] |
| | | [Display(Name = "出口压力(m)")] |
| | | [PropertyOrder(11003)] |
| | | [Browsable(true)] |
| | | [DisplayUnit("m")] |
| | | [HydroCalcuPro] |
| | | [ShowEditor(false)] |
| | | public virtual double? CalcuPr2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | this.Vmo.UpdatePropStatus(nameof(this.Vmo.MinorLoss), this, nameof(this.MinorLoss)); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新计算属性 |
| | | /// </summary> |
| | | public override void UpdateCalcuProperty(HydroCalcuVisualResult rhs) |
| | | { |
| | | base.UpdateCalcuProperty(rhs); |
| | | if (rhs is HydroCalcuPipeResult calcuPipeProperty) |
| | | { |
| | | this.CalcuQ = calcuPipeProperty.CalcuQ.HasValue ? Math.Round(calcuPipeProperty.CalcuQ.Value, 1) : null; |
| | | this.CalcuPr1 = calcuPipeProperty.CalcuPr1.HasValue ? Math.Round(calcuPipeProperty.CalcuPr1.Value, 2) : null; |
| | | this.CalcuPr2 = calcuPipeProperty.CalcuPr2.HasValue ? Math.Round(calcuPipeProperty.CalcuPr2.Value, 2) : null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |