private void place_match_button() { RoundedButton matchButton = new RoundedButton(); matchButton.Text = "Match Materials"; EventHandler myEventHandler = new EventHandler(match_button_Click); matchButton.Click += myEventHandler; matchButton.Location = new System.Drawing.Point(550, 80); System.Drawing.Color color_import_button = System.Drawing.ColorTranslator.FromHtml("#D16900"); matchButton.BackColor = color_import_button; matchButton.ForeColor = System.Drawing.ColorTranslator.FromHtml("#FFFFFF"); matchButton.Size = new System.Drawing.Size(200, 35); matchButton.Anchor = (AnchorStyles.Right | AnchorStyles.Top); this.Controls.Add(matchButton); }
private void place_sub_buttons() { System.Drawing.Color color_sub_button = System.Drawing.ColorTranslator.FromHtml("#9C9E9F"); // split wall button this.splitWallButton = new RoundedButton(); splitWallButton.Text = "Split Wall"; EventHandler splitEventHandler = new EventHandler(myButton_Click); splitWallButton.Click += splitEventHandler; splitWallButton.Location = new System.Drawing.Point(70, 140); splitWallButton.BackColor = color_sub_button; splitWallButton.ForeColor = System.Drawing.ColorTranslator.FromHtml("#FFFFFF"); splitWallButton.Size = new System.Drawing.Size(200, 35); splitWallButton.Anchor = (AnchorStyles.Right | AnchorStyles.Top); this.Controls.Add(splitWallButton); // assign manual button this.assignButton = new RoundedButton(); assignButton.Text = "Assign Manually"; EventHandler assignEventHandler = new EventHandler(myButton_Click); assignButton.Click += assignEventHandler; assignButton.Location = new System.Drawing.Point(300, 140); assignButton.BackColor = color_sub_button; assignButton.ForeColor = System.Drawing.ColorTranslator.FromHtml("#FFFFFF"); assignButton.Size = new System.Drawing.Size(200, 35); assignButton.Anchor = (AnchorStyles.Right | AnchorStyles.Top); this.Controls.Add(assignButton); // create material this.createMaterialButton = new RoundedButton(); createMaterialButton.Text = "Create Material"; EventHandler createEventHandler = new EventHandler(myButton_Click); createMaterialButton.Click += createEventHandler; createMaterialButton.Location = new System.Drawing.Point(550, 140); createMaterialButton.BackColor = color_sub_button; createMaterialButton.ForeColor = System.Drawing.ColorTranslator.FromHtml("#FFFFFF"); createMaterialButton.Size = new System.Drawing.Size(200, 35); createMaterialButton.Anchor = (AnchorStyles.Right | AnchorStyles.Top); this.Controls.Add(createMaterialButton); }
public Form1() { InitializeComponent(); //code from https://www.youtube.com/watch?v=wp8j02G3MyM Application.DoEvents(); RoundedButton myButton = new RoundedButton(); myButton.Text = "Import"; EventHandler myEventHandler = new EventHandler(myButton_Click); myButton.Click += myEventHandler; myButton.Location = new System.Drawing.Point(300, 80); System.Drawing.Color color_import_button = System.Drawing.ColorTranslator.FromHtml("#0078D7"); myButton.BackColor = color_import_button; myButton.ForeColor = System.Drawing.ColorTranslator.FromHtml("#FFFFFF"); myButton.Size = new System.Drawing.Size(400, 35); myButton.Anchor = (AnchorStyles.Right | AnchorStyles.Top); this.Controls.Add(myButton); }