Esempio n. 1
0
        private Button GetToolboxButton(string text, Image image, object tag = null)
        {
            var button = new NoFocusButton()
            {
                AutoSize          = true,
                AutoEllipsis      = true,
                Dock              = DockStyle.Top,
                TextAlign         = ContentAlignment.MiddleLeft,
                ImageAlign        = ContentAlignment.MiddleLeft,
                TextImageRelation = TextImageRelation.ImageBeforeText,
                Text              = text,
                Image             = image,
                Tag = tag
            };

            //toolTip1.SetToolTip(button, text);
            button.Click += ToolboxButton_Click;
            return(button);
        }
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControlButtonsPanel));
            this.buttonInventory = new MMO3D.Client.NoFocusButton();
            this.imageListButtonIcons = new System.Windows.Forms.ImageList(this.components);
            this.buttonBelt = new MMO3D.Client.NoFocusButton();
            this.buttonArts = new MMO3D.Client.NoFocusButton();
            this.buttonCharacterDetails = new MMO3D.Client.NoFocusButton();
            this.buttonQuit = new MMO3D.Client.NoFocusButton();
            this.buttonSettings = new MMO3D.Client.NoFocusButton();
            this.buttonParty = new MMO3D.Client.NoFocusButton();
            this.buttonQuestJournal = new MMO3D.Client.NoFocusButton();
            this.splitContainer.Panel2.SuspendLayout();
            this.splitContainer.SuspendLayout();
            this.SuspendLayout();
            // 
            // splitContainer
            // 
            this.splitContainer.Panel1Collapsed = true;
            // 
            // splitContainer.Panel2
            // 
            this.splitContainer.Panel2.Controls.Add(this.buttonQuit);
            this.splitContainer.Panel2.Controls.Add(this.buttonSettings);
            this.splitContainer.Panel2.Controls.Add(this.buttonParty);
            this.splitContainer.Panel2.Controls.Add(this.buttonQuestJournal);
            this.splitContainer.Panel2.Controls.Add(this.buttonCharacterDetails);
            this.splitContainer.Panel2.Controls.Add(this.buttonArts);
            this.splitContainer.Panel2.Controls.Add(this.buttonBelt);
            this.splitContainer.Panel2.Controls.Add(this.buttonInventory);
            this.splitContainer.Size = new System.Drawing.Size(258, 34);
            // 
            // buttonInventory
            // 
            this.buttonInventory.ImageKey = "Inventory.png";
            this.buttonInventory.ImageList = this.imageListButtonIcons;
            this.buttonInventory.Location = new System.Drawing.Point(0, 0);
            this.buttonInventory.Name = "buttonInventory";
            this.buttonInventory.Size = new System.Drawing.Size(32, 32);
            this.buttonInventory.TabIndex = 0;
            this.buttonInventory.UseVisualStyleBackColor = true;
            // 
            // imageListButtonIcons
            // 
            this.imageListButtonIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListButtonIcons.ImageStream")));
            this.imageListButtonIcons.TransparentColor = System.Drawing.Color.Transparent;
            this.imageListButtonIcons.Images.SetKeyName(0, "Inventory.png");
            this.imageListButtonIcons.Images.SetKeyName(1, "Belt.png");
            this.imageListButtonIcons.Images.SetKeyName(2, "Arts.png");
            this.imageListButtonIcons.Images.SetKeyName(3, "CharacterDetails.png");
            this.imageListButtonIcons.Images.SetKeyName(4, "QuestJournal.png");
            this.imageListButtonIcons.Images.SetKeyName(5, "Party.png");
            this.imageListButtonIcons.Images.SetKeyName(6, "Settings.png");
            this.imageListButtonIcons.Images.SetKeyName(7, "Quit.png");
            // 
            // buttonBelt
            // 
            this.buttonBelt.ImageKey = "Belt.png";
            this.buttonBelt.ImageList = this.imageListButtonIcons;
            this.buttonBelt.Location = new System.Drawing.Point(32, 0);
            this.buttonBelt.Name = "buttonBelt";
            this.buttonBelt.Size = new System.Drawing.Size(32, 32);
            this.buttonBelt.TabIndex = 1;
            this.buttonBelt.UseVisualStyleBackColor = true;
            // 
            // buttonArts
            // 
            this.buttonArts.ImageKey = "Arts.png";
            this.buttonArts.ImageList = this.imageListButtonIcons;
            this.buttonArts.Location = new System.Drawing.Point(64, 0);
            this.buttonArts.Name = "buttonArts";
            this.buttonArts.Size = new System.Drawing.Size(32, 32);
            this.buttonArts.TabIndex = 2;
            this.buttonArts.UseVisualStyleBackColor = true;
            // 
            // buttonCharacterDetails
            // 
            this.buttonCharacterDetails.ImageKey = "CharacterDetails.png";
            this.buttonCharacterDetails.ImageList = this.imageListButtonIcons;
            this.buttonCharacterDetails.Location = new System.Drawing.Point(96, 0);
            this.buttonCharacterDetails.Name = "buttonCharacterDetails";
            this.buttonCharacterDetails.Size = new System.Drawing.Size(32, 32);
            this.buttonCharacterDetails.TabIndex = 3;
            this.buttonCharacterDetails.UseVisualStyleBackColor = true;
            // 
            // buttonQuit
            // 
            this.buttonQuit.ImageKey = "Quit.png";
            this.buttonQuit.ImageList = this.imageListButtonIcons;
            this.buttonQuit.Location = new System.Drawing.Point(224, 0);
            this.buttonQuit.Name = "buttonQuit";
            this.buttonQuit.Size = new System.Drawing.Size(32, 32);
            this.buttonQuit.TabIndex = 7;
            this.buttonQuit.UseVisualStyleBackColor = true;
            // 
            // buttonSettings
            // 
            this.buttonSettings.ImageKey = "Settings.png";
            this.buttonSettings.ImageList = this.imageListButtonIcons;
            this.buttonSettings.Location = new System.Drawing.Point(192, 0);
            this.buttonSettings.Name = "buttonSettings";
            this.buttonSettings.Size = new System.Drawing.Size(32, 32);
            this.buttonSettings.TabIndex = 6;
            this.buttonSettings.UseVisualStyleBackColor = true;
            // 
            // buttonParty
            // 
            this.buttonParty.ImageKey = "Party.png";
            this.buttonParty.ImageList = this.imageListButtonIcons;
            this.buttonParty.Location = new System.Drawing.Point(160, 0);
            this.buttonParty.Name = "buttonParty";
            this.buttonParty.Size = new System.Drawing.Size(32, 32);
            this.buttonParty.TabIndex = 5;
            this.buttonParty.UseVisualStyleBackColor = true;
            // 
            // buttonQuestJournal
            // 
            this.buttonQuestJournal.ImageKey = "QuestJournal.png";
            this.buttonQuestJournal.ImageList = this.imageListButtonIcons;
            this.buttonQuestJournal.Location = new System.Drawing.Point(128, 0);
            this.buttonQuestJournal.Name = "buttonQuestJournal";
            this.buttonQuestJournal.Size = new System.Drawing.Size(32, 32);
            this.buttonQuestJournal.TabIndex = 4;
            this.buttonQuestJournal.UseVisualStyleBackColor = true;
            // 
            // ControlButtonsPanel
            // 
            this.Name = "ControlButtonsPanel";
            this.ShowTitleBar = false;
            this.Size = new System.Drawing.Size(258, 34);
            this.splitContainer.Panel2.ResumeLayout(false);
            this.splitContainer.ResumeLayout(false);
            this.ResumeLayout(false);

        }
Esempio n. 3
0
 private void Window_MouseUp(object sender, MouseButtonEventArgs e)
 {
     NoFocusButton.Focus();
 }
        /// <summary>
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.buttonClose = new NoFocusButton();
            this.splitContainer = new System.Windows.Forms.SplitContainer();
            this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
            this.labelWindowTitle = new System.Windows.Forms.Label();
            this.splitContainer.Panel1.SuspendLayout();
            this.splitContainer.SuspendLayout();
            this.tableLayoutPanel.SuspendLayout();
            this.SuspendLayout();
            // 
            // buttonClose
            // 
            this.buttonClose.Location = new System.Drawing.Point(276, 3);
            this.buttonClose.Name = "buttonClose";
            this.buttonClose.Size = new System.Drawing.Size(21, 21);
            this.buttonClose.TabIndex = 1;
            this.buttonClose.Text = "X";
            this.buttonClose.UseVisualStyleBackColor = true;
            this.buttonClose.Click += new System.EventHandler(this.ButtonClose_Click);
            // 
            // splitContainer
            // 
            this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
            this.splitContainer.IsSplitterFixed = true;
            this.splitContainer.Location = new System.Drawing.Point(0, 0);
            this.splitContainer.Name = "splitContainer";
            this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
            // 
            // splitContainer.Panel1
            // 
            this.splitContainer.Panel1.BackColor = System.Drawing.Color.LightSteelBlue;
            this.splitContainer.Panel1.Controls.Add(this.tableLayoutPanel);
            this.splitContainer.Panel1MinSize = 27;
            this.splitContainer.Size = new System.Drawing.Size(300, 300);
            this.splitContainer.SplitterDistance = 27;
            this.splitContainer.SplitterWidth = 1;
            this.splitContainer.TabIndex = 2;
            // 
            // tableLayoutPanel
            // 
            this.tableLayoutPanel.ColumnCount = 2;
            this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tableLayoutPanel.Controls.Add(this.buttonClose, 1, 0);
            this.tableLayoutPanel.Controls.Add(this.labelWindowTitle, 0, 0);
            this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel.Name = "tableLayoutPanel";
            this.tableLayoutPanel.RowCount = 1;
            this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tableLayoutPanel.Size = new System.Drawing.Size(300, 27);
            this.tableLayoutPanel.TabIndex = 3;
            // 
            // labelWindowTitle
            // 
            this.labelWindowTitle.AutoSize = true;
            this.labelWindowTitle.Dock = System.Windows.Forms.DockStyle.Fill;
            this.labelWindowTitle.Location = new System.Drawing.Point(3, 0);
            this.labelWindowTitle.Name = "labelWindowTitle";
            this.labelWindowTitle.Size = new System.Drawing.Size(267, 27);
            this.labelWindowTitle.TabIndex = 2;
            this.labelWindowTitle.Text = "Window Title";
            this.labelWindowTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // Window
            // 
            this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.Controls.Add(this.splitContainer);
            this.Name = "Window";
            this.Size = new System.Drawing.Size(300, 300);
            this.splitContainer.Panel1.ResumeLayout(false);
            this.splitContainer.ResumeLayout(false);
            this.tableLayoutPanel.ResumeLayout(false);
            this.tableLayoutPanel.PerformLayout();
            this.ResumeLayout(false);

        }