From d0c6d3fe69b83d826c926582e96c3656a92b8993 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 19 十二月 2024 15:34:17 +0800 Subject: [PATCH] 梳理Exchanger 曲线 --- WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpSerialParallelChartDlg.cs | 28 +++++++++++++--------------- 1 files changed, 13 insertions(+), 15 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpSerialParallelChartDlg.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpSerialParallelChartDlg.cs index e375cb4..305dde6 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpSerialParallelChartDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpSerialParallelChartDlg.cs @@ -19,26 +19,24 @@ this.pumpSerialParallelInfoCtrl1.SetInfoEvent += (id, name, color) => { - this.pumpSerialParallelChart.SetInfo(id, name, color); + this.pumpSerialParallelChart.Set(id, name, color); }; this.pumpSerialParallelInfoCtrl1.SetDesignPointEvent += (q, h) => { _design_pt = new Point2d(q, h); - this.pumpSerialParallelChart.SetDesignPt(new Point2d(q, h)); + this.pumpSerialParallelChart.SetDesignPoint(new Point2d(q, h)); }; - this.pumpSerialParallelChart.OnCalcQueryPoint += (id, pt) => + this.pumpSerialParallelChart.QueryPointChangedEvent += (id, pt) => { this.pumpSerialParallelInfoCtrl1.SetQueryInfo(id, pt); }; } - private string _serial_parallel_id= "serial_parallel"; + private string _serial_parallel_id = "serial_parallel"; private Yw.Geometry.Point2d _design_pt; private bool _is_parallel; - - /// <summary> /// 璁剧疆 @@ -48,7 +46,7 @@ /// <param name="is_parallel"></param> /// <returns></returns> public string SetBindingData( - List<Yw.WinFrmUI.Phart.PumpSerialParallelViewModel> list, + List<Yw.WinFrmUI.Phart.PumpParallelViewModel> list, Yw.Geometry.Point2d design_pt, bool is_parallel = true) { @@ -92,7 +90,7 @@ return "鏃犳硶璁$畻涓插苟鑱旀洸绾�!"; } - var qh = vm_serial_parallel.Qh; + var qh = vm_serial_parallel.CurveQH; var min_h = qh.GetPointY(qh.MinX); var max_h = qh.GetPointY(qh.MaxX); if (design_pt != null) @@ -156,15 +154,15 @@ var vm_sp = new Yw.WinFrmUI.Phart.PumpSerialParallelInfoViewModel(); vm_sp.Id = _serial_parallel_id; vm_sp.Name = line_name; - vm_sp.Qh = new Yw.Geometry.CubicSpline2d(calc_pt_qh_list); - vm_sp.Qe = new Yw.Geometry.CubicSpline2d(calc_pt_qe_list); - vm_sp.Qp = new Yw.Geometry.CubicSpline2d(calc_pt_qp_list); - vm_sp.QhCalc = vm_sp.Qh; - vm_sp.QeCalc = vm_sp.Qe; - vm_sp.QpCalc = vm_sp.Qp; + vm_sp.CurveQH = new Yw.Geometry.CubicSpline2d(calc_pt_qh_list); + vm_sp.CurveQE = new Yw.Geometry.CubicSpline2d(calc_pt_qe_list); + vm_sp.CurveQP = new Yw.Geometry.CubicSpline2d(calc_pt_qp_list); + vm_sp.QhCalc = vm_sp.CurveQH; + vm_sp.QeCalc = vm_sp.CurveQE; + vm_sp.QpCalc = vm_sp.CurveQP; vm_sp.Color = Color.Black; vm_sp.IsBp = true; - vm_sp.IsSerialParallel = true; + vm_sp.IsDefault = true; return vm_sp; } -- Gitblit v1.9.3