From 46db25ec513ceb5dbfa78c1ea447003b41f1c900 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 27 十二月 2024 10:16:23 +0800 Subject: [PATCH] 资产--单独匹配修改 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingCtrl.cs | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingCtrl.cs index 902a7c8..dc36d4d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingCtrl.cs @@ -18,7 +18,7 @@ InitializeComponent(); this.layoutControl1.SetupLayoutControl(); this.gridView1.SetLimitView(); - this.gridView1.RegistCustomDrawCell(); + this.gridView1.RegistCustomDrawCell(Color.BurlyWood, Color.White); this.generalSearchCtrl1.SearchEvent += Search; this.generalSearchCtrl1.ClearEvent += Clear; } @@ -41,19 +41,17 @@ _selected = item; } Search(); + await Task.Delay(300); if (_selected != null) { if (_allBindingList != null && _allBindingList.Count > 0) { - await Task.Run(() => - { - var dataSourceIndex = _allBindingList.FindIndex(x => x.Vmo == _selected); - if (dataSourceIndex >= 0) - { - var rowIndex = this.gridView1.GetRowHandle(dataSourceIndex); - this.gridView1.FocusedRowHandle = rowIndex; - } - }); + var dataSourceIndex = _allBindingList.FindIndex(x => x.Vmo == _selected); + if (dataSourceIndex >= 0) + { + var rowIndex = this.gridView1.GetRowHandle(dataSourceIndex); + this.gridView1.FocusedRowHandle = rowIndex; + } } } } @@ -88,6 +86,5 @@ } return vm.Vmo; } - } -} +} \ No newline at end of file -- Gitblit v1.9.3