void AddTrialControl(Trial trial, int index) { BehavioralTestTemplateTrialControl trial1 = new BehavioralTestTemplateTrialControl(_Session, index, _ErrorProvider); trial1.Size = new System.Drawing.Size(274, 55); trial1.TabIndex = 61; trial1.Tag = trial; flowLayoutPanel1.Controls.Add(trial1); }
public void Save() { _Session.Name = txtName.Text; for (int ix = flowLayoutPanel1.Controls.Count - 1; ix >= 0; ix--) { Control c = flowLayoutPanel1.Controls[ix]; if (c is BehavioralTestTemplateTrialControl) { BehavioralTestTemplateTrialControl bc = (BehavioralTestTemplateTrialControl)c; bc.Save(); } } }