public void UpdateUIPreferences() { autoTableCheckbox.Checked = S.Get("AutocompleteInsertTables", false); autoAliasCheckbox.Checked = S.Get("AutocompleteInsertAliases", false); BackColor = UI.headerBackColor; ForeColor = UI.headerForeColor; foreach (Control c in buttons) { ToolButton b = c as ToolButton; if (b != null) { b.SetUIPreferences(BackColor, UI.buttonHoverColor, UI.smallButtonImages); } ToolCheckBox cb = c as ToolCheckBox; if (cb != null) { cb.SetUIPreferences(BackColor, UI.buttonHoverColor, UI.buttonCheckedColor, UI.smallButtonImages); } } // foreach (EditorHeaderDropdown combo in dropdowns) Invalidate(true); }
ToolCheckBox CreateCheckBox(int image, string text, EventHandler h) { ToolCheckBox b = new ToolCheckBox(UI.buttonImages, image, h, text); Controls.Add(b); buttons.Add(b); return(b); }
ToolCheckBox CreateCheckBox(List <Control> list, int image, string text, EventHandler h) { ToolCheckBox b = new ToolCheckBox(buttonImages, image, h, text); header.Controls.Add(b); list.Add(b); return(b); }
void SetButtonUiPreferences(List <Control> list) { foreach (Control c in list) { ToolCheckBox cb = c as ToolCheckBox; if (cb != null) { cb.SetUIPreferences(header.BackColor, UI.buttonHoverColor, UI.buttonCheckedColor, buttonImages); } else { ToolButton b = c as ToolButton; if (b != null) { b.SetUIPreferences(header.BackColor, UI.buttonHoverColor, buttonImages); } } } }
public EditorHeader(main f, AutoSuggest a) { autoSuggest = a; mainForm = f; InitializeComponent(); nextButton = CreateButton(0, "Next", new EventHandler(OnNextQuery)); prevButton = CreateButton(1, "Prev", new EventHandler(OnPrevQuery)); formatButton = CreateButton(9, "Format Query", new EventHandler(OnFormatQuery)); autoTableCheckbox = CreateCheckBox(11, "Auto From", new EventHandler(OnAutoFrom)); autoAliasCheckbox = CreateCheckBox(10, "Auto Alias", new EventHandler(OnAutoAlias)); autoTableCheckbox.Checked = S.Get("AutocompleteInsertTables", false); autoAliasCheckbox.Checked = S.Get("AutocompleteInsertAliases", false); queryCombo = AddCombo("Query"); selectCombo = AddCombo("Select"); fromCombo = AddCombo("From"); whereCombo = AddCombo("Where"); groupCombo = AddCombo("Group"); orderCombo = AddCombo("Order"); loading = false; }
public ObjectsTree(bool all) { allObjectsTree = all; buttonImages = UI.buttonImages; searchTextBox = new TextBox(); searchTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; searchTextBox.Location = new System.Drawing.Point(0, 0); searchTextBox.Name = "searchTextBox"; searchTextBox.Size = new System.Drawing.Size(0, 31); searchTextBox.BackColor = UI.headerSearchBackground; searchTextBox.ForeColor = UI.passiveForeColor; searchTextBox.KeyUp += new KeyEventHandler(OnSearchKeyPress); searchTextBox.Visible = false; xButton = new ToolButton(this.buttonImages, 13, new EventHandler(OnClearSearch)); xButton.BackColor = searchTextBox.BackColor; Resize += new EventHandler(OnResize); label = new System.Windows.Forms.Label(); Font = label.Font = SystemFonts.MessageBoxFont; label.AutoSize = true; label.Location = new System.Drawing.Point(21, 29); label.ForeColor = UI.headerForeColor; label.Text = allObjectsTree ? "All Objects" : "Active Objects"; header = new System.Windows.Forms.Panel(); header.Font = SystemFonts.MessageBoxFont; header.BackColor = UI.backColor4; header.Controls.Add(searchTextBox); header.Controls.Add(label); header.Controls.Add(xButton); header.Location = new System.Drawing.Point(0, 0); header.Size = new System.Drawing.Size(10, 10); Controls.Add(header); if (allObjectsTree) { searchColumns = CreateCheckBox(buttons, 2, "Search Columns", new EventHandler(OnFilterColumns)); searchTables = CreateCheckBox(buttons, 3, "Search Tables", new EventHandler(OnFilterTables)); } else { CreateButton(buttons, 5, "Show Parse Tree", new EventHandler(OnParseTree)); CreateButton(buttons, 4, "Show Active Objects", new EventHandler(OnObjects)); showDetails = CreateCheckBox(parseTreeButtons, 7, "Show Details", new EventHandler(OnShowDetails)); showMore = CreateCheckBox(parseTreeButtons, 8, "Show More", new EventHandler(OnShowMore)); showBase = CreateCheckBox(parseTreeButtons, 6, "Show Base Structure", new EventHandler(OnShowBaseStructure)); collapseButton = CreateButton(parseTreeButtons, 14, "Collapse", new EventHandler(OnCollapse)); expandButton = CreateButton(parseTreeButtons, 15, "Expand", new EventHandler(OnExpand)); parseTree = new ParseTreeView(); Controls.Add(parseTree); parseTree.Visible = false; parseTree.BorderStyle = BorderStyle.None; parseTree.AfterExpand += parseTree.OnAfterExpand; } tree = new ObjectsTreeView(all ? "allObjectsTreeView" : "activeObjectsTreeView"); tree.ImageList = UI.treeImages; tree.expandByDefault = !allObjectsTree; tree.Location = new System.Drawing.Point(0, 0); tree.ShowNodeToolTips = true; tree.Size = new System.Drawing.Size(300, 300); tree.TabIndex = 0; Controls.Add(tree); UpdateShowCheckboxes(); }
public SteemitCOREMainForm() { InitializeComponent(); toolStripStatusLabel1.IsLink = true; check = new ToolCheckBox(); }