| | |
| | | |
| | | #region Public Evnet |
| | | |
| | | /// <summary> |
| | | /// 坐标变更事件 |
| | | /// </summary> |
| | | public event Action<PumpCoordinate> CoordinateChangedEvent; |
| | | |
| | | /// <summary> |
| | | /// 定义点变更事件 |
| | | /// </summary> |
| | | public event Action<Yw.Ahart.eCurveType, List<Yw.Geometry.Point2d>> DefinePointChangedEvent; |
| | | |
| | | /// <summary> |
| | | /// 选中点索引变更事件 |
| | | /// </summary> |
| | | public event Action<int> SelectedPointIndexChangedEvent; |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region Public Variable |
| | | |
| | | |
| | | /// <summary> |
| | | /// 鼠标模式 |
| | | /// </summary> |
| | |
| | | if (_coordinate.CoordMinQ + _coordinate.CoordSpaceQ * this._coordinate.GridNumberX < _maxQ * 1.05) |
| | | { |
| | | _coordinate.GridNumberX++; |
| | | } |
| | | |
| | | _coordinate = PumpCoordinate.CalcCoordinate(_fit_qh_pt_list, _fit_qe_pt_list, _fit_qp_pt_list); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | _axis_y_power.GridLines.Visible = false; |
| | | return; |
| | | } |
| | | |
| | | var default_visible = _def_qh_pt_list != null && _def_qh_pt_list.Any(); |
| | | var eff_visible = _def_qe_pt_list != null && _def_qe_pt_list.Any(); |
| | | var power_visible = _def_qp_pt_list != null && _def_qp_pt_list.Any(); |
| | |
| | | _axis_y_power.GridLines.Visible = true; |
| | | } |
| | | |
| | | |
| | | |
| | | if ((!eff_visible) && (!power_visible)) |
| | | { |
| | | _axis_y_head.SetAxisRange(_coordinate.DispMinH(), _coordinate.DispMaxH()); |
| | | } |
| | | else if ((!eff_visible) && power_visible) |
| | | { |
| | | var grid_count_eff = _coordinate.EndLineNoE - _coordinate.StartLineNoE; |
| | | |
| | | var grid_count_eff = _coordinate.EndLineNoE - _coordinate.StartLineNoE; |
| | | var grid_delete_head = grid_count_eff * _coordinate.CoordSpaceH; |
| | | grid_delete_head = _coordinate.CoordMinH < 0 ? -grid_delete_head : grid_delete_head; |
| | | |
| | | var grid_delete_power = grid_count_eff * _coordinate.CoordSpaceP; |
| | | |
| | | _axis_y_head.SetAxisRange(_coordinate.CoordMinH - grid_delete_head, _coordinate.CoordMinH + _coordinate.GridNumberY * _coordinate.CoordSpaceH); |
| | | _axis_y_power.SetAxisRange(_coordinate.CoordMinP, _coordinate.CoordMinP + _coordinate.GridNumberY * _coordinate.CoordSpaceP - grid_delete_power); |
| | | } |
| | |
| | | if (hitInfo.InSeriesPoint && hitInfo.SeriesPoint.Tag is int index) |
| | | { |
| | | _pick_point_index = index; |
| | | this.SelectedPointIndexChangedEvent?.Invoke(_pick_point_index); |
| | | } |
| | | } |
| | | } |