public void GetButton(Guid id) { foreach (ButtonObject btnObj in buttonObjects) { if (btnObj.btnID == id) { btnObject = btnObj; this.button = btnObj.getButton(); } } }
public void AddButtonObject(ButtonObject buttonObject) { Button btn = buttonObject.InitiateButton(); this.buttonObjects.Add(buttonObject); this.Controls.Add(btn); this.button = btn; this.button.Click += Button_Click; }
public void RemoveButtonObject(ButtonObject buttonObject) { this.Controls.Remove(buttonObject.getButton()); }