Exemplo n.º 1
0
			public AutoHostPanel(DockingManager manager, AutoHidePanel autoHidePanel, Edge borderEdge)
			{
				// Remember parameters
                _manager = manager;
                _autoHidePanel = autoHidePanel;
                _borderEdge = borderEdge;
				
				Direction direction;
				
				if ((borderEdge == Edge.Left) || (borderEdge == Edge.Right))
				    direction = Direction.Horizontal;
				else
				    direction = Direction.Vertical;
				
				// Create a resizing bar
				_resizeAutoBar = new ResizeAutoBar(direction, this);
				
				// Add to the display
				Controls.Add(_resizeAutoBar);
				
				// Define correct position based on Edge
				switch(_borderEdge)
				{
				    case Edge.Left:
				        _resizeAutoBar.Dock = DockStyle.Left;
				        break;
                    case Edge.Right:
                        _resizeAutoBar.Dock = DockStyle.Right;
                        break;
                    case Edge.Top:
                        _resizeAutoBar.Dock = DockStyle.Top;
                        break;
                    case Edge.Bottom:
                        _resizeAutoBar.Dock = DockStyle.Bottom;
                        break;
                }
			}
Exemplo n.º 2
0
        protected void AddAutoHidePanels()
        {
            // Create an instance for each container edge (they default to being hidden)
            _ahpTop = new AutoHidePanel(this, DockStyle.Top);
            _ahpLeft = new AutoHidePanel(this, DockStyle.Left);
            _ahpBottom = new AutoHidePanel(this, DockStyle.Bottom);
            _ahpRight = new AutoHidePanel(this, DockStyle.Right);

            _ahpTop.Name = "Top";
            _ahpLeft.Name = "Left";
            _ahpBottom.Name = "Bottom";
            _ahpRight.Name = "Right";

            // Add to the end of the container we manage
            _container.Controls.AddRange(new Control[]{_ahpBottom, _ahpTop, _ahpRight, _ahpLeft});
        }
Exemplo n.º 3
0
        internal void RemoveShowingAutoHideWindowsExcept(AutoHidePanel except)
        {
            if (except != _ahpLeft)
                _ahpLeft.RemoveShowingWindow();

            if (except != _ahpRight)
                _ahpRight.RemoveShowingWindow();

            if (except != _ahpTop)
                _ahpTop.RemoveShowingWindow();

            if (except != _ahpBottom)
                _ahpBottom.RemoveShowingWindow();
        }
Exemplo n.º 4
0
        protected void InternalConstruct(DockingManager manager, 
                                         Control control, 
                                         string title, 
                                         ImageList imageList, 
                                         int imageIndex)
        {
            // Must provide a valid manager instance
            if (manager == null)
                throw new ArgumentNullException("DockingManager");

            // Define the initial object state
            _control = control;
            _title = title;
            _imageList = imageList;
            _imageIndex = imageIndex;
            _manager = manager;
            _parentWindowContent = null;
            _order = _counter++;
            _visible = false;
            _displaySize = new Size(_defaultDisplaySize, _defaultDisplaySize);
            _autoHideSize = new Size(_defaultAutoHideSize, _defaultAutoHideSize);
            _floatingSize = new Size(_defaultFloatingSize, _defaultFloatingSize);
            _displayLocation = new Point(_defaultLocation, _defaultLocation);
			_defaultRestore = new RestoreContentState(State.DockLeft, this);
			_floatingRestore = new RestoreContentState(State.Floating, this);
            _autoHideRestore = new RestoreAutoHideState(State.DockLeft, this);
            _dockingRestore = _defaultRestore;
            _autoHidePanel = null;
			_docked = true;
            _captionBar = true;
            _closeButton = true;
            _hideButton = true;
            _autoHidden = false;
            _fullTitle = title;
        }