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/AssetsAutoMatchingMainDlg.cs | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs index ef02b32..f65d8f1 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs @@ -2,15 +2,28 @@ { public partial class AssetsAutoMatchingMainDlg : DevExpress.XtraEditors.XtraForm { - public AssetsAutoMatchingMainDlg(AssetsAutoMatchingInputViewModel assetsAutoMatchingInputViewModel) + public AssetsAutoMatchingMainDlg() { - _assetsAutoMatching = assetsAutoMatchingInputViewModel; InitializeComponent(); + this.AssetsMainChoicePage.FormRowClickEvent += AssetsMainChoicePage_FormRowClickEvent; } - public event Func<AssetsAutoMatchingInputViewModel, bool> RelaodEvent = null; + private void AssetsMainChoicePage_FormRowClickEvent(string code) + { + AssetsMatchingClickEvent.Invoke(code); + } - private AssetsAutoMatchingInputViewModel _assetsAutoMatching = null; + public event Func<AssetsAutoMatchingViewModel, bool> RelaodEvent = null; + + public event Action<string> AssetsMatchingClickEvent = null; + + private AssetsAutoMatchingViewModel _assetsAutoMatching = null; + + public void SetBindingData(AssetsAutoMatchingViewModel assetsAutoMatchingInputViewModel) + { + _assetsAutoMatching = assetsAutoMatchingInputViewModel; + this.AssetsMainChoicePage.SetBindingData(_assetsAutoMatching); + } //瀹屾垚 private void btnComplete_Click(object sender, EventArgs e) @@ -28,10 +41,10 @@ } //鑷姩鍖归厤 - private void BtnAutoMatching_Click(object sender, EventArgs e) + private async void BtnAutoMatching_Click(object sender, EventArgs e) { WaitFormHelper.ShowWaitForm(this); - _assetsAutoMatching = this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching); + _assetsAutoMatching = await this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching); WaitFormHelper.HideWaitForm(this); } } -- Gitblit v1.9.3