duheng
2024-11-06 31e3f4ffdf7d566db391a5fcb94984f23e0abb02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using HStation.WinFrmUI.PhartRelation;
 
namespace HStation.WinFrmUI.Xhs
{
    public partial class ValveChartShowDlg : DevExpress.XtraEditors.XtraForm
    {
        public ValveChartShowDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
 
        //初始化图表数据
        public void InitChart(Vmo.XhsValveMainPhartMappingExtensions dto)
        {
            if (dto == null)
            {
                return;
            }
            var diagram = dto.Diagram;
            if (diagram == null)
            {
                return;
            }
            var graph_list = diagram.GraphList;
            if (graph_list == null || !graph_list.Any())
            {
                return;
            }
 
            var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ValveQL);
            if (graph_ql == null)
            {
                return;
            }
 
            List<Yw.Geometry.Point2d> points_ql = null;
            points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null);
 
            var cubic_spline_ql = new Yw.Geometry.CubicSpline2d(points_ql);
 
            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);
        }
    }
}