private void btnEditSelected_Click(object sender, EventArgs e) { if (lstvLocations.SelectedItems.Count != 1) { CommonFormStuff.ShowErrorMessage("One location must be selected!"); } else { _presenter.EditLocationRequest(lstvLocations.SelectedIndices[0]); } }
private int TryGetGridSelectedIndex(DataGridView inDataGrid) { int index; try { index = inDataGrid.CurrentCell.RowIndex; } catch (Exception) { CommonFormStuff.ShowErrorMessage("One row must be selected!"); return(-1); } return(index); }
public void ShowErrorMessage(string text) { CommonFormStuff.ShowErrorMessage(text); }
public bool WarnUser(string text) { return(CommonFormStuff.WarnUser(text)); }