From 8a8983dd2053b631c559b257b1501d740bedf4a5 Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期五, 20 九月 2024 16:09:12 +0800
Subject: [PATCH] 优化匹配界面

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 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 3c7e180..90a857d 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
@@ -7,13 +7,37 @@
             InitializeComponent();
         }
 
-        public void SetBindingData()
+        public event Func<AssetsAutoMatchingInputViewModel, bool> RelaodEvent = null;
+
+        private AssetsAutoMatchingInputViewModel _assetsAutoMatching = null;
+
+        public void SetBindingData(AssetsAutoMatchingInputViewModel assetsAutoMatchingInputViewModel)
         {
+            _assetsAutoMatching = assetsAutoMatchingInputViewModel;
+            this.AssetsMainChoicePage.SetBindingData(_assetsAutoMatching);
         }
 
         //瀹屾垚
         private void btnComplete_Click(object sender, EventArgs e)
         {
+            if (RelaodEvent.Invoke(_assetsAutoMatching))
+            {
+                TipFormHelper.ShowSucceed("淇敼鎴愬姛!");
+            }
+            else
+            {
+                TipFormHelper.ShowError("淇敼澶辫触!");
+            }
+            this.DialogResult = DialogResult.OK;
+            this.Close();
+        }
+
+        //鑷姩鍖归厤
+        private async void BtnAutoMatching_Click(object sender, EventArgs e)
+        {
+            WaitFormHelper.ShowWaitForm(this);
+            _assetsAutoMatching = await this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching);
+            WaitFormHelper.HideWaitForm(this);
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3