/// <summary> /// Add control to the engine /// </summary> /// <param name="control">Control to add</param> public void AddControl(Control control) { if (control == null) { throw new NullReferenceException("Cannot add a null control"); } if (this.Controls.Contains(control) == false) { this.Controls.Add(control); } }
/// <summary> /// Remove a control from the engine /// </summary> /// <param name="control">Control to remove</param> public void RemoveControl(Control control) { if (control == null) { throw new NullReferenceException("Cannot delete a null control"); } if (this.Controls.Contains(control) == true) { this.Controls.Remove(control); } }
/// <summary> /// Add a control to the container /// </summary> /// <param name="control">Control to add</param> public void AddControl(Control control) { if (control == null) { throw new NullReferenceException("Cannot add a null control"); } control.ParentControl = this; control.EnginePointer = this.EnginePointer; if (this.Controls.Contains(control) == false) { this.Controls.Add(control); } }