duheng
2024-12-27 46db25ec513ceb5dbfa78c1ea447003b41f1c900
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;
        }
    }
}
}