duheng
2024-12-02 70041775f6292fe60f9b4f0cc0ea8dd2f719cafe
WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/PumpCurveExpandDlg.cs
@@ -12,7 +12,7 @@
        /// <summary>
        /// 回调事件
        /// </summary>
        public event Func<Yw.Pump.CurveQH,  Yw.Pump.CurveQE, Yw.Pump.CurveQP, Task<bool>> ReloadDataEvent;
        public event Func<Yw.Pump.CurveQH, Yw.Pump.CurveQE, Yw.Pump.CurveQP, Task<bool>> ReloadDataEvent;
        private Yw.Geometry.CubicSpline2d _qh = null;
        private Yw.Geometry.CubicSpline2d _qe = null;
@@ -61,13 +61,13 @@
        private void barEditTrackBar_EditValueChanged(object sender, EventArgs e)
        {
        {
            if (this.barEditTrackBar.EditValue is not int ratio)
            {
                this.barStaticItem.Caption = $"X%";
                return;
            }
            this.barStaticItem.Caption = $"{ratio}%";
            this.barStaticItem.Caption = $"{ratio}%";
            var bol = Out(ratio, out Yw.Geometry.CubicSpline2d qh, out Yw.Geometry.CubicSpline2d qe, out Yw.Geometry.CubicSpline2d qp);
            if (!bol)
                return;
@@ -88,11 +88,11 @@
            Yw.Pump.CurveQH pump_qh = null;
            Yw.Pump.CurveQE pump_qe = null;
            Yw.Pump.CurveQP pump_qp = null;
            var qh_pt_list = qh.GetPointList();
            var qh_pt_list = qh.GetPointList();
            pump_qh = new Yw.Pump.CurveQH(Yw.Pump.eFeatType.Cubic, qh_pt_list);
            if (qe != null)
            {
                var qe_pt_list = qe.GetPointList();
                var qe_pt_list = qe.GetPointList();
                pump_qe = new Yw.Pump.CurveQE(Yw.Pump.eFeatType.Cubic, qe_pt_list);
            }
            if (qp != null)
@@ -100,7 +100,7 @@
                var qp_pt_list = qp.GetPointList();
                qp = new Yw.Geometry.CubicSpline2d(qp_pt_list);
                pump_qp = new Yw.Pump.CurveQP(Yw.Pump.eFeatType.Cubic, qp_pt_list);
            }
            }
            var result = await this.ReloadDataEvent?.Invoke(pump_qh, pump_qe, pump_qp);
            if (!result)
@@ -121,7 +121,7 @@
            qp = null;
            if (_qh == null)
                return false;
            qh = new Yw.Geometry.CubicSpline2d(_qh);
            qh = new Yw.Geometry.CubicSpline2d(_qh);
            qh.MaxX = qh.MaxX * ratio / 100;
            if (_qe != null)
@@ -139,6 +139,6 @@
            return true;
        }
    }
}