Shuxia Ning
2025-01-14 0f99d4d12f2eae29bbe343f4b3131f2faeccda5d
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-pump/04-special/04-parallel/PumpParallelChart.cs
@@ -33,8 +33,8 @@
        private TextAnnotation _anno_txt_query_info;
        private PumpCoordinate _coordinate;
        private bool _qe_visible = true;
        private bool _qp_visible = true;
        private bool _eff_visible = true;
        private bool _power_visible = true;
        private bool _equip_visible = true;
        private List<Yw.Geometry.Point2d> _equip_pt_list = null;
@@ -227,12 +227,12 @@
                var max_flow = vm.CurrentExtendFlow.Value;
                DrawExpandLine(dx_args.Cache, pen, _axis_y_head, vm.CurrentCurveQH, max_flow);
                if (_qe_visible)
                if (_eff_visible)
                {
                    DrawExpandLine(dx_args.Cache, pen, _axis_y_eff, vm.CurrentCurveQE, max_flow);
                }
                if (_qp_visible)
                if (_power_visible)
                {
                    DrawExpandLine(dx_args.Cache, pen, _axis_y_power, vm.CurrentCurveQP, max_flow);
                }
@@ -300,7 +300,7 @@
            var qh_pt_y = qh_pt.Point.Y;
            cache.DrawLine(pen, new Point(qh_pt_x, qh_pt_y - offset_size), new Point(qh_pt_x, qh_pt_y + offset_size));
            if (E.HasValue && _qe_visible)
            if (E.HasValue && _eff_visible)
            {
                var qe_pt = _diagram.DiagramToPoint(Q, E.Value, _axis_x_flow, _axis_y_eff);
                var qe_pt_x = qe_pt.Point.X;
@@ -308,7 +308,7 @@
                cache.DrawLine(pen, new Point(qe_pt_x, qe_pt_y - offset_size), new Point(qe_pt_x, qe_pt_y + offset_size));
            }
            if (P.HasValue && _qp_visible)
            if (P.HasValue && _power_visible)
            {
                var qp_pt = _diagram.DiagramToPoint(Q, P.Value, _axis_x_flow, _axis_y_power);
                var qp_pt_x = qp_pt.Point.X;
@@ -449,7 +449,7 @@
        #endregion
        #region Calc
        #region Set Axis
        private double _min_flow, _max_flow;
        private double _max_head = 0, _min_head = 10000;
@@ -609,7 +609,7 @@
            _bottom_pane.Visibility = ChartElementVisibility.Hidden;
            _bottom_pane.Visibility = _qp_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            _bottom_pane.Visibility = _power_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            //计算刻度 Q
            var axisQLabels = new List<CustomAxisLabel>();
@@ -641,7 +641,7 @@
            _axis_y_head.GridLines.Visible = true;
            //效率
            if (_max_eff > _min_eff && _qe_visible)
            if (_max_eff > _min_eff && _eff_visible)
            {
                //计算刻度
                var labels = new List<CustomAxisLabel>();
@@ -659,7 +659,7 @@
            }
            //功率
            if (_max_power > _min_power && _qp_visible)
            if (_max_power > _min_power && _power_visible)
            {
                //计算刻度
                var labels = new List<CustomAxisLabel>();
@@ -683,7 +683,7 @@
            var grid_count_head = _coordinate.EndLineNoH - _coordinate.StartLineNoH;
            var grid_count_eff = _coordinate.EndLineNoE - _coordinate.StartLineNoE;
            int grid_count_up = Math.Max(grid_count_head, grid_count_eff);
            if (_qe_visible)
            if (_eff_visible)
            {
                grid_count_up += 2;//多两条
            }
@@ -992,7 +992,7 @@
                series_qe.SeriesPointsSorting = SortingMode.None;
                series_qe.SeriesPointsSortingKey = SeriesPointKey.Value_1;
                series_qe.View = series_qe_view;
                series_qe.Visible = _qe_visible;
                series_qe.Visible = _eff_visible;
                var pt_qe_list = vm.CurrentCurveQE.GetPointList(_feat_type_qe, 100);
                for (int i = 0; i < pt_qe_list.Count; i++)
@@ -1024,7 +1024,7 @@
                series_qp.SeriesPointsSorting = SortingMode.None;
                series_qp.SeriesPointsSortingKey = SeriesPointKey.Value_1;
                series_qp.View = series_qp_view;
                series_qp.Visible = _qp_visible;
                series_qp.Visible = _power_visible;
                var pt_qp_list = vm.CurrentCurveQP.GetPointList(_feat_type_qp, 100);
                for (int i = 0; i < pt_qp_list.Count; i++)
@@ -1088,10 +1088,10 @@
            if (_onMoveWorkPointLine)
            {
                var diagram_coordinates = _diagram.PointToDiagram(e.Location);
                var axisValue = diagram_coordinates.GetAxisValue(_axis_x_flow);
                if (axisValue == null)
                var axis_value = diagram_coordinates.GetAxisValue(_axis_x_flow);
                if (axis_value == null)
                    return;
                double chartQ = axisValue.NumericalValue;
                double chartQ = axis_value.NumericalValue;
                CalcWorkPointByQ(chartQ);
            }
            else
@@ -1184,14 +1184,14 @@
        private void barCekCurveQEVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            _qe_visible = this.barCekCurveQEVisible.Checked;
            _eff_visible = this.barCekCurveQEVisible.Checked;
            UpdateChart();
        }
        private void barCekCurveQPVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            _qp_visible = this.barCekCurveQPVisible.Checked;
            _bottom_pane.Visibility = _qp_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            _power_visible = this.barCekCurveQPVisible.Checked;
            _bottom_pane.Visibility = _power_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden;
            UpdateChart();
        }