| | |
| | | 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; |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region Calc |
| | | #region Set Axis |
| | | |
| | | private double _min_flow, _max_flow; |
| | | private double _max_head = 0, _min_head = 10000; |
| | |
| | | _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>(); |
| | |
| | | _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>(); |
| | |
| | | } |
| | | |
| | | //功率 |
| | | if (_max_power > _min_power && _qp_visible) |
| | | if (_max_power > _min_power && _power_visible) |
| | | { |
| | | //计算刻度 |
| | | var labels = new List<CustomAxisLabel>(); |
| | |
| | | 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;//多两条 |
| | | } |
| | |
| | | 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++) |
| | |
| | | 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++) |
| | |
| | | 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 |
| | |
| | | |
| | | 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(); |
| | | } |
| | | |