//根据pid寻找试题内容 public override void ReLoad(int PID) { ProID = PID; List<Completion> list_completion=InfoControl.OesData.FindCompletionByPID(PID); flag = 1;//将标志位变为1 进入 查询/更改 状态 this.contentOfFillblank.Text = list_completion[0].problem; foreach (String ans in list_completion[0].ans) { Answer_Of_FiilBlank fillblanks = new Answer_Of_FiilBlank(); this.flowLayoutPanel1.Controls.Add(fillblanks); panel.Add(fillblanks); fillblanks.getAnser = ans; } this.Visible = true; }
//添加试题的按钮 private void AddButton_Click(object sender, EventArgs e) { Answer_Of_FiilBlank fillblanks = new Answer_Of_FiilBlank(); this.flowLayoutPanel1.Controls.Add(fillblanks);//在flowlayoutpanle中添加一个小控件 panel.Add(fillblanks); }