duheng
2024-09-20 8981c9f11f01973ddbf9718ff5935ebfe6dc6b40
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/02-AsstesFormCtrl/PumpMatchingCtrl.cs
@@ -12,6 +12,11 @@
        private List<PumpMatchingViewModel> _allBindingList = null;
        /// <summary>
        /// 点击事件
        /// </summary>
        public event Action<string> RowClickEvent;
        public void SetBindingData(List<PumpMatchingViewModel> pumpMatchingViewModel)
        {
            _allBindingList = pumpMatchingViewModel;
@@ -30,5 +35,16 @@
            this.pumpMatchingViewModelBindingSource.ResetBindings(false);
            return _allBindingList;
        }
        //行点击事件
        private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
        {
            var row = this.gridView1.GetCurrentViewModel(_allBindingList);
            if (row == null)
            {
                return;
            }
            this.RowClickEvent?.Invoke(row.Code);
        }
    }
}