| | |
| | | using HStation.WinFrmUI.Xhs; |
| | | using HStation.WinFrmUI.PhartRelation; |
| | | using HStation.WinFrmUI.Xhs; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | |
| | | { |
| | | InitializeComponent(); |
| | | |
| | | this.hydroParterPropertyCtrl1.ViewCurveEvent += HydroParterPropertyCtrl1_ViewCurveEvent; |
| | | this.hydroParterPropertyCtrl1.SetCurveEvent += HydroParterPropertyCtrl1_SetCurveEvent; |
| | | this.hydroParterPropertyCtrl1.SetPatternEvent += HydroParterPropertyCtrl1_SetPatternEvent; |
| | | this.hydroParterPropertyCtrl1.PropertyValueChangedEvent += HydroParterPropertyCtrl1_PropertyValueChangedEvent; |
| | | this.hydroParterPropertyCtrl1.PropertyValueChangingEvent += HydroParterPropertyCtrl1_PropertyValueChangingEvent; |
| | | this.hydroParterPropertyCtrl1.MatchingDbEvent += HydroParterPropertyCtrl1_MatchingDbEvent; |
| | | } |
| | | |
| | | |
| | | |
| | | //水力信息方法 |
| | | private Func<Yw.Model.HydroModelInfo> _hydroInfoFunc = null; |
| | |
| | | public void InitialData(Func<Yw.Model.HydroModelInfo> hydroInfoFunc) |
| | | { |
| | | _hydroInfoFunc = hydroInfoFunc; |
| | | this.hydroParterPropertyCtrl1.InitialData(hydroInfoFunc); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | this.hydroParterPropertyCtrl1.UpdateRows(); |
| | | } |
| | | |
| | | //查看曲线 |
| | | private void HydroParterPropertyCtrl1_ViewCurveEvent(Yw.Model.HydroParterInfo parterInfo, string curveType) |
| | | { |
| | | var hydroInfo = _hydroInfoFunc?.Invoke(); |
| | | if (hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | switch (curveType) |
| | | { |
| | | case Yw.WinFrmUI.HydroCurve.Pump: |
| | | { |
| | | var pumpInfo = parterInfo as Yw.Model.HydroPumpInfo; |
| | | var curveqh = hydroInfo.Curves?.Find(x => x.Code == pumpInfo.CurveQH); |
| | | if (curveqh == null) |
| | | { |
| | | return; |
| | | } |
| | | var pumpId = string.IsNullOrEmpty(pumpInfo.DbId) ? 0 : Convert.ToInt64(pumpInfo.DbId); |
| | | var curveId = string.IsNullOrEmpty(curveqh.DbId) ? 0 : Convert.ToInt64(curveqh.DbId); |
| | | var speedRatio = pumpInfo.SpeedRatio ?? 1; |
| | | var dlg = new PumpPerform2dViewDlg(); |
| | | dlg.SetBindingData(pumpId, curveId, speedRatio); |
| | | dlg.ShowDialog(); |
| | | } |
| | | break; |
| | | case Yw.WinFrmUI.HydroCurve.Valve: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | } |
| | | |
| | | //选择曲线 |
| | | private bool HydroParterPropertyCtrl1_SetCurveEvent(HydroParterPropertyViewModel propViewModel, string curveType) |
| | | { |