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); }
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; }