예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddorChange f2 = new AddorChange();

            f2.Phrase = Phrase;
            dataGridView.ClearSelection();
            f2.ShowDialog();
            RefreshGrid();
            dataGridView.ClearSelection();
        }
예제 #2
0
 private void btnChange_Click(object sender, EventArgs e)
 {
     try
     {
         AddorChange f2 = new AddorChange(Phrase[dataGridView.SelectedCells[0].RowIndex], dataGridView.SelectedCells[0].RowIndex);
         f2.Phrase = Phrase;
         f2.q      = dataGridView.SelectedCells[0].RowIndex;
         f2.ShowDialog();
         RefreshGrid();
         dataGridView.ClearSelection();
     }
     catch
     {
         MessageBox.Show("Пожалуйста, выберите строку перед изменением!");
     }
 }