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);
|
}
|
}
|
}
|