//Заполняем правую панель flowlayout пользовательскими контролами QuestPanel private void FillflpIconQuestion() { QuestPanel qp; for (int i = 0; i <= _qs.count - 1; i++) { if (i == 0) { qp = new QuestPanel(_qs.GetCur(), i + 1, _qs); } else { qp = new QuestPanel(_qs.GetNext(), i + 1, _qs); } qp.button1.Click += new EventHandler(draw_cur_quest); flpIconQuestion.Controls.Add(qp); } _qs.SetCurByIndex(0); }
private void button1_Click(object sender, EventArgs e) { _qs.SetCurByIndex(_index - 1); }