Beispiel #1
0
 private void ModifyFigureButton_Click(object sender, EventArgs e)
 {
     if (iFigureBindingSource.Current == null)
     {
         MessageBox.Show(@"Вы не выбрали строку, которую хотите изменить.", @"Ошибка!");
     }
     else
     {
         var index = FigureDataGridView.SelectedCells[0].RowIndex;
         var form  = new AddForm
         {
             Figure = _figures[index]
         };
         if (form.ShowDialog() == DialogResult.OK)
         {
             iFigureBindingSource.RemoveAt(index);
             iFigureBindingSource.Insert(index, form.Figure);
         }
     }
 }