public void DockControl(int panelIndex, int index, DockingType direction) { if (direction == DockingType.Floating) { throw new ArgumentException("Can't dock to a docking type of floating"); } else { bool autoHide = this.AutoHide; bool cancelled = this.Cancelled; if (this.AutoHide) { this.AutoHide = false; } this.Cancelled = false; DockControlContainerCollection panels = DockControlContainerCollectionHelpers.GetCollection(_manager, direction); DockControlContainer container = panels[panelIndex] as DockControlContainer; container.DockControl(this, container.DockedControlList.Count, index); RemoveFloatingForm(); this.AutoHide = autoHide; this.Cancelled = cancelled; } }
public DockingControlData(IDockingControl control) { DockingControl dockingControl = control as DockingControl; if (dockingControl == null) { throw new ArgumentException("Argument is not a DockingControl"); } else { _type = dockingControl.DockingType; _title = dockingControl.Title; _autoHide = dockingControl.AutoHide; if (_type == DockingType.Floating) { _floatingBounds = new PersistableRectangle(dockingControl.FloatingBounds); } else { _dockingIndex = control.DockIndex; _panelIndex = control.PanelIndex; _dockedDimension = control.DockedDimension; } _cancelled = dockingControl.Cancelled; } if (dockingControl.AutoHide) { AutoResizeControl autoResizeControl = dockingControl.Parent as AutoResizeControl; _dockedDimension = autoResizeControl.TargetSize; } }
public static Direction ToDirection(DockingType type) { switch (type) { case DockingType.Floating: return(Direction.None); case DockingType.Left: return(Direction.Left); case DockingType.Right: return(Direction.Right); case DockingType.Top: return(Direction.Up); case DockingType.Bottom: return(Direction.Down); default: return(Direction.None); } }
public IDockingPanelCollection this[DockingType type] { get { switch (type) { case DockingType.Left: return(_manager._leftDockControlContainers); case DockingType.Right: return(_manager._rightDockControlContainers); case DockingType.Top: return(_manager._topDockControlContainers); case DockingType.Bottom: return(_manager._bottomDockControlContainers); default: throw new ArgumentException("Invalid docking type"); } } }
/// <summary> /// Construct a docking menu strip /// </summary> /// <param name="name">name</param> /// <param name="dock">Docking mode</param> /// <param name="dockpercent">Docking percent</param> /// <param name="direction">Direction (Right or Down) </param> /// <param name="items">List of menu items</param> public GLMenuStrip(string name, DockingType dock, float dockpercent, GLFlowLayoutPanel.ControlFlowDirection direction = ControlFlowDirection.Right, params GLMenuItem[] items) : this(name, DefaultWindowRectangle, direction, items) { Dock = dock; DockPercent = dockpercent; }
/// <summary> Constructor with name, size, docking type, docking percent, and optional backcolour</summary> public GLPanel(string name, Size sizep, DockingType type, float dockpercentage, Color?backcolour = null) : this(name, DefaultWindowRectangle, backcolour) { Dock = type; DockPercent = dockpercentage; SetNI(size: sizep); }
/// <summary> Constructor with name, docking type, docking percent, and optional backcolour</summary> public GLPanel(string name, DockingType type, float dockpercent, Color?backcolour = null) : this(name, DefaultWindowRectangle, backcolour) { Dock = type; DockPercent = dockpercent; }
static public DockControlContainerCollection GetCollection(DockingManagerControl manager, DockingType type) { return(manager.Panels[type] as DockControlContainerCollection); }
/// <summary> Constructor with name, title, size, docking type, docking percent </summary> public GLGroupBox(string name, string title, Size sizep, DockingType type, float dockpercentage) : this(name, title, new Rectangle(new Point(0, 0), sizep)) { Dock = type; DockPercent = dockpercentage; }
/// <summary> Constructor with name, title, docking type, docking percent </summary> public GLGroupBox(string name, string title, DockingType type, float dockpercent) : this(name, title, DefaultWindowRectangle) { Dock = type; DockPercent = dockpercent; }
/// <summary> Construct with name, size, docking type and docking percentage </summary> public GLFlowLayoutPanel(string name, Size sizep, DockingType type, float dockpercentage) : base(name, DefaultWindowRectangle) { Dock = type; DockPercent = dockpercentage; SetNI(size: sizep); }
/// <summary> Construct with name, docking type and docking percent </summary> public GLFlowLayoutPanel(string name, DockingType type, float dockpercent) : base(name, DefaultWindowRectangle) { Dock = type; DockPercent = dockpercent; }