public void EditQuestion_Click(object sender, EventArgs e) { if (listBoxQuestion.SelectedIndex != -1) { WQuestion win = new WQuestion(factors[listBoxQuestion.SelectedIndex]); win.StartPosition = FormStartPosition.CenterScreen; win.FormClosed += this.ReDraw; win.ShowDialog();//show } }
public void addQuestion_Click(object sender, EventArgs e) { Question answer = new Question(); answer.Text = "Фактор" + (factors.Count + 1); factors.Add(answer); WQuestion win = new WQuestion(answer); win.StartPosition = FormStartPosition.CenterScreen; win.FormClosed += this.ReDraw; win.ShowDialog(); }