duheng
2024-09-19 a72a2fafc5cd95d9fae4957d855929fabf594415
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs
@@ -2,18 +2,37 @@
{
    public partial class AssetsAutoMatchingMainDlg : DevExpress.XtraEditors.XtraForm
    {
        public AssetsAutoMatchingMainDlg()
        public AssetsAutoMatchingMainDlg(AssetsAutoMatchingInputViewModel assetsAutoMatchingInputViewModel)
        {
            _assetsAutoMatching = assetsAutoMatchingInputViewModel;
            InitializeComponent();
        }
        public void SetBindingData()
        {
        }
        public event Func<AssetsAutoMatchingInputViewModel, bool> RelaodEvent = null;
        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)
        {
            WaitFormHelper.ShowWaitForm(this);
            _assetsAutoMatching = this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching);
            WaitFormHelper.HideWaitForm(this);
        }
    }
}