duheng
2024-09-20 b2e753b7d889e1a1fbc17f8b43c3dd02aa0faad4
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs
@@ -8,22 +8,30 @@
            InitializeComponent();
        }
        private AssetsAutoMatchingInputViewModel _assetsAutoMatching = null;
        public event Func<AssetsAutoMatchingInputViewModel, bool> RelaodEvent = null;
        public void SetBindingData()
        {
        }
        private AssetsAutoMatchingInputViewModel _assetsAutoMatching = null;
        //完成
        private void btnComplete_Click(object sender, EventArgs e)
        {
            if (RelaodEvent.Invoke(_assetsAutoMatching))
            {
                TipFormHelper.ShowSucceed("修改成功!");
            }
            else
            {
                TipFormHelper.ShowError("修改失败!");
            }
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        //自动匹配
        private void BtnAutoMatching_Click(object sender, EventArgs e)
        private async void BtnAutoMatching_Click(object sender, EventArgs e)
        {
            WaitFormHelper.ShowWaitForm(this);
            this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching);
            _assetsAutoMatching = await this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching);
            WaitFormHelper.HideWaitForm(this);
        }
    }