void IndexAssign(SelectionItemTypes sit, DataGridView dgv) { if (dgv.SelectedRows.Count > 0) { _indices.Add(sit, dgv.SelectedRows[0].Index); } }
private int?GetSelectedIndexOfType(SelectionItemTypes type) { if (_indices.ContainsKey(type)) { return(_indices[type]); } return(null); }