From 9ffb31c233f3b4891550293294c2ee716f77b42a Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期日, 22 九月 2024 19:08:49 +0800 Subject: [PATCH] 完善自动匹配 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs index f5b9428..634cc5e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs @@ -6,6 +6,11 @@ { InitializeComponent(); this.elbowsMatchingCtrl1.RowClickEvent += RowClickEvent; + this.fourLinkMatchingCtrl1.RowClickEvent += RowClickEvent; + this.pipeLineMatchingCtrl1.RowClickEvent += RowClickEvent; + this.pumpMatchingCtrl1.RowClickEvent += RowClickEvent; + this.threeLinkMatchingCtrl1.RowClickEvent += RowClickEvent; + this.valveMatchingCtrl1.RowClickEvent += RowClickEvent; } private void RowClickEvent(string code) @@ -15,6 +20,8 @@ public event Action<string> FormRowClickEvent = null; + public event Func<AssetsAutoMatchingViewModel, bool> RelaodEvent = null; + private BLL.PumpMain _pumpMain = null; private BLL.AdaptingManage _adaptingManage = null; @@ -23,18 +30,22 @@ private BLL.ValveMain _valveMain = null; - public void SetBindingData(AssetsAutoMatchingViewModel inputViewModel) + private AssetsAutoMatchingViewModel _assetsAutoMatching = null; + + public async void SetBindingData(AssetsAutoMatchingViewModel inputViewModel) { + _assetsAutoMatching = inputViewModel; this.elbowsMatchingCtrl1.SetBindingData(inputViewModel.ElbowsMatchingModels); this.pipeLineMatchingCtrl1.SetBindingData(inputViewModel.PipeLineMatchingModels); this.pumpMatchingCtrl1.SetBindingData(inputViewModel.PumpMatchingModels); this.threeLinkMatchingCtrl1.SetBindingData(inputViewModel.ThreeLinkMatchingModels); this.fourLinkMatchingCtrl1.SetBindingData(inputViewModel.FourLinkMatchingModels); this.valveMatchingCtrl1.SetBindingData(inputViewModel.ValveMatchingModels); + await SetMatching(inputViewModel); } /// <summary> - /// 鍒濆鍖� + /// 鑷姩鍖归厤 /// </summary> public async Task<AssetsAutoMatchingViewModel> SetMatching(AssetsAutoMatchingViewModel input) { @@ -70,5 +81,18 @@ assetsAutoMatching.ValveMatchingModels = valveMatching; return assetsAutoMatching; } + + //纭畾 + private void btnComplete_Click(object sender, EventArgs e) + { + if (RelaodEvent.Invoke(_assetsAutoMatching)) + { + TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); + } + else + { + TipFormHelper.ShowError("淇敼澶辫触!"); + } + } } } \ No newline at end of file -- Gitblit v1.9.3