| | |
| | | namespace HStation.WinFrmUI |
| | | using Yw.WinFrmUI.Phart; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class PumpChartExcelImportCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | | public PumpChartExcelImportCtrl() |
| | | { |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | public void SetBindingData(string file_path) |
| | | { |
| | | |
| | | var err_msg = Yw.WinFrmUI.PhartExcelHelper.ParsePumpExcel(file_path, out List<Yw.Geometry.Point2d> qh, out List<Yw.Geometry.Point2d> qe, out List<Yw.Geometry.Point2d> qp); |
| | | if (!string.IsNullOrEmpty(err_msg)) |
| | | { |
| | | XtraMessageBox.Show(err_msg); |
| | | return; |
| | | } |
| | | this.pumpChartExcelEditCtrl1.SetBindingData(qh, qe, qp); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取 |
| | | /// </summary> |
| | | public HStation.Vmo.PhartDiagramRelationExtensionsVmo Get() |
| | | public Yw.Vmo.PhartDiagramExGraphListVmo Get() |
| | | { |
| | | return new Vmo.PhartDiagramRelationExtensionsVmo(); |
| | | } |
| | | if (!this.pumpChartExcelEditCtrl1.Get |
| | | ( |
| | | out List<Yw.Geometry.Point2d> def_qh_pt_list, |
| | | out List<Yw.Geometry.Point2d> def_qe_pt_list, |
| | | out List<Yw.Geometry.Point2d> def_qp_pt_list, |
| | | out Yw.Ahart.eFeatType feat_type_qh, |
| | | out Yw.Ahart.eFeatType feat_type_qe, |
| | | out Yw.Ahart.eFeatType feat_type_qp |
| | | ) |
| | | ) |
| | | { |
| | | return default; |
| | | } |
| | | |
| | | var vmo = new Yw.Vmo.PhartDiagramExGraphListVmo(); |
| | | vmo.DiagramType = (int)HStation.PhartRelation.eDiagramType.Feat; |
| | | vmo.GraphList = new List<Yw.Vmo.PhartGraphVmo>() |
| | | { |
| | | new () |
| | | { |
| | | GraphType =(int)Yw.Ahart.eCurveType.QH, |
| | | GraphParas= new HStation.Model.QHGraphParasModel() |
| | | { |
| | | Hz=50, |
| | | }.ToJson(), |
| | | GeometryParas= new HStation.Model.FeatCurveGeometryParasModel |
| | | { |
| | | DefinePoints = def_qh_pt_list |
| | | }.ToJson(), |
| | | GeometryStyle = (int) HStation.PhartRelation.eGeometryStyle.FeatCurve, |
| | | GeometryInfo = def_qh_pt_list.ToDbString(Yw.Ahart.eCurveType.QH,feat_type_qh) |
| | | }, |
| | | new () |
| | | { |
| | | GraphType =(int)Yw.Ahart.eCurveType.QE, |
| | | GraphParas= new HStation.Model.QEGraphParasModel() |
| | | { |
| | | Hz=50, |
| | | }.ToJson(), |
| | | GeometryParas= new HStation.Model.FeatCurveGeometryParasModel |
| | | { |
| | | DefinePoints = def_qe_pt_list |
| | | }.ToJson(), |
| | | GeometryStyle = (int) HStation.PhartRelation.eGeometryStyle.FeatCurve, |
| | | GeometryInfo = def_qe_pt_list.ToDbString(Yw.Ahart.eCurveType.QE,feat_type_qe) |
| | | }, |
| | | new () |
| | | { |
| | | GraphType =(int)Yw.Ahart.eCurveType.QP, |
| | | GraphParas= new HStation.Model.QPGraphParasModel() |
| | | { |
| | | Hz=50, |
| | | }.ToJson(), |
| | | GeometryParas= new HStation.Model.FeatCurveGeometryParasModel |
| | | { |
| | | DefinePoints = def_qp_pt_list |
| | | }.ToJson(), |
| | | GeometryStyle = (int) HStation.PhartRelation.eGeometryStyle.FeatCurve, |
| | | GeometryInfo = def_qp_pt_list.ToDbString(Yw.Ahart.eCurveType.QP,feat_type_qp) |
| | | }, |
| | | }; |
| | | |
| | | return vmo; |
| | | } |
| | | |
| | | |
| | | } |