Пример #1
0
        internal Control FindDockHost(Floaty floaty_0, Point point_0)
        {
            Control orgDockHost = null;

            if (this.FormIsHit(floaty_0.DockState.OrgDockHost, point_0))
            {
                orgDockHost = floaty_0.DockState.OrgDockHost;
            }
            if (!floaty_0.DockOnHostOnly)
            {
                using (List <IFloaty> .Enumerator enumerator = this.Floaties.GetEnumerator())
                {
                    Floaty current;
                    while (enumerator.MoveNext())
                    {
                        current = (Floaty)enumerator.Current;
                        if (current.DockState.Container.Visible && this.FormIsHit(current.DockState.Container, point_0))
                        {
                            goto Label_0087;
                        }
                    }
                    return(orgDockHost);

Label_0087:
                    orgDockHost = current.DockState.Container;
                }
            }
            return(orgDockHost);
        }
Пример #2
0
 private void method_5()
 {
     for (int i = 0; i < this.contextMenuStrip_0.Items.Count; i++)
     {
         Floaty tag = this.contextMenuStrip_0.Items[i].Tag as Floaty;
         if (tag != null)
         {
             bool visible;
             if (tag.IsFloating)
             {
                 visible = tag.Visible;
             }
             else
             {
                 visible = tag.DockState.Handle.Visible;
             }
             (this.contextMenuStrip_0.Items[i] as ToolStripMenuItem).Checked = visible;
         }
     }
 }
Пример #3
0
 private void contextMenuStrip_0_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Tag is Floaty)
     {
         Floaty tag  = e.ClickedItem.Tag as Floaty;
         bool   flag = false;
         if (tag.IsFloating)
         {
             if (flag = tag.Visible)
             {
                 if (!this.method_0())
                 {
                     return;
                 }
                 (e.ClickedItem.Tag as Floaty).Hide();
             }
             else
             {
                 (e.ClickedItem.Tag as Floaty).Show();
             }
         }
         else
         {
             if ((flag = tag.DockState.Handle.Visible) && !this.method_0())
             {
                 return;
             }
             tag.DockState.Handle.Visible = !flag;
         }
         (e.ClickedItem as ToolStripMenuItem).Checked = !flag;
     }
     else if (e.ClickedItem.Text == "自定义")
     {
         new CustomizationForm {
             StandardBarManager = this
         }.ShowDialog();
     }
 }
Пример #4
0
        public IFloaty Attach(ScrollableControl scrollableControl_0, Control control_1, Splitter splitter_0)
        {
            if (scrollableControl_0 == null)
            {
                throw new ArgumentException("container cannot be null");
            }
            if (control_1 == null)
            {
                throw new ArgumentException("handle cannot be null");
            }
            DockState state = new DockState
            {
                Container   = scrollableControl_0,
                Handle      = control_1,
                OrgDockHost = this.control_0,
                Splitter    = splitter_0
            };
            Floaty item = new Floaty(this);

            item.Attach(state);
            this.floaties_0.Add(item);
            return(item);
        }