duheng
2024-12-11 2e8e85f65748ee5a5adf0dcda864aa4167cbf2ef
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-pump/05-import/02-picture/PumpImportByPictureCtrl.cs
@@ -60,7 +60,7 @@
        }
        private eCurveGetWay _curveGetWay = eCurveGetWay.All;
        private Yw.Pump.eCurveType _curveType = Yw.Pump.eCurveType.QH;
        private Yw.Ahart.eCurveType _curveType = Yw.Ahart.eCurveType.QH;
        private List<Yw.Geometry.Point2d> _picQHPoints = null;
        private List<Yw.Geometry.Point2d> _picQPPoints = null;
        private List<Yw.Geometry.Point2d> _picQEPoints = null;
@@ -156,13 +156,13 @@
        {
            switch (_curveType)
            {
                case Yw.Pump.eCurveType.QH:
                case Yw.Ahart.eCurveType.QH:
                    _rectQH = obj;
                    break;
                case Yw.Pump.eCurveType.QE:
                case Yw.Ahart.eCurveType.QE:
                    _rectQE = obj;
                    break;
                case Yw.Pump.eCurveType.QP:
                case Yw.Ahart.eCurveType.QP:
                    _rectQP = obj;
                    break;
            }
@@ -195,7 +195,7 @@
            this.curvePictureBoxCtrl1.ChartMaxX = Convert.ToDouble(this.barEditTxtMaxQ.EditValue);
            switch (_curveType)
            {
                case Yw.Pump.eCurveType.QH:
                case Yw.Ahart.eCurveType.QH:
                    {
                        if (this.txtMaxH.EditValue == null || this.txtMinH.EditValue == null)
                        {
@@ -205,7 +205,7 @@
                        this.curvePictureBoxCtrl1.ChartMinY = Convert.ToDouble(this.txtMinH.EditValue);
                    }
                    break;
                case Yw.Pump.eCurveType.QE:
                case Yw.Ahart.eCurveType.QE:
                    {
                        if (this.txtMaxE.EditValue == null || this.txtMinE.EditValue == null)
                        {
@@ -215,7 +215,7 @@
                        this.curvePictureBoxCtrl1.ChartMinY = Convert.ToDouble(this.txtMinE.EditValue);
                    }
                    break;
                case Yw.Pump.eCurveType.QP:
                case Yw.Ahart.eCurveType.QP:
                    {
                        if (this.txtMaxP.EditValue == null || this.txtMinP.EditValue == null)
                        {
@@ -282,25 +282,25 @@
            this.barCekPickPoint.Checked = false;
            if (e.Page == this.layoutControlGroupQH)
            {
                _curveType = Yw.Pump.eCurveType.QH;
                _curveType = Yw.Ahart.eCurveType.QH;
                ReloadChartCoordinate();
                this.curvePictureBoxCtrl1.CurrentCaptureCruve = Yw.Pump.eCurveType.QH;
                this.curvePictureBoxCtrl1.CurrentCaptureCruve = Yw.Ahart.eCurveType.QH;
                this.curvePictureBoxCtrl1.RefreshPictureShape(_picQHPoints, _rectQH);
            }
            else if (e.Page == this.layoutControlGroupQP)
            {
                _curveType = Yw.Pump.eCurveType.QP;
                _curveType = Yw.Ahart.eCurveType.QP;
                ReloadChartCoordinate();
                this.curvePictureBoxCtrl1.CurrentCaptureCruve = Yw.Pump.eCurveType.QP;
                this.curvePictureBoxCtrl1.CurrentCaptureCruve = Yw.Ahart.eCurveType.QP;
                this.curvePictureBoxCtrl1.RefreshPictureShape(_picQPPoints, _rectQP);
            }
            else if (e.Page == this.layoutControlGroupQE)
            {
                _curveType = Yw.Pump.eCurveType.QE;
                _curveType = Yw.Ahart.eCurveType.QE;
                ReloadChartCoordinate();
                this.curvePictureBoxCtrl1.CurrentCaptureCruve = Yw.Pump.eCurveType.QE;
                this.curvePictureBoxCtrl1.CurrentCaptureCruve = Yw.Ahart.eCurveType.QE;
                this.curvePictureBoxCtrl1.RefreshPictureShape(_picQEPoints, _rectQE);
            }
        }
@@ -316,13 +316,13 @@
        {
            switch (_curveType)
            {
                case Yw.Pump.eCurveType.QH:
                case Yw.Ahart.eCurveType.QH:
                    _picQHPoints = list;
                    break;
                case Yw.Pump.eCurveType.QE:
                case Yw.Ahart.eCurveType.QE:
                    _picQEPoints = list;
                    break;
                case Yw.Pump.eCurveType.QP:
                case Yw.Ahart.eCurveType.QP:
                    _picQPPoints = list;
                    break;
            }
@@ -565,9 +565,9 @@
            curvePointsQE = Regulate(curvePointsQE, 2);
            curvePointsQP = Regulate(curvePointsQP, 2);
            qh = new Pump.CurveQH(Yw.Pump.eFeatType.Cubic, curvePointsQH);
            qe = new Pump.CurveQE(Yw.Pump.eFeatType.Cubic, curvePointsQE);
            qp = new Pump.CurveQP(Yw.Pump.eFeatType.Cubic, curvePointsQP);
            qh = new Pump.CurveQH(Yw.Ahart.eFeatType.Cubic, curvePointsQH);
            qe = new Pump.CurveQE(Yw.Ahart.eFeatType.Cubic, curvePointsQE);
            qp = new Pump.CurveQP(Yw.Ahart.eFeatType.Cubic, curvePointsQP);
            return true;