private void CreateBaseTextBox() { if (baseTextBox != null) { return; } baseTextBox = new PromptedTextBox(); baseTextBox.BorderStyle = BorderStyle.None; baseTextBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - 6, Height - 6); if ((metroTextBoxSize == MetroTextBoxSize.Px20 || metroTextBoxSize == MetroTextBoxSize.Px18) && !Multiline) { baseTextBox.Size = new Size(Width - 6, 29); baseTextBox.Location = new Point(3, (Height - 29) / 2); } Size = new Size(Width, Height); baseTextBox.TabStop = true; //baseTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right; Controls.Add(baseTextBox); }
private void UpdateBaseTextBox() { if (baseTextBox == null) { return; } baseTextBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); if (displayIcon) { Point textBoxLocation = new Point(iconSize.Width + 4, 3); if (textBoxIconRight) { textBoxLocation = new Point(3, 3); } baseTextBox.Location = textBoxLocation; baseTextBox.Size = new Size(Width - 7 - iconSize.Width, Height - 6); } else { baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - 6, Height - 6); } }
private void UpdateBaseTextBox() { UpdateTextBoxCursor(); if (_button != null) { if ((Height % 2) > 0) { _button.Size = new Size(Height - 2, Height - 2); _button.Location = new Point(this.Width - (_button.Width + 1), 1); } else { _button.Size = new Size(Height - 5, Height - 5); _button.Location = new Point((this.Width - _button.Width) - 3, 2); } _button.Visible = _showbutton; } int _clearloc = 0; if (lnkClear != null) { lnkClear.Visible = false; if (_showclear && this.Text != "" && !this.ReadOnly && this.Enabled) { _clearloc = 16; lnkClear.Location = new Point(this.Width - (ButtonWidth + 17), (this.Height - 14) / 2); lnkClear.Visible = true; } } if (baseTextBox == null) { return; } baseTextBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); if (displayIcon) { Point textBoxLocation = new Point(iconSize.Width + 10, 5); if (textBoxIconRight) { textBoxLocation = new Point(3, 3); } baseTextBox.Location = textBoxLocation; baseTextBox.Size = new Size(Width - (20 + ButtonWidth + _clearloc) - iconSize.Width, Height - 6); } else { baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - (6 + ButtonWidth + _clearloc), Height - 6); } }
// Token: 0x060002D6 RID: 726 RVA: 0x00009E60 File Offset: 0x00008060 private void UpdateBaseTextBox() { if (this.baseTextBox == null) { return; } this.baseTextBox.Font = MetroFonts.TextBox(this.metroTextBoxSize, this.metroTextBoxWeight); this.baseTextBox.Location = new Point(3, 3); this.baseTextBox.Size = new Size(base.Width - 6, base.Height - 6); }
private void UpdateBaseTextBox() { if (baseTextBox == null) { return; } baseTextBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - 6, Height - 6); }
private void CreateBaseTextBox() { if (baseTextBox != null) { return; } baseTextBox = new PromptedTextBox { BorderStyle = BorderStyle.None, Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight), Location = new Point(3, 3), Size = new Size(Width - 6, Height - 6) }; Size = new Size(baseTextBox.Width + 6, baseTextBox.Height + 6); baseTextBox.TabStop = true; //baseTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right; Controls.Add(baseTextBox); if (_button != null) { return; } _button = new MetroTextButton { Theme = Theme, Style = Style, Location = new Point(3, 1), Size = new Size(Height - 4, Height - 4) }; _button.TextChanged += _button_TextChanged; _button.MouseEnter += _button_MouseEnter; _button.MouseLeave += _button_MouseLeave; _button.Click += _button_Click; if (!this.Controls.Contains(this._button)) { this.Controls.Add(_button); } if (lnkClear != null) { return; } InitializeComponent(); }
// Token: 0x060002D4 RID: 724 RVA: 0x00009C68 File Offset: 0x00007E68 private void CreateBaseTextBox() { if (this.baseTextBox != null) { return; } this.baseTextBox = new MetroTextBox.PromptedTextBox(); this.baseTextBox.BorderStyle = BorderStyle.None; this.baseTextBox.Font = MetroFonts.TextBox(this.metroTextBoxSize, this.metroTextBoxWeight); this.baseTextBox.Location = new Point(3, 3); this.baseTextBox.Size = new Size(base.Width - 6, base.Height - 6); base.Size = new Size(this.baseTextBox.Width + 6, this.baseTextBox.Height + 6); this.baseTextBox.TabStop = true; base.Controls.Add(this.baseTextBox); }
private void CreateListBox() { if (listboxOpen) { return; } listBox = new WindowsListBox(); listBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); listBox.Size = new System.Drawing.Size(208, 154); listBox.BringToFront(); listBox.TopMost = true; listBox.DoubleClick += ListBox_DoubleClick; listBox.Click += ListBox_Click; }
private void UpdateBaseTextBox() { if (baseTextBox == null) { return; } var size = TextRenderer.MeasureText("0", MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight)); baseTextBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); baseTextBox.Size = new Size(Width - 18, Height - 6); baseTextBox.Location = new Point(3, (Height - baseTextBox.Height) / 2); upButton.Location = new Point(Width - 12, baseTextBox.Location.Y); dwButton.Location = new Point(Width - 12, baseTextBox.Location.Y + size.Height - 8); }
private void CreateBaseTextBox() { if (baseTextBox != null) { return; } baseTextBox = new TextBox(); baseTextBox.BorderStyle = BorderStyle.None; baseTextBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - 6, Height - 6); Size = new Size(baseTextBox.Width + 6, baseTextBox.Height + 6); //baseTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right; Controls.Add(baseTextBox); }
private void CreateListBox() { if (baseListBox != null) { return; } baseListBox = new ListBox(); baseListBox.BorderStyle = BorderStyle.None; baseListBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); baseListBox.Location = new Point(3, 3); baseListBox.Size = new Size(Width - 6, Height - 6); Size = new Size(baseListBox.Width + 6, baseListBox.Height + 6); baseListBox.TabStop = true; Controls.Add(baseListBox); }
private void RefreshCrumbs() { SuspendLayout(); RemoveCrumbs(); bool firstTime = true; foreach (KeyValuePair <string, string> kvp in Crumbs) { int cntr = Controls.Count; if (!firstTime) { MetroLabel lbl = new MetroLabel() { Text = "", AutoSize = true }; lbl.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); lbl.Location = new Point(Controls[cntr - 1].Width + Controls[cntr - 1].Location.X, Controls[cntr - 1].Location.Y); Controls.Add(lbl); } firstTime = false; MetroLabel lnklbl = new MetroLabel() { Text = kvp.Value, Tag = kvp.Key, AutoSize = true }; lnklbl.DoubleClick += Lnklbl_DoubleClick; if (cntr > 0) { lnklbl.Location = new Point(Controls[cntr].Width + Controls[cntr].Location.X, 3); } else { lnklbl.Location = new Point(3, 3); } Controls.Add(lnklbl); } ResumeLayout(); }
private void UpdatePropertyGrid() { propertyGrid.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); int toolbarHeight = toolbarVisible ? 25 : 0; propertyGrid.Size = new Size(Width - 6, Height - 6 - toolbarHeight); propertyGrid.Location = new Point(3, 3 + toolbarHeight); propertyGrid.HelpVisible = helpVisible; propertyGrid.HelpBackColor = MetroPaint.BackColor.Button.Normal(Theme); propertyGrid.HelpForeColor = MetroPaint.GetStyleColor(Style); propertyGrid.HelpBorderColor = MetroPaint.BorderColor.Button.Normal(Theme); propertyGrid.CategorySplitterColor = MetroPaint.GetStyleColor(Style); propertyGrid.LineColor = MetroPaint.GetStyleColor(Style); propertyGrid.SelectedItemWithFocusBackColor = MetroPaint.GetStyleColor(Style); propertyGrid.SelectedItemWithFocusForeColor = (Theme == MetroThemeStyle.Light) ? Color.FromArgb(17, 17, 17) : Color.FromArgb(255, 255, 255); propertyGrid.ViewBackColor = MetroPaint.BackColor.Form(Theme); propertyGrid.ViewForeColor = (Theme == MetroThemeStyle.Light) ? Color.FromArgb(17, 17, 17) : Color.FromArgb(255, 255, 255); propertyGrid.ViewBorderColor = MetroPaint.BorderColor.Button.Normal(Theme); btnGrouped.Visible = toolbarVisible; btnAlfabetical.Visible = toolbarVisible; }
private void UpdateTreeView() { Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); }
private void CreateBaseTextBox() { if (upButton != null) { return; } var resources = new System.ComponentModel.ComponentResourceManager(typeof(MetroNumericUpDown)); var size = TextRenderer.MeasureText("0", MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight)); upButton = new MetroLink { Theme = Theme, Style = Style, Location = new Point(Width - 8, 3), Size = new Size(8, 8), ImageSize = 8, Image = ((System.Drawing.Image)(resources.GetObject("Up8"))), NoFocusImage = ((System.Drawing.Image)(resources.GetObject("Up8g"))), TabStop = false }; upButton.Click += UpButton_Click; if (!this.Controls.Contains(this.upButton)) { this.Controls.Add(upButton); } dwButton = new MetroLink { Theme = Theme, Style = Style, Location = new Point(Width - 8, 5), Size = new Size(8, 8), ImageSize = 8, TabStop = false, Image = ((System.Drawing.Image)(resources.GetObject("Down8"))), NoFocusImage = ((System.Drawing.Image)(resources.GetObject("Down8g"))) }; dwButton.Click += DwButton_Click; if (!this.Controls.Contains(this.dwButton)) { this.Controls.Add(dwButton); } if (baseTextBox != null) { return; } baseTextBox = new TextBox { BorderStyle = BorderStyle.None, Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight), Size = new Size(Width - 14, Height - 6), Location = new Point(3, 3), TextAlign = HorizontalAlignment.Right, TabStop = true }; UpdateBaseTextBox(); Controls.Add(baseTextBox); }
private void UpdateBaseTextBox() { if (_button != null) { if ((Height % 2) > 0) { _button.Size = new Size(Height - 2, Height - 2); _button.Location = new Point(this.Width - (_button.Width + 1), 1); } else { _button.Size = new Size(Height - 5, Height - 5); _button.Location = new Point((this.Width - _button.Width) - 3, 2); } } int _clearloc = 0; if (lnkClear != null) { lnkClear.Visible = false; if (_showclear && this.Text != "" && !this.ReadOnly && this.Enabled) { _clearloc = 16; lnkClear.Location = new Point(this.Width - (ButtonWidth + 17), (this.Height - 14) / 2); lnkClear.Visible = true; } } int _slbLoc = 0; if (lblSidelabel != null) { lblSidelabel.Visible = false; if (_showsidelabel && this.Text != "" && !this.ReadOnly && this.Enabled) { lblSidelabel.FontSize = (MetroLabelSize)this.FontSize; if (lblSidelabel.FontSize == MetroLabelSize.Tall) { lblSidelabel.Width = 35 + 15; } else if (lblSidelabel.FontSize == MetroLabelSize.Medium) { lblSidelabel.Width = 35 + 5; } else { lblSidelabel.Width = 35; } _slbLoc = 24; lblSidelabel.Location = new Point(0, 0); lblSidelabel.Visible = true; } } if (baseTextBox == null) { return; } baseTextBox.Font = MetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); if (displayIcon) { Point textBoxLocation = new Point(iconSize.Width + 10, 5); if (textBoxIconRight) { textBoxLocation = new Point(3, 3); } baseTextBox.Location = textBoxLocation; baseTextBox.Size = new Size(Width - (20 + ButtonWidth + _clearloc) - iconSize.Width, Height - 6); } else { if (_showsidelabel == true) { this.ControlType = MetroTextBoxControlType.Double; int _x = lblSidelabel.Width + 3; int _width = Width - (_slbLoc + 18 + ButtonWidth); if (lblSidelabel.FontSize == MetroLabelSize.Tall) { _width = Width - (_slbLoc + ButtonWidth) - 35; } else if (lblSidelabel.FontSize == MetroLabelSize.Medium) { _width = Width - (_slbLoc + ButtonWidth) - 26; } else { _width = Width - (_slbLoc + 18 + ButtonWidth); } baseTextBox.Location = new Point(_x, 3); baseTextBox.Size = new Size(_width, Height - 6); lblSidelabel.Height = this.Height - 1; } else { baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - (6 + ButtonWidth + _clearloc), Height - 6); } } }