private bool SelectDownloadRowInternal(DownloadRow row, bool callAfterSort = false) { if (row != null) { var visibleIndex = row.GetVisibleIndex(); if ((0 <= visibleIndex) && (visibleIndex < DGV.RowCount)) { var dtrow = DGV.Rows[visibleIndex]; if (dtrow.Selected) { SelectionChanged?.Invoke(row); } else { dtrow.Selected = true; } if (!callAfterSort) { _UserMade_DGV_SelectionChanged = false; } return(true); } } return(false); }
private void Model_RowPropertiesChanged(DownloadRow row, string propertyName) { var visibleIndex = row.GetVisibleIndex(); if ((0 <= visibleIndex) && (visibleIndex < DGV.RowCount)) { DGV.InvalidateRow(visibleIndex); if (propertyName == nameof(DownloadRow.Status)) { RestoreSortIfNeed(); } } }