protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs mevent)
        {
            base.OnMouseUp(mevent);
            //
            if (this.OperationForm == null)
            {
                return;
            }
            //
            DockBarFloatForm form = this.TryGetDependParentForm() as DockBarFloatForm;

            if (form == null)
            {
                return;
            }
            switch (this.eDockBarFloatFormButtonStyle)
            {
            case DockBarFloatFormButtonStyle.eCloseButton:
                form.Close();
                break;

            case DockBarFloatFormButtonStyle.eContextButton:
                AddOrRemoveDropDownList addOrRemoveDropDownList = new AddOrRemoveDropDownList(form.pDockBar);
                addOrRemoveDropDownList.Show(form, new Point(this.DisplayRectangle.Left, this.DisplayRectangle.Bottom));
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        public bool ToDockBarFloatForm(Point location)
        {
            DockBarFloatForm DockBarFloatForm1 = this.DockBarManager.GetEmptyDockBarFloatForm();

            DockBarFloatForm1.Show(this, location);
            return(true);
        }
Beispiel #3
0
        public bool ToDockBarFloatForm()
        {
            DockBarFloatForm DockBarFloatForm1 = this.DockBarManager.GetEmptyDockBarFloatForm();

            DockBarFloatForm1.Show(this);
            return(true);
        }
 internal bool ToDockBarFloatForm(DockBarFloatForm dockBarFloatForm)
 {
     if (this.CanOverflow)
     {
         this.m_AddOrRemoveDropDownItem.Visible = false;
     }
     dockBarFloatForm.Show(this);
     return(true);
 }
        public bool ToDockBarFloatForm(Point location)
        {
            DockBarFloatForm DockBarFloatForm1 = this.DockBarManager.GetEmptyDockBarFloatForm();

            if (this.CanOverflow)
            {
                this.m_AddOrRemoveDropDownItem.Visible = false;
            }
            DockBarFloatForm1.Show(this, location);
            return(true);
        }
        //private void SetMenuItemList(ToolStripMenuItem toolStripMenuItem, ToolStripDropDownItem toolStripDropDownItem)
        //{
        //    if (toolStripDropDownItem == null) return;
        //    //
        //    foreach (ToolStripItem one in toolStripDropDownItem.DropDownItems)
        //    {
        //        System.Windows.Forms.ToolStripMenuItem item = new ToolStripMenuItem(one.Text, null, new EventHandler(DockBarItem_Click));
        //        item.Checked = one.Visible;
        //        item.Tag = one;
        //        toolStripMenuItem.DropDownItems.Add(item);
        //        //
        //        this.SetMenuItemList(item, one as ToolStripDropDownItem);
        //    }
        //}
        private void DockBarItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem one = sender as ToolStripMenuItem;

            if (one == null)
            {
                return;
            }
            ToolStripItem item = one.Tag as ToolStripItem;

            if (item == null)
            {
                return;
            }
            one.Checked  = !one.Checked;
            item.Visible = one.Checked;
            //
            //
            //
            IDockArea pDockArea = this.m_pDockBar.Parent as IDockArea;

            if (pDockArea == null)
            {
                return;
            }
            if (pDockArea.eDockAreaStyle != DockAreaStyle.eDockBarFloatForm)
            {
                return;
            }
            DockBarFloatForm dockBarFloatForm = this.m_pDockBar.Parent as DockBarFloatForm;

            if (dockBarFloatForm == null)
            {
                return;
            }
            if (item.Visible)
            {
                dockBarFloatForm.Width += item.Margin.Left + item.Width + item.Margin.Right;
            }
            else
            {
                dockBarFloatForm.Width -= item.Margin.Left + item.Width + item.Margin.Right;
            }
            dockBarFloatForm.ResetSize();
        }
        private void ResetDockBarItem_Click(object sender, EventArgs e)
        {
            this.m_pDockBar.Reset();
            //
            //
            //
            IDockArea pDockArea = this.m_pDockBar.Parent as IDockArea;

            if (pDockArea == null)
            {
                return;
            }
            if (pDockArea.eDockAreaStyle != DockAreaStyle.eDockBarFloatForm)
            {
                return;
            }
            DockBarFloatForm dockBarFloatForm = this.m_pDockBar.Parent as DockBarFloatForm;

            if (dockBarFloatForm == null)
            {
                return;
            }
            dockBarFloatForm.ResetSize();
        }
Beispiel #8
0
 internal bool ToDockBarFloatForm(DockBarFloatForm dockBarFloatForm)
 {
     dockBarFloatForm.Show(this);
     return(true);
 }