duheng
2024-09-22 9ffb31c233f3b4891550293294c2ee716f77b42a
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/02-AsstesFormCtrl/ThreeLinkMatchingCtrl.cs
@@ -12,7 +12,7 @@
            this.gridView1.OptionsView.ShowGroupPanel = false;
        }
        private List<ThreeLinkMatchingViewModel> _allBindingList = null;
        private List<ThreeLinkFormViewModel> _allBindingList = new List<ThreeLinkFormViewModel>();
        /// <summary>
        /// 点击事件
@@ -23,8 +23,11 @@
        {
            if (threeLinkMatchingViewModels != null)
            {
                _allBindingList = threeLinkMatchingViewModels;
                this.threeLinkMatchingViewModelBindingSource.DataSource = _allBindingList;
                foreach (var item in threeLinkMatchingViewModels)
                {
                    _allBindingList.Add(new ThreeLinkFormViewModel(item));
                }
                this.threeLinkFormViewModelBindingSource.DataSource = _allBindingList;
            }
        }
@@ -35,19 +38,22 @@
            var resultList = new List<ThreeLinkMatchingViewModel>();
            foreach (var item in inputs)
            {
                var result = AsstesAutoMatchingHelper.AutoMatching(item, alllist);
                var result = AsstesAutoMatchingHelper.ThreeLinkAutoMatching(item, alllist);
                if (result != null)
                {
                    resultList.Add(result);
                }
                else
                {
                    item.MatchingType = Xhs.eMatchingType.Error;
                    resultList.Add(result);
                    resultList.Add(item);
                }
            }
            _allBindingList = resultList;
            this.threeLinkMatchingViewModelBindingSource.ResetBindings(false);
            _allBindingList.Clear();
            foreach (var item in resultList)
            {
                _allBindingList.Add(new ThreeLinkFormViewModel(item));
            }
            this.threeLinkFormViewModelBindingSource.ResetBindings(false);
            return resultList;
        }