Shuxia Ning
2024-10-15 a8e54743e599fa42d627cc97ab1468937e719c04
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/03-serial-parallel/PumpSerialParallelChart.cs
@@ -41,9 +41,9 @@
        private Yw.Geometry.Point2d _design_pt;
        private bool _cubic_spline_qh_visible = true;
        private bool _cubic_spline_qe_visible = true;
        private bool _cubic_spline_qp_visible = true;
        private bool _qh_visible = true;
        private bool _qe_visible = true;
        private bool _qp_visible = true;
        private bool _cubic_spline_eq_visible = true;
        private bool _initialData = false;
@@ -190,11 +190,11 @@
        /// 设置曲线
        /// </summary>
        /// <param name="id"></param>
        /// <param name="cubic_spline_qh"></param>
        /// <param name="cubic_spline_qe"></param>
        /// <param name="cubic_spline_qp"></param>
        /// <param name="qh"></param>
        /// <param name="qe"></param>
        /// <param name="qp"></param>
        /// <param name="name"></param>
        public void Set(string id, Yw.Geometry.CubicSpline2d cubic_spline_qh, Yw.Geometry.CubicSpline2d cubic_spline_qe, Yw.Geometry.CubicSpline2d cubic_spline_qp, string name = "")
        public void Set(string id, Yw.Geometry.CubicSpline2d qh, Yw.Geometry.CubicSpline2d qe, Yw.Geometry.CubicSpline2d qp, string name = "")
        {
            var exist = _vm_list.FirstOrDefault(x => x.Id == id);
            if (exist == null)
@@ -203,9 +203,9 @@
            {
                exist.Name = name;
            }
            exist.QhCalc = cubic_spline_qh;
            exist.QeCalc = cubic_spline_qe;
            exist.QpCalc = cubic_spline_qp;
            exist.QhCalc = qh;
            exist.QeCalc = qe;
            exist.QpCalc = qp;
            UpdateChart(true);
        }
@@ -416,8 +416,8 @@
            _pane_qp.Visibility = ChartElementVisibility.Hidden;
            _pane_qe.Visibility = _cubic_spline_qe_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            _pane_qp.Visibility = _cubic_spline_qp_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            _pane_qe.Visibility = _qe_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            _pane_qp.Visibility = _qp_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            //计算刻度 Q
            var axisQLabels = new List<CustomAxisLabel>();
@@ -449,7 +449,7 @@
            _axis_y_qh.GridLines.Visible = true;
            //效率
            if (_maxE > _minE && _cubic_spline_qe_visible)
            if (_maxE > _minE && _qe_visible)
            {
                //计算刻度
                var axisQELabels = new List<CustomAxisLabel>();
@@ -672,7 +672,7 @@
            series_qh.SeriesPointsSorting = SortingMode.None;
            series_qh.SeriesPointsSortingKey = SeriesPointKey.Value_1;
            series_qh.View = series_qh_view;
            series_qh.Visible = _cubic_spline_qh_visible;
            series_qh.Visible = _qh_visible;
            var pointsQH = curve.QhCalc.GetPointList(12);
            for (int i = 0; i < pointsQH.Count; i++)
@@ -681,10 +681,10 @@
            }
            var point_qh = pointsQH[pointsQH.Count() - 1];
            var anchor_pt_qh = new DevExpress.XtraCharts.PaneAnchorPoint();
            anchor_pt_qh.Pane = _pane_qh;
            anchor_pt_qh.AxisXCoordinate.AxisValue = point_qh.X.ToString();
            anchor_pt_qh.AxisYCoordinate.AxisValue = point_qh.Y.ToString();
            var anchor_qh_pt = new DevExpress.XtraCharts.PaneAnchorPoint();
            anchor_qh_pt.Pane = _pane_qh;
            anchor_qh_pt.AxisXCoordinate.AxisValue = point_qh.X.ToString();
            anchor_qh_pt.AxisYCoordinate.AxisValue = point_qh.Y.ToString();
            var position_qh = new DevExpress.XtraCharts.RelativePosition();
            position_qh.Angle = 30;
@@ -692,7 +692,7 @@
            var txt_qh = new TextAnnotation();
            txt_qh.Border.Visibility = DefaultBoolean.False;
            txt_qh.AnchorPoint = anchor_pt_qh;
            txt_qh.AnchorPoint = anchor_qh_pt;
            txt_qh.AutoHeight = true;
            txt_qh.AutoWidth = true;
            txt_qh.BackColor = System.Drawing.Color.Transparent;
@@ -735,7 +735,7 @@
                series_qe.SeriesPointsSorting = SortingMode.None;
                series_qe.SeriesPointsSortingKey = SeriesPointKey.Value_1;
                series_qe.View = series_qe_view;
                series_qe.Visible = _cubic_spline_qe_visible;
                series_qe.Visible = _qe_visible;
                var pointsQE = curve.QeCalc.GetPointList(12);
                for (int i = 0; i < pointsQE.Count; i++)
@@ -766,7 +766,7 @@
                series_qp.SeriesPointsSorting = SortingMode.None;
                series_qp.SeriesPointsSortingKey = SeriesPointKey.Value_1;
                series_qp.View = series_qp_view;
                series_qp.Visible = _cubic_spline_qp_visible;
                series_qp.Visible = _qp_visible;
                var pointsQP = curve.QpCalc.GetPointList(12);
                for (int i = 0; i < pointsQP.Count; i++)