duheng
2025-01-13 1b7957fac12e80698971513b30e65772c4c5c038
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingCtrl.cs
@@ -1,13 +1,4 @@
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data;
namespace HStation.WinFrmUI
{
@@ -41,19 +32,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 +77,5 @@
            }
            return vm.Vmo;
        }
    }
}
}