| | |
| | | using DevExpress.XtraEditors; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using Yw.Geometry; |
| | | using System.Data; |
| | | using Yw.Pump; |
| | | using Yw.Vmo; |
| | | using Yw.WinFrmUI.Phart; |
| | |
| | | var qh_pts = curveqh.CurveData?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | if (qh_pts != null && qh_pts.Count > 3) |
| | | { |
| | | vm.CurveQH = new CubicSpline2d(qh_pts); |
| | | vm.CurveQH = qh_pts; |
| | | } |
| | | } |
| | | |
| | |
| | | var qp_pts = curveqp.CurveData?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | if (qp_pts != null && qp_pts.Count > 3) |
| | | { |
| | | vm.CurveQP = new CubicSpline2d(qp_pts); |
| | | vm.CurveQP = qp_pts; |
| | | } |
| | | } |
| | | |
| | |
| | | var qepts = curveqe.CurveData?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | if (qepts != null && qepts.Count > 3) |
| | | { |
| | | vm.CurveQE = new CubicSpline2d(qepts); |
| | | vm.CurveQE = qepts; |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (vm.CurveQH != null) |
| | | { |
| | | var qh_pts = vm.CurveQH.GetPointList(20); |
| | | var qh_pts = vm.CurveQH; |
| | | var qh_run_pts = qh_pts.GetQHPointListByN(vm.RatedHz, vmItem.Hz); |
| | | vmItem.CurveQH = new CubicSpline2d(qh_run_pts); |
| | | vmItem.CurveQH = qh_run_pts; |
| | | } |
| | | |
| | | if (vm.CurveQP != null) |
| | | { |
| | | var qp_pts = vm.CurveQP.GetPointList(20); |
| | | var qp_pts = vm.CurveQP; |
| | | var qp_run_pts = qp_pts.GetQPPointListByN(vm.RatedHz, vmItem.Hz); |
| | | vmItem.CurveQP = new CubicSpline2d(qp_run_pts); |
| | | vmItem.CurveQP = qp_pts; |
| | | } |
| | | |
| | | if (vm.CurveQE != null) |
| | | { |
| | | var qe_pts = vm.CurveQE.GetPointList(20); |
| | | var qe_pts = vm.CurveQE; |
| | | var qe_run_pts = qe_pts.GetQEPointListByN(vm.RatedHz, vmItem.Hz); |
| | | vmItem.CurveQE = new CubicSpline2d(qe_run_pts); |
| | | vmItem.CurveQE = qe_run_pts; |
| | | } |
| | | } |
| | | |
| | |
| | | var qh_pts = curveqh.CurveData?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | if (qh_pts != null && qh_pts.Count > 3) |
| | | { |
| | | vm.CurveQH = new CubicSpline2d(qh_pts); |
| | | vm.CurveQH = qh_pts; |
| | | } |
| | | } |
| | | |
| | |
| | | var qp_pts = curveqp.CurveData?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | if (qp_pts != null && qp_pts.Count > 3) |
| | | { |
| | | vm.CurveQP = new CubicSpline2d(qp_pts); |
| | | vm.CurveQP = qp_pts; |
| | | } |
| | | } |
| | | |
| | | var curveqe = _hydroInfo.Curves?.Find(x => x.Code == _pumpInfo.CurveQE); |
| | | if (curveqe != null) |
| | | { |
| | | var qepts = curveqe.CurveData?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | if (qepts != null && qepts.Count > 3) |
| | | var qe_pts = curveqe.CurveData?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | if (qe_pts != null && qe_pts.Count > 3) |
| | | { |
| | | vm.CurveQE = new CubicSpline2d(qepts); |
| | | vm.CurveQE = qe_pts; |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (vm.CurveQH != null) |
| | | { |
| | | var qh_pts = vm.CurveQH.GetPointList(20); |
| | | var qh_pts = vm.CurveQH; |
| | | var qh_run_pts = qh_pts.GetQHPointListByN(vm.RatedHz, vmItem.Hz); |
| | | vmItem.CurveQH = new CubicSpline2d(qh_run_pts); |
| | | vmItem.CurveQH = qh_run_pts; |
| | | } |
| | | |
| | | if (vm.CurveQP != null) |
| | | { |
| | | var qp_pts = vm.CurveQP.GetPointList(20); |
| | | var qp_pts = vm.CurveQP; |
| | | var qp_run_pts = qp_pts.GetQPPointListByN(vm.RatedHz, vmItem.Hz); |
| | | vmItem.CurveQP = new CubicSpline2d(qp_run_pts); |
| | | vmItem.CurveQP = qp_run_pts; |
| | | } |
| | | |
| | | if (vm.CurveQE != null) |
| | | { |
| | | var qe_pts = vm.CurveQE.GetPointList(20); |
| | | var qe_pts = vm.CurveQE; |
| | | var qe_run_pts = qe_pts.GetQEPointListByN(vm.RatedHz, vmItem.Hz); |
| | | vmItem.CurveQE = new CubicSpline2d(qe_run_pts); |
| | | vmItem.CurveQE = qe_run_pts; |
| | | } |
| | | } |
| | | } |