/// <summary>
 /// Removes a panel from the content tab control
 /// </summary>
 /// <param name="ControlToRemove">The panel to remove from the main tab control</param>
 public void RemoveContentPanel(MyPanel ControlToRemove)
 {
     if (!ControlToRemove.Removed)
     {
         ControlToRemove.Removed = true;
         ControlToRemove.OnPanelClosed(AssociatedForm);
     }
     ContentTabControl.RemovePanelFromControl(ControlToRemove);
 }
 /// <summary>
 /// Adds a panel to the content tab control
 /// </summary>
 /// <param name="ControlToAdd">The panel to add within the main tab control</param>
 public void AddContentPanel(MyPanel ControlToAdd)
 {
     ContentTabControl.AddPanelToTabControl(ControlToAdd);
     if (ControlToAdd.Removed)
     {
         ControlToAdd.OnPanelOpened(AssociatedForm);
         ControlToAdd.Removed = false;
     }
 }
 /// <summary>
 /// Sets up the initial set of controls on the form when it is initialised.
 /// </summary>
 public virtual void SetupControls()
 {
     ContentTabControl = new ContentTabControl(associatedForm);
     FinishedAdding();
 }