From a01861a95ede48fa4979a47b24f21616e362e534 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期二, 19 十一月 2024 16:29:46 +0800 Subject: [PATCH] 用水当量模块 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/02-valve/SetSchemeValveListCtrl.cs | 37 ++++++++++++++++++++++++++++--------- 1 files changed, 28 insertions(+), 9 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/02-valve/SetSchemeValveListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/02-valve/SetSchemeValveListCtrl.cs index 2eba392..f7704a7 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/02-valve/SetSchemeValveListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/02-valve/SetSchemeValveListCtrl.cs @@ -1,5 +1,4 @@ -锘縰sing HStation.WinFrmUI.Xhs; -using Yw.Model; +锘縰sing Yw.Model; namespace HStation.WinFrmUI { @@ -33,7 +32,12 @@ /// <summary> /// 姘村姏鏀瑰彉浜嬩欢 /// </summary> - public event Action<List<HydroParterInfo>> HydroChangedEvent; + public event Action<List<HydroParterInfo>> HydroChangedEvent; + + /// <summary> + /// 姘村姏璁板綍鏀瑰彉浜嬩欢 + /// </summary> + public event Action<SetSchemeParterRecord> HydroRecordChangedEvent; /// <summary> /// 鏄剧ず鏌ヨ闈㈡澘 @@ -67,7 +71,7 @@ /// </summary> public void SetBindingData(HydroModelInfo hydroInfo) { - _hydroInfo=hydroInfo; + _hydroInfo = hydroInfo; _allList = new List<HydroValveViewModel>(); if (hydroInfo != null && hydroInfo.Valves != null && hydroInfo.Valves.Count > 0) { @@ -83,7 +87,7 @@ /// <summary> /// 缁戝畾鏁版嵁 /// </summary> - public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuResult> allCalcuResultList) + public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuVisualResult> allCalcuResultList) { _allList = new List<HydroValveViewModel>(); if (hydroInfo != null && hydroInfo.Valves != null && hydroInfo.Valves.Count > 0) @@ -164,7 +168,7 @@ /// <summary> /// 鏇存柊璁$畻灞炴�� /// </summary> - public void UpdateCalcuProperty(List<HydroCalcuResult> allCalcuResultList) + public void UpdateCalcuProperty(List<HydroCalcuVisualResult> allCalcuResultList) { if (allCalcuResultList != null && allCalcuResultList.Count > 0) { @@ -221,7 +225,7 @@ //璁剧疆 private void SelectChange() - { + { if (_hydroInfo == null) { XtraMessageBox.Show("鏃犳按鍔涗俊鎭�"); @@ -248,7 +252,7 @@ }; dlg.ShowDialog(); } - + //鍗曞厓鏍肩偣鍑� private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) @@ -272,6 +276,21 @@ row.UpdateProperty(); this.gridView1.RefreshRow(e.RowHandle); this.HydroChangedEvent?.Invoke(new List<Yw.Model.HydroParterInfo>() { row.Vmo }); + + + var record = new SetSchemeParterRecord(); + record.Name = row.Vmo.Name; + record.Code = row.Vmo.Code; + record.Catalog = Yw.Hydro.ParterCatalog.Valve; + record.MatchingModel = output; + record.Items = new List<SetSchemeParterRecordItem>() { + new() {Name="鍨嬪彿",BeforeValue=$"{output.ModelType}",AfterValue=$"{output.MatchingModelType}"}, + new() {Name="鏉愭枡",BeforeValue=$"{output.Material}",AfterValue=$"{output.MatchingMaterial}"}, + new() {Name="鐩村緞锛坢m锛�",BeforeValue=$"{output.Diameter}",AfterValue=$"{output.MatchingDiameter}"}, + new() {Name="灞�闃荤郴鏁�",BeforeValue=$"{output.MinorLoss}",AfterValue=$"{output.MatchingMinorLoss}"}, + new() {Name="闃�闂ㄧ被鍨�",BeforeValue=$"{output.ValveType}",AfterValue=$"{output.MatchingValveType}"}, + }; + this.HydroRecordChangedEvent?.Invoke(record); } }; dlg.ShowDialog(); @@ -281,6 +300,6 @@ this.HydroClickEvent?.Invoke(row.Vmo); } } - + } } -- Gitblit v1.9.3