From 1c3e5bc50d3045d51cb9a9f747d53442b82d9e2c Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 27 十二月 2024 17:50:22 +0800 Subject: [PATCH] 资产修改 --- WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/02-universal/03-import/01-excel/UniversalChartExcelImportCtrl.cs | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/02-universal/03-import/01-excel/UniversalChartExcelImportCtrl.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/02-universal/03-import/01-excel/UniversalChartExcelImportCtrl.cs index 2f37475..d88a952 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/02-universal/03-import/01-excel/UniversalChartExcelImportCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/02-universal/03-import/01-excel/UniversalChartExcelImportCtrl.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.WinFrmUI +锘縰sing Yw.WinFrmUI.Phart; + +namespace HStation.WinFrmUI { public partial class UniversalChartExcelImportCtrl : DevExpress.XtraEditors.XtraUserControl { @@ -8,19 +10,20 @@ } + private Yw.Ahart.eCurveType _curve_type; /// <summary> /// 缁戝畾鏁版嵁 /// </summary> public void SetBindingData(string file_path, Yw.Ahart.eCurveType curve_type) { + _curve_type = curve_type; var err_msg = Yw.WinFrmUI.PhartExcelHelper.ParseUniversalExcel(file_path, out List<Yw.Geometry.Point2d> list); if (!string.IsNullOrEmpty(err_msg)) { XtraMessageBox.Show(err_msg); return; - } - - this.universalChartExcelImportCtrl1.SetBindingData(curve_type, list); + } + this.universalChartExcelEditCtrl.SetBindingData(curve_type, list); } @@ -29,7 +32,28 @@ /// </summary> public Yw.Vmo.PhartDiagramExGraphListVmo Get() { - return new(); + if (!this.universalChartExcelEditCtrl.Get(out Yw.Ahart.eFeatType feat_type, out List<Yw.Geometry.Point2d> pt_list)) + return default; + var ds_stirng = pt_list.ToDbString(_curve_type, feat_type); + if (string.IsNullOrEmpty(ds_stirng)) + return default; + var geometry_paras = new HStation.Model.FeatCurveGeometryParasModel(); + geometry_paras.DefinePoints = pt_list; + + var vmo = new Yw.Vmo.PhartDiagramExGraphListVmo(); + vmo.DiagramType = (int)HStation.PhartRelation.eDiagramType.Feat; + vmo.GraphList = new List<Yw.Vmo.PhartGraphVmo>() + { + new () + { + GraphType =(int) _curve_type, + GeometryParas= geometry_paras.ToJson(), + GeometryStyle = (int) HStation.PhartRelation.eGeometryStyle.FeatCurve, + GeometryInfo = ds_stirng + } + }; + + return vmo; } -- Gitblit v1.9.3