private void buttonEditAnswerII_Click(object sender, EventArgs e) { int index = listBoxAnswersII.SelectedIndex; var n = decLabelII.GetAnswer(index); if (n != null) { FormEditAnswer form = new FormEditAnswer(decLabelII.GetAnswer(index)); form.ShowDialog(); listBoxAnswersII.DataSource = decLabelII.GetListAnswers(); } else { MessageBox.Show("Добавьте аргумент"); } }
private void buttonEditAnswer_Click(object sender, EventArgs e) { int index = listBoxAnswersI.SelectedIndex; FormEditAnswer form = new FormEditAnswer(dec.GetAnswer(index)); form.ShowDialog(); listBoxAnswersI.DataSource = dec.GetListAnswers(); }