From 6f8c6a3b2277b92a24319f672811da113861cfc1 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期一, 23 九月 2024 10:42:30 +0800 Subject: [PATCH] 提交缺少修改 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/02-AsstesFormCtrl/ThreeLinkMatchingCtrl.cs | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/02-AsstesFormCtrl/ThreeLinkMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/02-AsstesFormCtrl/ThreeLinkMatchingCtrl.cs index 0599280..2e2a2ef 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/02-AsstesFormCtrl/ThreeLinkMatchingCtrl.cs +++ b/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 = AssetsMatchingHelper.MatchingThreeLink(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; } -- Gitblit v1.9.3