From b0c978129ba55cf81e8470b6c9326745a5dbc7d1 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期四, 19 十二月 2024 15:26:30 +0800 Subject: [PATCH] 曲线修改 --- WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.cs | 75 ++++++++++++------------------------- 1 files changed, 25 insertions(+), 50 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.cs index 3420344..caa95e8 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump-main/XhsPumpMainPhartPanel.cs @@ -8,48 +8,7 @@ this.PageTitle.Caption = "娉靛瀷鍙锋洸绾�"; this.xhsPumpMainPhartListCtrl1.FocusedChangedEvent += XhsPumpMainPhartListCtrl1_FocusedChangedEvent; - //this.pumpPerformInfoCtrl1.SetDesignPointEvent += (q, h) => - //{ - // _design_pt = new Yw.Geometry.Point2d(q, h); - // this.xtrPerform2dChart1.SetEquipPt(_design_pt); - //}; - this.xtrPerform2dChart1.OnCalcQueryPoint += (gropu_pt) => - { - var vm_list = new List<PumpPointItmeViewModel>(); - vm_list.Add(new PumpPointItmeViewModel() - { - Group = "鏌ヨ鐐�", - Name = "娴侀噺", - Value = $"{gropu_pt.Q:N1}", - Unit = "m鲁/h" - }); - - vm_list.Add(new PumpPointItmeViewModel() - { - Group = "鏌ヨ鐐�", - Name = "鎵▼", - Value = $"{gropu_pt.H:N1}", - Unit = "m" - }); - - vm_list.Add(new PumpPointItmeViewModel() - { - Group = "鏌ヨ鐐�", - Name = "鏁堢巼", - Value = $"{gropu_pt.E:N1}", - Unit = "%" - }); - - vm_list.Add(new PumpPointItmeViewModel() - { - Group = "鏌ヨ鐐�", - Name = "鍔熺巼", - Value = $"{gropu_pt.P:N1}", - Unit = "kW" - }); - - // this.pumpPerformInfoCtrl1.SetBindingData(vm_list); - }; + } private long _pump_main_id; @@ -162,14 +121,15 @@ var disp_paras = diagram.DispParas; var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); - this.xtrPerform2dChart1.SetBindingData(cubic_spline_qh, cubic_spline_qe, cubic_spline_qp, disp_paras, is_calc_disp_paras); - // this.pumpPerformInfoCtrl1.SetDesignPoint(_design_pt); + // this.pumpViewChartCtrl1.SetBindingData(cubic_spline_qh, cubic_spline_qe, cubic_spline_qp, disp_paras, is_calc_disp_paras); + this.pumpViewChartCtrl1.SetBindingData(pump_main.RatedSpeed, dto); + // this.pumpPerformInfoCtrl1.SetDesignPoint(_design_pt); } //娓呯┖鍥捐〃鏁版嵁 private void ClearChart() { - this.xtrPerform2dChart1.InitialChartData(); + // this.xtrPerform2dChart1.InitialChartData(); } #endregion 鍥捐〃 @@ -242,6 +202,11 @@ Name = other_name+"-QH", GeometryStyle= HStation.PhartRelation.eGeometryStyle.FeatCurve, GraphType= HStation.PhartRelation.eGraphType.QH, + GraphParas=new HStation.Model.QHGraphParasModel() + { + Hz=50, + N=_pump_main.RatedSpeed + }.ToJson(), GeometryInfo=qh.ToDbString() }, new () @@ -249,6 +214,11 @@ Name = other_name+"-QE", GeometryStyle= HStation.PhartRelation.eGeometryStyle.FeatCurve, GraphType= HStation.PhartRelation.eGraphType.QE, + GraphParas=new HStation.Model.QEGraphParasModel() + { + Hz=50, + N=_pump_main.RatedSpeed + }.ToJson(), GeometryInfo=qe.ToDbString() }, new () @@ -256,6 +226,11 @@ Name = other_name+"-QP", GeometryStyle= HStation.PhartRelation.eGeometryStyle.FeatCurve, GraphType= HStation.PhartRelation.eGraphType.QP, + GraphParas=new HStation.Model.QPGraphParasModel() + { + Hz=50, + N=_pump_main.RatedSpeed + }.ToJson(), GeometryInfo=qp.ToDbString() }, } @@ -305,11 +280,11 @@ Yw.Pump.CurveQE qe = null; Yw.Pump.CurveQP qp = null; List<Yw.Geometry.Point2d> points_qh = null, points_qe = null, points_qp = null; - points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_qh.GraphType, graph_qh.GeometryInfo, 12, null); + points_qh = PhartPerformCurveHelper.GetFeatPointList((HStation.PhartRelation.eGraphType)graph_qh.GraphType, graph_qh.GeometryInfo, 12, null); qh = new Yw.Pump.CurveQH(Yw.Ahart.eFeatType.Cubic, points_qh); if (graph_qe != null) { - points_qe = PhartPerformCurveHelper.GetFeatPointList(graph_qe.GraphType, graph_qe.GeometryInfo, 12, null); + points_qe = PhartPerformCurveHelper.GetFeatPointList((HStation.PhartRelation.eGraphType)graph_qe.GraphType, graph_qe.GeometryInfo, 12, null); qe = new Yw.Pump.CurveQE(Yw.Ahart.eFeatType.Cubic, points_qe); } if (graph_qp != null) @@ -336,7 +311,7 @@ graph_qe, graph_qp, }; - var bol = await _bll.Update(_xhs_phart_diagram_ex_std_dto); + var bol = await _bll.UpdateEx(_xhs_phart_diagram_ex_std_dto); if (bol) { InitChart(_pump_main, _xhs_phart_diagram_ex_std_dto); @@ -358,7 +333,7 @@ dlg.VerifyValueChanged += async (value) => { _xhs_phart_diagram_ex_std_dto.OtherName = value; - var bol = await _bll.Update(_xhs_phart_diagram_ex_std_dto); + var bol = await _bll.UpdateEx(_xhs_phart_diagram_ex_std_dto); if (!bol) { XtraMessageBox.Show("鏇存柊澶辫触!"); @@ -380,7 +355,7 @@ dlg.VerifyValueChanged += async (value) => { _xhs_phart_diagram_ex_std_dto.Importance = value; - var bol = await _bll.Update(_xhs_phart_diagram_ex_std_dto); + var bol = await _bll.UpdateEx(_xhs_phart_diagram_ex_std_dto); if (!bol) { XtraMessageBox.Show("鏇存柊澶辫触!"); -- Gitblit v1.9.3