| | |
| | | using HStation.Assets; |
| | | using HStation.Revit; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | |
| | | /// </summary> |
| | | public class ValveMatchingViewModel |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public ValveMatchingViewModel() { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public ValveMatchingViewModel(Yw.Model.HydroValveInfo rhs, Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuResult> allCalcuResult) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.Code = rhs.Code; |
| | | this.ModelType = rhs.ModelType; |
| | | this.DbLocked = rhs.DbLocked; |
| | | this.DbId = rhs.DbId; |
| | | this.CurveDbId = hydroInfo.Curves?.Find(x => x.Code == rhs.ValveSetting)?.DbId; |
| | | this.Material = rhs.Material; |
| | | this.Diameter = rhs.Diameter; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | switch (rhs.ValveType) |
| | | { |
| | | case Yw.Hydro.ValveType.PRV: this.ValveType = HStation.Assets.eValveType.PRV; break; |
| | | case Yw.Hydro.ValveType.PSV: this.ValveType = HStation.Assets.eValveType.PSV; break; |
| | | case Yw.Hydro.ValveType.PBV: this.ValveType = HStation.Assets.eValveType.PBV; break; |
| | | case Yw.Hydro.ValveType.TCV: this.ValveType = HStation.Assets.eValveType.TCV; break; |
| | | case Yw.Hydro.ValveType.FCV: this.ValveType = HStation.Assets.eValveType.FCV; break; |
| | | case Yw.Hydro.ValveType.GPV: this.ValveType = HStation.Assets.eValveType.GPV; break; |
| | | case Yw.Hydro.ValveType.CV: this.ValveType = HStation.Assets.eValveType.CV; break; |
| | | default: break; |
| | | } |
| | | this.ValveSetting = rhs.ValveSetting; |
| | | |
| | | } |
| | | |
| | | /// <summaryd> |
| | | /// ID |
| | | /// </summary> |
| | |
| | | public string DbId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ChartDbId |
| | | /// CurveDbId |
| | | /// </summary> |
| | | [DisplayName("ChartDbId")] |
| | | [DisplayName("CurveDbId")] |
| | | [Browsable(false)] |
| | | public string ChartDbId { get; set; } |
| | | public string CurveDbId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 直径 |
| | |
| | | /// </summary> |
| | | [DisplayName("阀门类型")] |
| | | [Browsable(true)] |
| | | public string ValveType { get; set; } |
| | | public eValveType ValveType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 阀门设置 |
| | |
| | | [DisplayName("阀门设置")] |
| | | [Browsable(true)] |
| | | public string ValveSetting { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 阀门开度 |
| | | /// </summary> |
| | | [DisplayName("阀门开度")] |
| | | [Browsable(true)] |
| | | public int ValveLift { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配型号 |
| | |
| | | public double? MatchingDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// MatchingChartDbId |
| | | /// MatchingCurveDbId |
| | | /// </summary> |
| | | [DisplayName("MatchingChartDbId")] |
| | | [DisplayName("MatchingCurveDbId")] |
| | | [Browsable(false)] |
| | | public string MatchingChartDbId { get; set; } |
| | | public string MatchingCurveDbId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配材质 |
| | |
| | | /// </summary> |
| | | [DisplayName("匹配阀门类型")] |
| | | [Browsable(true)] |
| | | public string MatchingValveType { get; set; } |
| | | public eValveType MatchingValveType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配阀门设置 |
| | |
| | | public List<CurvePointMatchingViewModel> MatchingCurveQL { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 匹配阀门开度 |
| | | /// 匹配开度损失曲线 |
| | | /// </summary> |
| | | [DisplayName("匹配阀门开度")] |
| | | [Browsable(true)] |
| | | public int? MatchingValveLift { get; set; } |
| | | [DisplayName("匹配开度损失曲线")] |
| | | [Browsable(false)] |
| | | public List<CurvePointMatchingViewModel> MatchingCurveOL { get; set; } |
| | | } |
| | | } |