Пример #1
0
 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]);
     }
 }
Пример #2
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);
        }
Пример #3
0
 public void ShowErrorMessage(string text)
 {
     CommonFormStuff.ShowErrorMessage(text);
 }
Пример #4
0
 public bool WarnUser(string text)
 {
     return(CommonFormStuff.WarnUser(text));
 }