ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Phart.Core/v2/02-pump/01-view/PumpViewChart.cs ÐÞ¸Ä |
| | |
| | | private List<Yw.Geometry.Point2d> _def_qe_pt_list; |
| | | private List<Yw.Geometry.Point2d> _def_qp_pt_list; |
| | | |
| | | private PumpGroupPt _work_point = new(0, 0, 0, 0, 0); |
| | | private PumpQueryPointViewModel _work_point = new(); |
| | | private PumpCoordinate _coordinate; |
| | | |
| | | private bool _equip_visible = true; |
| | |
| | | |
| | | public event Action<PumpCoordinate> OnCurveCoordinateChanged; |
| | | |
| | | public event Action<PumpGroupPt> OnCalcQueryPoint = null; |
| | | public event Action<PumpQueryPointViewModel> OnCalcQueryPoint = null; |
| | | |
| | | #endregion |
| | | |
| | |
| | | { |
| | | var dis_min_h = _coordinate.DispMinH(); |
| | | var equip_paras = EquipCurveHelper.CalcEquipCurve(_qh, _equip_pt, dis_min_h, out Yw.Geometry.Point2d sect_pt); |
| | | if (equip_paras != null && equip_paras.EquipCurve.IsValid()) |
| | | if (equip_paras != null && equip_paras.IsValid()) |
| | | { |
| | | |
| | | using Pen pen = new(Color.Black, 2); |
| | |
| | | } |
| | | |
| | | // å建GraphicsPath对象ï¼å¹¶æ·»å æ ·æ¡çº¿ |
| | | var pts = equip_paras.EquipCurve.GetPointList().Select(x => new PointF((float)x.X, (float)x.Y)).ToArray(); |
| | | var pts = equip_paras.GetPointList().Select(x => new PointF((float)x.X, (float)x.Y)).ToArray(); |
| | | using var path = new System.Drawing.Drawing2D.GraphicsPath(); |
| | | var g_pts = new List<PointF>(); |
| | | foreach (var pt in pts) |
| | |
| | | _def_qp_pt_list = null; |
| | | |
| | | _coordinate = null; |
| | | _work_point = new PumpGroupPt(0, 0, 0, 0, 0); |
| | | _work_point = new PumpQueryPointViewModel(); |
| | | |
| | | UpdateChart(false); |
| | | } |
| | |
| | | if (_qe != null) |
| | | { |
| | | _work_point.E = _qe.GetPointY(_work_point.Q); |
| | | workInfoStringBuilder.AppendLine($"æç:{_work_point.E.ToString("N1")} "); |
| | | workInfoStringBuilder.AppendLine($"æç:{_work_point.E.Value.ToString("N1")} "); |
| | | } |
| | | |
| | | if (_qp != null) |
| | | { |
| | | _work_point.P = _qp.GetPointY(_work_point.Q); |
| | | workInfoStringBuilder.Append($"åç:{_work_point.P.ToString("N1")} "); |
| | | workInfoStringBuilder.Append($"åç:{_work_point.P.Value.ToString("N1")} "); |
| | | } |
| | | |
| | | _query_flow_line.AxisValue = _work_point.Q; |