示例#1
0
        protected internal DockPaneStripFromBase(DockPane pane) : base(pane)
        {
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
                        #if FRAMEWORK_VER_2x
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
                        #else
            SetStyle(ControlStyles.DoubleBuffer, true);
                        #endif


            SuspendLayout();

            Font      = SystemInformation.MenuFont;
            BackColor = Color.WhiteSmoke;

            m_components = new Container();
            m_toolTip    = new ToolTip(Components);

            m_buttonClose       = new InertButton(ImageCloseEnabled, ImageCloseDisabled);
            m_buttonScrollLeft  = new InertButton(ImageScrollLeftEnabled, ImageScrollLeftDisabled);
            m_buttonScrollRight = new InertButton(ImageScrollRightEnabled, ImageScrollRightDisabled);

            m_buttonClose.ToolTipText = ToolTipClose;
            m_buttonClose.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonClose.Click      += new EventHandler(Close_Click);

            m_buttonScrollLeft.Enabled     = false;
            m_buttonScrollLeft.ToolTipText = ToolTipScrollLeft;
            m_buttonScrollLeft.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollLeft.Click      += new EventHandler(ScrollLeft_Click);

            m_buttonScrollRight.Enabled     = false;
            m_buttonScrollRight.ToolTipText = ToolTipScrollRight;
            m_buttonScrollRight.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollRight.Click      += new EventHandler(ScrollRight_Click);

            Controls.AddRange(new Control[] { m_buttonClose,
                                              m_buttonScrollLeft,
                                              m_buttonScrollRight });

            ResumeLayout();
        }
示例#2
0
 public void InitializeComponent()
 {
     this.buttonClose = new WeifenLuo.WinFormsUI.InertButton();
     this.label       = new System.Windows.Forms.Label();
     this.SuspendLayout();
     //
     // buttonClose
     //
     this.buttonClose.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.buttonClose.Location = new System.Drawing.Point(477, 5);
     this.buttonClose.Name     = "buttonClose";
     this.buttonClose.Size     = new System.Drawing.Size(16, 14);
     this.buttonClose.TabIndex = 2;
     this.buttonClose.Click   += new System.EventHandler(this.MessageBarClick);
     //
     // label
     //
     this.label.Anchor      = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
     this.label.ForeColor   = System.Drawing.SystemColors.InfoText;
     this.label.ImageAlign  = System.Drawing.ContentAlignment.MiddleLeft;
     this.label.Location    = new System.Drawing.Point(2, 0);
     this.label.Name        = "label";
     this.label.Size        = new System.Drawing.Size(494, 22);
     this.label.TabIndex    = 0;
     this.label.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     this.label.Click      += new System.EventHandler(this.MessageBarClick);
     this.label.MouseEnter += new System.EventHandler(this.LabelMouseEnter);
     this.label.MouseLeave += new System.EventHandler(this.LabelMouseLeave);
     //
     // MessageBar
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Dpi;
     this.BackColor           = System.Drawing.SystemColors.Info;
     this.ForeColor           = System.Drawing.SystemColors.InfoText;
     this.Controls.Add(this.buttonClose);
     this.Controls.Add(this.label);
     this.Name   = "MessageBar";
     this.Size   = new System.Drawing.Size(496, 24);
     this.Click += new System.EventHandler(this.MessageBarClick);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#3
0
        public VS2003DockPaneStrip(DockPane pane)
            : base(pane)
        {
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            SuspendLayout();

            Font = SystemInformation.MenuFont;
            BackColor = Color.WhiteSmoke;

            m_components = new Container();
            m_toolTip = new ToolTip(Components);

            m_buttonClose = new InertButton(ImageCloseEnabled, ImageCloseDisabled);
            m_buttonScrollLeft = new InertButton(ImageScrollLeftEnabled, ImageScrollLeftDisabled);
            m_buttonScrollRight = new InertButton(ImageScrollRightEnabled, ImageScrollRightDisabled);

            m_buttonClose.ToolTipText = ToolTipClose;
            m_buttonClose.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonClose.Click += new EventHandler(Close_Click);

            m_buttonScrollLeft.Enabled = false;
            m_buttonScrollLeft.RepeatClick = true;
            m_buttonScrollLeft.ToolTipText = ToolTipScrollLeft;
            m_buttonScrollLeft.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollLeft.Click += new EventHandler(ScrollLeft_Click);

            m_buttonScrollRight.Enabled = false;
            m_buttonScrollRight.RepeatClick = true;
            m_buttonScrollRight.ToolTipText = ToolTipScrollRight;
            m_buttonScrollRight.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollRight.Click += new EventHandler(ScrollRight_Click);

            Controls.AddRange(new Control[] {	m_buttonClose,
                                                m_buttonScrollLeft,
                                                m_buttonScrollRight	});

            ResumeLayout();
        }
示例#4
0
        /// <include file='CodeDoc/DockPaneCaptionVS2003.xml' path='//CodeDoc/Class[@name="DockPaneCaptionVS2003"]/Construct[@name="(DockPane)"]/*'/>
        protected internal VS2003DockPaneCaption(DockPane pane) : base(pane)
        {
            SuspendLayout();

            Font = SystemInformation.MenuFont;

            m_buttonClose    = new InertButton(ImageCloseEnabled, ImageCloseDisabled);
            m_buttonAutoHide = new InertButton();

            m_buttonClose.ToolTipText = ToolTipClose;
            m_buttonClose.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonClose.Click      += new EventHandler(this.Close_Click);

            m_buttonAutoHide.ToolTipText = ToolTipAutoHide;
            m_buttonAutoHide.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonAutoHide.Click      += new EventHandler(AutoHide_Click);

            Controls.AddRange(new Control[]     { m_buttonClose, m_buttonAutoHide });

            ResumeLayout();
        }
		/// <include file='CodeDoc/DockPaneCaptionVS2003.xml' path='//CodeDoc/Class[@name="DockPaneCaptionVS2003"]/Construct[@name="(DockPane)"]/*'/>
		protected internal VS2003DockPaneCaption(DockPane pane) : base(pane)
		{
			SuspendLayout();

			Font = SystemInformation.MenuFont;

			m_buttonClose = new InertButton(ImageCloseEnabled, ImageCloseDisabled);
			m_buttonAutoHide = new InertButton();

			m_buttonClose.ToolTipText = ToolTipClose;
			m_buttonClose.Anchor = AnchorStyles.Top | AnchorStyles.Right;
			m_buttonClose.Click += new EventHandler(this.Close_Click);

			m_buttonAutoHide.ToolTipText = ToolTipAutoHide;
			m_buttonAutoHide.Anchor = AnchorStyles.Top | AnchorStyles.Right;
			m_buttonAutoHide.Click += new EventHandler(AutoHide_Click);

			Controls.AddRange(new Control[]	{	m_buttonClose, m_buttonAutoHide });

			ResumeLayout();
		}
        public VS2003DockPaneStrip(DockPane pane) : base(pane)
        {
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            SuspendLayout();

            Font      = SystemInformation.MenuFont;
            BackColor = Color.WhiteSmoke;

            m_components = new Container();
            m_toolTip    = new ToolTip(Components);

            m_buttonClose       = new InertButton(ImageCloseEnabled, ImageCloseDisabled);
            m_buttonScrollLeft  = new InertButton(ImageScrollLeftEnabled, ImageScrollLeftDisabled);
            m_buttonScrollRight = new InertButton(ImageScrollRightEnabled, ImageScrollRightDisabled);

            m_buttonClose.ToolTipText = ToolTipClose;
            m_buttonClose.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonClose.Click      += new EventHandler(Close_Click);

            m_buttonScrollLeft.Enabled     = false;
            m_buttonScrollLeft.RepeatClick = true;
            m_buttonScrollLeft.ToolTipText = ToolTipScrollLeft;
            m_buttonScrollLeft.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollLeft.Click      += new EventHandler(ScrollLeft_Click);

            m_buttonScrollRight.Enabled     = false;
            m_buttonScrollRight.RepeatClick = true;
            m_buttonScrollRight.ToolTipText = ToolTipScrollRight;
            m_buttonScrollRight.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollRight.Click      += new EventHandler(ScrollRight_Click);

            Controls.AddRange(new Control[] { m_buttonClose,
                                              m_buttonScrollLeft,
                                              m_buttonScrollRight });

            ResumeLayout();
        }
示例#7
0
        protected override void CreateButtons()
        {
            // Define the ImageList and which ImageIndex to show initially
            _closeButton = new InertButton(_images, (int)ImageIndex.Close);
            _hideButton  = new InertButton(_images, (int)ImageIndex.AutoHide);

            _closeButton.Size = new Size(_buttonWidth, _buttonHeight);
            _hideButton.Size  = new Size(_buttonWidth, _buttonHeight);

            // Let the location of the control be updated for us
            _closeButton.Anchor = AnchorStyles.Right;
            _hideButton.Anchor  = AnchorStyles.Right;

            // Define the button position relative to the size set in the constructor
            _closeButton.Location = new Point(_fixedLength - _buttonWidth - _buttonSpacer,
                                              (_fixedLength - _yInset * 2 - _buttonHeight) / 2 + _yInset);

            _hideButton.Location = new Point(_fixedLength - (_buttonWidth - _buttonSpacer) * 2,
                                             (_fixedLength - _yInset * 2 - _buttonHeight) / 2 + _yInset);

            // Give the button a very thin button
            _closeButton.BorderWidth = 1;
            _hideButton.BorderWidth  = 1;

            // Define correct color setup
            _closeButton.BackColor       = this.BackColor;
            _closeButton.ImageAttributes = _inactiveAttr;
            _hideButton.BackColor        = this.BackColor;
            _hideButton.ImageAttributes  = _inactiveAttr;

            // Add to the display
            Controls.Add(_closeButton);
            Controls.Add(_hideButton);

            // Let base class perform common actions
            base.CreateButtons();
        }
示例#8
0
        protected override void CreateButtons()
        {
            // Define the ImageList and which ImageIndex to show initially
            _closeButton = new InertButton(_images, (int)ImageIndex.Close);
            _hideButton  = new InertButton(_images, (int)ImageIndex.AutoHide);

            _closeButton.Size = new Size(_buttonWidth, _buttonHeight);
            _hideButton.Size  = new Size(_buttonWidth, _buttonHeight);

            // Shows border all the time and not just when mouse is over control
            _closeButton.PopupStyle = false;
            _hideButton.PopupStyle  = false;

            // Define the fixed remapping
            _closeButton.ImageAttributes = _activeAttr;
            _hideButton.ImageAttributes  = _activeAttr;

            // Add to the display
            Controls.Add(_closeButton);
            Controls.Add(_hideButton);

            // Let base class perform common actions
            base.CreateButtons();
        }
示例#9
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DummyToolbox));
     this.inertButtonUp      = new WeifenLuo.WinFormsUI.InertButton();
     this.imageList          = new System.Windows.Forms.ImageList(this.components);
     this.inertButtonGeneral = new WeifenLuo.WinFormsUI.InertButton();
     this.inertButtonDown    = new WeifenLuo.WinFormsUI.InertButton();
     this.label2             = new System.Windows.Forms.Label();
     this.imageList1         = new System.Windows.Forms.ImageList(this.components);
     this.SuspendLayout();
     //
     // inertButtonUp
     //
     this.inertButtonUp.Anchor             = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.inertButtonUp.Enabled            = false;
     this.inertButtonUp.ImageDisabled      = ((System.Drawing.Image)(resources.GetObject("inertButtonUp.ImageDisabled")));
     this.inertButtonUp.ImageIndexDisabled = 0;
     this.inertButtonUp.ImageList          = this.imageList;
     this.inertButtonUp.IsPopup            = true;
     this.inertButtonUp.Location           = new System.Drawing.Point(199, 3);
     this.inertButtonUp.Name     = "inertButtonUp";
     this.inertButtonUp.Size     = new System.Drawing.Size(19, 19);
     this.inertButtonUp.TabIndex = 0;
     //
     // imageList
     //
     this.imageList.ImageSize        = new System.Drawing.Size(21, 21);
     this.imageList.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
     this.imageList.TransparentColor = System.Drawing.Color.Black;
     //
     // inertButtonGeneral
     //
     this.inertButtonGeneral.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                            | System.Windows.Forms.AnchorStyles.Right)));
     this.inertButtonGeneral.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.inertButtonGeneral.IsPopup   = true;
     this.inertButtonGeneral.Location  = new System.Drawing.Point(2, 3);
     this.inertButtonGeneral.Name      = "inertButtonGeneral";
     this.inertButtonGeneral.Size      = new System.Drawing.Size(195, 19);
     this.inertButtonGeneral.TabIndex  = 1;
     this.inertButtonGeneral.Text      = "General";
     this.inertButtonGeneral.TextAlign = System.Drawing.ContentAlignment.TopLeft;
     //
     // inertButtonDown
     //
     this.inertButtonDown.Anchor             = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.inertButtonDown.Enabled            = false;
     this.inertButtonDown.ImageDisabled      = ((System.Drawing.Image)(resources.GetObject("inertButtonDown.ImageDisabled")));
     this.inertButtonDown.ImageIndexDisabled = 1;
     this.inertButtonDown.ImageList          = this.imageList;
     this.inertButtonDown.IsPopup            = true;
     this.inertButtonDown.Location           = new System.Drawing.Point(199, 344);
     this.inertButtonDown.Name     = "inertButtonDown";
     this.inertButtonDown.Size     = new System.Drawing.Size(19, 19);
     this.inertButtonDown.TabIndex = 3;
     //
     // label2
     //
     this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.label2.BackColor   = System.Drawing.SystemColors.ControlLightLight;
     this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.label2.ImageAlign  = System.Drawing.ContentAlignment.MiddleLeft;
     this.label2.ImageIndex  = 0;
     this.label2.ImageList   = this.imageList1;
     this.label2.Location    = new System.Drawing.Point(2, 26);
     this.label2.Name        = "label2";
     this.label2.Size        = new System.Drawing.Size(215, 19);
     this.label2.TabIndex    = 5;
     this.label2.Text        = "         Pointer";
     this.label2.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // imageList1
     //
     this.imageList1.ImageSize        = new System.Drawing.Size(18, 18);
     this.imageList1.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.White;
     //
     // DummyToolbox
     //
     this.ClientSize = new System.Drawing.Size(221, 365);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.inertButtonDown);
     this.Controls.Add(this.inertButtonGeneral);
     this.Controls.Add(this.inertButtonUp);
     this.DockableAreas = ((WeifenLuo.WinFormsUI.DockAreas)(((((WeifenLuo.WinFormsUI.DockAreas.Float | WeifenLuo.WinFormsUI.DockAreas.DockLeft)
                                                               | WeifenLuo.WinFormsUI.DockAreas.DockRight)
                                                              | WeifenLuo.WinFormsUI.DockAreas.DockTop)
                                                             | WeifenLuo.WinFormsUI.DockAreas.DockBottom)));
     this.DockPadding.Bottom = 2;
     this.DockPadding.Top    = 2;
     this.HideOnClose        = true;
     this.Icon     = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name     = "DummyToolbox";
     this.ShowHint = WeifenLuo.WinFormsUI.DockState.DockLeftAutoHide;
     this.TabText  = "Toolbox";
     this.Text     = "Toolbox";
     this.ResumeLayout(false);
 }