public static void chkApply(CheckBox chk, uixSet colorSet) { uixControl.ctlApply(chk, colorSet); chk.FlatStyle = FlatStyle.Flat; chk.FlatAppearance.BorderColor = colorSet.BackColor; chk.FlatAppearance.CheckedBackColor = colorSet.DarkColor; }
public static void btnStyleMinimize(Button btn, int size, uixSet colorSet) { uixButton.btnApply(btn, colorSet, uixFont.alterFont(uixFont.SANS_SERIF, 12F)); btn.Text = "_"; btn.TabIndex = int.MaxValue; uixButton.btnSquare(btn, size); }
public static void cboApply(ComboBox cbo, uixSet colorSet) { uixControl.ctlApply(cbo, colorSet); cbo.FlatStyle = FlatStyle.Popup; cbo.DropDownStyle = ComboBoxStyle.DropDownList; cbo.AutoCompleteSource = AutoCompleteSource.ListItems; cbo.AutoCompleteMode = AutoCompleteMode.Suggest; }
public static void pnlApply(Panel pnl, uixSet colorSet) { uixControl.ctlApply(pnl, colorSet); if (pnl.Parent is Form || pnl.Parent is UserControl) { pnl.BackColor = colorSet.DarkColor; } }
public static void dgvApply(DataGridView dgv, uixSet cellSet, uixSet headerSet, Font headerFont) { dgv.AllowDrop = false; dgv.AllowUserToAddRows = false; dgv.AllowUserToDeleteRows = false; dgv.AllowUserToResizeColumns = false; dgv.AllowUserToResizeRows = false; dgv.ReadOnly = true; dgv.RowHeadersVisible = false; dgv.MultiSelect = false; dgv.EnableHeadersVisualStyles = false; dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgv.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single; dgv.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single; dgv.CellBorderStyle = DataGridViewCellBorderStyle.Single; dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgv.BorderStyle = BorderStyle.None; DataGridViewCellStyle cellStyle = new DataGridViewCellStyle { BackColor = cellSet.BackColor, ForeColor = cellSet.ContentColor, SelectionBackColor = cellSet.DarkColor, SelectionForeColor = cellSet.ContentColor }; dgv.DefaultCellStyle = cellStyle; dgv.BackgroundColor = headerSet.BackColor; dgv.ForeColor = cellSet.ContentColor; dgv.GridColor = headerSet.DarkColor; dgv.RowHeadersDefaultCellStyle = cellStyle; DataGridViewCellStyle headerStyle = new DataGridViewCellStyle { Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft, BackColor = headerSet.BackColor, ForeColor = headerSet.ContentColor, SelectionBackColor = headerSet.DarkColor, SelectionForeColor = headerSet.ContentColor, WrapMode = System.Windows.Forms.DataGridViewTriState.True, Font = headerFont }; foreach (DataGridViewColumn column in dgv.Columns) { column.HeaderText = column.HeaderText.ToUpper(); DataGridViewCell headerCell = column.HeaderCell; headerCell.Style = headerStyle; } dgv.TopLeftHeaderCell.Style = headerStyle; }
public static void txtApply(TextBoxBase txt, uixSet colorSet) { uixControl.ctlApply(txt, colorSet); txt.BorderStyle = BorderStyle.None; if (txt.Multiline && txt is TextBox box) { box.ScrollBars = ScrollBars.Vertical; } if (txt.ReadOnly) { txt.Cursor = Cursors.Default; } }
public static void btnApply(Button btn, uixSet colorSet) { uixControl.ctlApply(btn, colorSet); btn.FlatStyle = FlatStyle.Flat; btn.FlatAppearance.MouseDownBackColor = colorSet.DarkColor; btn.FlatAppearance.MouseOverBackColor = colorSet.DarkColor; btn.FlatAppearance.BorderSize = 0; if (btn.ForeColor == Control.DefaultForeColor) { btn.ForeColor = colorSet.ContentColor; } btn.Cursor = Cursors.Hand; btn.TextAlign = ContentAlignment.MiddleCenter; if (btn is UIXButton uix) { uix.HoverColor = colorSet.DarkColor; } }
public static void lblApply(Label lbl, uixSet colorSet) { uixControl.ctlApply(lbl, colorSet); }
public static void btnApply(Button btn, uixSet colorSet, Font font) { uixControl.ctlApply(btn, colorSet, font); uixButton.btnApply(btn, colorSet); }
public static void cboApply(ComboBox cbo, uixSet colorSet, Font font) { uixControl.ctlApply(cbo, colorSet, font); uixComboBox.cboApply(cbo, colorSet); }
public static void chkApply(CheckBox chk, uixSet colorSet, Font font) { uixControl.ctlApply(chk, colorSet, font); chkApply(chk, colorSet); }
public static void grbApply(GroupBox grb, uixSet colorSet, Font font) { uixControl.ctlApply(grb, colorSet, font); uixGroupBox.grbApply(grb, colorSet); }
public static void grbApply(GroupBox grb, uixSet colorSet) { uixControl.ctlApply(grb, colorSet); grb.FlatStyle = FlatStyle.Flat; grb.Text = grb.Text.ToUpper(); }
public static void pnlApply(Panel pnl, uixSet colorSet, Font font) { uixControl.ctlApply(pnl, colorSet); uixPanel.pnlApply(pnl, colorSet); }
public static void ctlApply(Control ctl, uixSet colorSet, Font font) { ctl.Font = uixFont.alterFont(font, ctl.Font); ctlApply(ctl, colorSet); }
public static void txtApply(TextBoxBase txt, uixSet colorSet, Font font) { uixControl.ctlApply(txt, colorSet, font); uixTextBox.txtApply(txt, colorSet); }
public static void lblApply(Label lbl, uixSet colorSet, Font font) { uixControl.ctlApply(lbl, colorSet, font); uixLabel.lblApply(lbl, colorSet); }
public static void mtbApply(MaskedTextBox mtb, uixSet colorSet) { uixControl.ctlApply(mtb, colorSet); mtb.BorderStyle = BorderStyle.None; }
public static void mtbApply(MaskedTextBox mtb, uixSet colorSet, Font font) { uixControl.ctlApply(mtb, colorSet, font); uixMaskedTextBox.mtbApply(mtb, colorSet); }
public static void picApply(PictureBox pic, uixSet colorSet, Image errorImage) { uixControl.ctlApply(pic, colorSet); pic.SizeMode = PictureBoxSizeMode.Zoom; pic.ErrorImage = errorImage; }
public static void uctApply(UserControl uct, uixSet set, Font font) { uct.Font = uixFont.alterFont(font, uct.Font); uixUserControl.uctApply(uct, set); }
public static void uctApply(UserControl uct, uixSet set) { uct.BackColor = set.BackColor; uct.ForeColor = set.ContentColor; }
private static void botao(UIXButton btn, Image img, String text, uixSet colorSet) { btn.Image = img; btn.Description = text; uixButton.btnApply(btn, colorSet); }
public static void ctlApply(Control ctl, uixSet colorSet) { ctl.ForeColor = colorSet.ContentColor; ctl.BackColor = colorSet.BackColor; ctl.Margin = new Padding(0); }