public void RemoveControl(Control control) { MainForm.Instance.InfoContainer.Controls.Remove(control); infoControls.Remove(control); }
public void AddControl(Control control) { control.UpdateData(); infoControls.Add(control); MainForm.Instance.InfoContainer.Controls.Add(control); }
public void InsertControl(Control control, Control before, bool belongsToSelectedObject = false) { int index = MainForm.Instance.InfoContainer.Controls.IndexOf(before); MainForm.Instance.InfoContainer.Controls.Add(control); if (index >= 0) MainForm.Instance.InfoContainer.Controls.SetChildIndex(control, index); infoControls.Add(control); if (belongsToSelectedObject) selectedObjectControls.Add(control); }