Example #1
0
        /// <summary>
        /// Checks if this panel contains give panel
        /// </summary>
        /// <param name="panel">panel to check</param>
        /// <returns>true if this panel contains given pane</returns>
        public bool ContainsPanel(AutoHidePanel panel)
        {
            for (int index = ButtonsCount - 1; index >= 0; index--)
            {
                UnitButton button = GetButtonAt(index);

                FormsTabbedView view = HierarchyUtility.GetTabbedView((Form)button.Page);
                if (view.Parent == panel)
                {
                    return(true);
                }
            }

            return(false);
        }
Example #2
0
        /// <summary>
        /// Move all the pages to given view
        /// </summary>
        /// <param name="view">view where to move the pages</param>
        /// <returns>moved pages</returns>
        public DockableFormInfo[] MovePagesTo(FormsTabbedView view)
        {
            List <DockableFormInfo> movedPages = new List <DockableFormInfo>();

            if (view == this)
            {
                return(movedPages.ToArray());
            }


            for (int index = _cachedInfos.Count - 1; index >= 0; index--)
            {
                DockableFormInfo info = _cachedInfos[index];
                Remove(info);
                view.Add(info);

                movedPages.Add(info);
            }

            return(movedPages.ToArray());
        }
Example #3
0
        /// <summary>
        /// Removes the panel if is contained here
        /// </summary>
        /// <param name="panel">panel to remove</param>
        /// <returns>true if is removed the panel</returns>
        public bool Remove(AutoHidePanel panel)
        {
            bool removed = false;

            for (int index = ButtonsCount - 1; index >= 0; index--)
            {
                UnitButton button = GetButtonAt(index);

                FormsTabbedView view = HierarchyUtility.GetTabbedView((Form)button.Page);
                if (view.Parent == panel)
                {
                    RemoveButton(button);
                    removed = true;
                }
            }

            panel.View.FormAdded    -= OnFormAddedToPanel;
            panel.View.FormRemoved  -= OnFormRemovedFromPanel;
            panel.View.FormSelected -= OnFormSelectedIntoView;

            return(removed);
        }
Example #4
0
 /// <summary>
 /// Set mode vertical split
 /// </summary>
 /// <param name="topPane">left pane</param>
 /// <param name="bottomPane">right pane</param>
 public void SetModeVSplit(DockingContainer topPane, DockingContainer bottomPane)
 {
     _linkedView = null;
     InternalControls.SetModeVSplit(topPane, bottomPane);
 }
Example #5
0
 /// <summary>
 /// Set mode horizontal split
 /// </summary>
 /// <param name="leftPane">left pane</param>
 /// <param name="rightPane">right pane</param>
 public void SetModeHSplit(DockingContainer leftPane, DockingContainer rightPane)
 {
     _linkedView = null;
     InternalControls.SetModeHSplit(leftPane, rightPane);
 }
Example #6
0
 /// <summary>
 /// Set mode single child control
 /// </summary>
 /// <param name="singleChild">single child</param>
 public void SetModeSingleChild(FormsTabbedView singleChild)
 {
     _linkedView = null;
     InternalControls.SetModeSingleChild(singleChild);
 }
Example #7
0
 /// <summary>
 /// Set mode linked
 /// </summary>
 /// <param name="link">link</param>
 public void SetModeLinked(FormsTabbedView link)
 {
     InternalControls.SetModeEmpty();
     _linkedView = link;
 }
Example #8
0
 /// <summary>
 /// Set mode empty
 /// </summary>
 public void SetModeEmpty()
 {
     _linkedView = null;
     InternalControls.SetModeEmpty();
 }