Example #1
0
        public IconSides(DockingRoot root, ButtonPosition pos)
        {
            InitializeComponent();
            _bPos = pos;
            switch (_bPos)
            {
            case ButtonPosition.B_Bottom:
                this.BackgroundImage = global::DockingActions.Properties.Resources.bottom;
                break;

            case ButtonPosition.B_Left:
                this.BackgroundImage = global::DockingActions.Properties.Resources.left;
                break;

            case ButtonPosition.B_Right:
                this.BackgroundImage = global::DockingActions.Properties.Resources.right;
                break;

            case ButtonPosition.B_Top:
                this.BackgroundImage = global::DockingActions.Properties.Resources.top;
                break;
            }
            _root = root;
            EventHandler mouseHover = new EventHandler(OnMouseHoverOnRootButton);
            EventHandler mouseLeave = new EventHandler(OnMouseOutFromButton);

            B_PosBtn.MouseHover += mouseHover;
            B_PosBtn.MouseLeave += mouseLeave;
        }
Example #2
0
        public IconCenter(DockingRoot root)
        {
            InitializeComponent();
            _buttonList = new Control[] { B_Center, B_TopHalf, B_TopRemain, B_BottomHalf, B_BottomRemain, B_LeftHalf, B_LeftRemain, B_RightHalf, B_RightRemain };

            _root = root;
        }
        public DockingContainer(DockingRoot root, DockingContainer parent, String name, Control contents, int id, DockStyle initDock) : base()
        {
            if (root != null)
            {
                _root = root;
            }
            else
            {
                _root = this as DockingRoot;
            }
            _initDock      = initDock;
            _parent        = parent;
            Content        = contents;
            this.Name      = name;
            _draggingPopup = new DraggingPopup(_root, null); //평소에는 숨어있다가 Drag할 때에만 나타난다.
            _titleBar      = new TitleBar(this, _draggingPopup, _root);
            InitializeComponent();


            this.Width    = Content.Width;
            this.Height   = Content.Height;
            this.Location = new Point(0, 0);
            this._tabContainer.SetBounds(0, 0, this.Width, this.Height);
            this._tabContainer.Alignment             = TabAlignment.Bottom;
            this._tabContainer.SelectedIndexChanged += new EventHandler(_tabContainer_SelectedIndexChanged);
            this._sContainer.SetBounds(0, 0, this.Width, this.Height);
            _id = id;
            this.DoubleBuffered = true;

            // _draggingPopup.MdiParent = _root.getMdiForm();


            //if(Content!=null) Content.Resize += new EventHandler(_contents_Resize);


            this.SuspendLayout();

            titleBarInitSetting();

            Content.Location = new Point(0, _titleBar.Height);
            contents.Dock    = DockStyle.Fill;
            this.Controls.Add(contents);

            this.ResumeLayout();

            showTitleBar(true, name);

            this.Dock = DockStyle.Fill;
            if (_root != this)
            {
                _root.Connect(this.Name, this);
            }


            _tabContainer.TabIndexChanged += new EventHandler(_tabContainer_TabIndexChanged);
        }
Example #4
0
 internal DraggingPopup(DockingRoot root, DockingContainer parent, int no = -1, String name = "DockingForm")
     : base((no < 0) ? ++(DraggingPopup.windowId) : no, name)
 {
     InitializeComponent();
     _root = root;
     if (_parent != null)
     {
         _parent = parent;
     }
     _draggingEvent = new MouseEventHandler(DraggingPopup_MouseMove);
 }
Example #5
0
        internal TitleBar(DockingContainer parent, DraggingPopup popup, DockingRoot root)
            : base()
        {
            InitializeComponent();
            _parent    = parent;
            _popup     = popup;
            _root      = root;
            _mouseDown = new MouseEventHandler(TitleBar_MouseDown);
            _mouseUp   = new MouseEventHandler(TitleBar_MouseUp);
            _mouseMove = new MouseEventHandler(TitleBar_MouseMove);

            this.Text          = parent.Name;
            B_X.Click         += new EventHandler(B_X_Click);
            B_Pin.Click       += new EventHandler(B_Pin_Click);
            B_DownArrow.Click += new EventHandler(B_DownArrow_Click);
            this.MouseDown    += _mouseDown;
            //this.MouseMove += _mouseMove;
        }