public void CreateSampleEntry (string description, Form form, ref int y) { Label label = new Label (); label.Text = description; label.Location = new Point (10, y + 5); label.AutoSize = true; Controls.Add (label); OurButton button = new OurButton (form); button.Text = "Run sample"; button.Location = new Point (180, y); button.Click += new System.EventHandler (this.label2_Click); Controls.Add (button); y += 30; }
public void CreateSampleEntry(string description, Form form, ref int y) { Label label = new Label(); label.Text = description; label.Location = new Point(10, y + 5); label.AutoSize = true; Controls.Add(label); OurButton button = new OurButton(form); button.Text = "Run sample"; button.Location = new Point(180, y); button.Click += new System.EventHandler(this.label2_Click); Controls.Add(button); y += 30; }
public void SetButtonInteraction(OurButton button, bool goodButton) { button.OnPress = goodButton ? NextEvent : FailureEvent; }