Ejemplo n.º 1
0
        public void RefreshConnection(ConnectionTag tag)
        {
            if (tag.Button == null)
            {
                return;
            }

            SetButtonText(tag.Button as TabBarButton, GEnv.Connections.IndexOf(tag), tag);
            ((TabBarButton)tag.Button).Image = GetTabIcon(tag);

            _tabToolTip.SetToolTip(tag.Button, tag.FormatFrameText());
        }
Ejemplo n.º 2
0
        private Control CreateNewButton(ConnectionTag ct)
        {
            TabBarButton b = new TabBarButton();

            ct.Button = b;
            SetButtonText(b, Controls.Count - 1, ct);
            _tabToolTip.SetToolTip(b, ct.FormatFrameText());
            //b.Image = _imageList.Images[(int)e.item.Type];

            b.Tag        = ct;
            b.Font       = _basicFont;
            b.Width      = GetNecessaryButtonWidth(b);
            b.Visible    = true;
            b.TabStop    = false;
            b.Click     += new EventHandler(this.OnButtonClick);
            b.MouseDown += new MouseEventHandler(OnMouseDown);
            b.MouseUp   += new MouseEventHandler(OnMouseUp);
            b.MouseMove += new MouseEventHandler(OnMouseMove);
            return(b);
        }