duheng
2024-11-08 f075100821e33e6199132a50ea7d037ebfdc5408
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveChartShowDlg.cs
@@ -29,19 +29,39 @@
            }
            var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ValveQL);
            if (graph_ql == null)
            var graph_ol = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ValveOL);
            if (graph_ql == null && graph_ol == null)
            {
                return;
            }
            List<Yw.Geometry.Point2d> points_ql = null;
            points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null);
            if (graph_ql != null)
                points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null);
            var cubic_spline_ql = new Yw.Geometry.CubicSpline2d(points_ql);
            List<Yw.Geometry.Point2d> points_ol = null;
            if (graph_ol != null)
                points_ol = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 12, null);
            Yw.Geometry.CubicSpline2d cubic_spline = null;
            if (points_ql != null)
            {
                cubic_spline = new Yw.Geometry.CubicSpline2d(points_ql);
            }
            if (points_ol != null)
            {
                cubic_spline = new Yw.Geometry.CubicSpline2d(points_ol);
            }
            var disp_paras = diagram.DispParas;
            var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras);
            this.xtrPerform2dchart1.SetBindingData(cubic_spline_ql, disp_paras, is_calc_disp_paras);
            this.xtrPerform2dchart1.SetBindingData(cubic_spline, disp_paras, is_calc_disp_paras);
            if (graph_ol != null)
            {
                this.xtrPerform2dchart1.SetAxisTitle("阀门开度", "损失系数");
            }
            else
            {
                this.xtrPerform2dchart1.SetAxisTitle("流量(m³/h)", "水损/m");
            }
        }
    }
}