public SidePanel(Control control) { this.Location = new Point(0, HeaderPanel.HeaderHeight); this.Width = control.Width / 15; this.Height = control.Height; this.BackColor = Color.FromArgb(45, 48, 71);//Space Cadet for (int i = 0; i < 3; ++i) { ServerButton serverButton = new ServerButton(this); serverButton.Location = new Point(0, i * serverButton.Height); this.serverButtons.Add(serverButton); } control.Controls.Add(this); }
public SidePanel(Control control) { this.Location = new Point(0, HeaderPanel.HeaderHeight); this.Width = AdjustedWith(control); this.Height = control.Height; this.BackColor = Color.FromArgb(45, 48, 71);//Space Cadet for (int i = 0; i < 3; ++i) { ServerButton serverButton = new ServerButton(this); serverButton.Location = new Point(0, i * serverButton.Height); this.serverButtons.Add(serverButton); } ServerButton addServerButton = new ServerButton(this); addServerButton.Location = new Point(0, serverButtons.Count * addServerButton.Height); addServerButton.IsAddButton = true; control.Controls.Add(this); }