public panel(string sectionName) { panelEditButton.BackColor = SystemColors.ControlDarkDark; panelEditSection.BackColor = SystemColors.ControlDarkDark; this.Text = sectionName; this.Size = new Size(1022,660); this.Location = new Point(1,54); //MyButton a = new MyButton(); //a.Text = "asdasd"; //a.Location = new Point(20,30); //a.Size = new Size(50,50); //this.Controls.Add(a); //mangMyButton.Add(a); color1 = Color.White; color2 = Color.HotPink; colorBar1 = new ColorBar(color1); colorBar2 = new ColorBar(color2); panelEditButton.Location = new Point(4, 570); panelEditButton.Size = new Size(604, 81); panelEditButton.Visible = false; txtTableName.Location = new Point(9, 49); txtTableName.Size = new Size(159, 20); txtTableName.ForeColor = System.Drawing.Color.White; panelEditButton.Controls.Add(txtTableName); this.Controls.Add(panelEditButton); panelEditSection.Location = new Point(4, 570); panelEditSection.Size = new Size(604, 81); panelEditSection.Visible = false; colorBar1.Location = new Point(185, 49); colorBar1.Size = new Size(121, 23); colorBar1.BackColorChanged += new EventHandler(colorBar1_BackColorChanged); panelEditSection.Controls.Add(colorBar1); colorBar2.Location = new Point(333, 49); colorBar2.Size = new Size(121, 23); colorBar2.BackColorChanged += new EventHandler(colorBar2_BackColorChanged); panelEditSection.Controls.Add(colorBar2); colorBar3.Location = new Point(481, 49); colorBar3.Size = new Size(121, 23); panelEditSection.Controls.Add(colorBar3); txtSection.Location = new Point(9, 49); txtSection.Size = new Size(159, 20); panelEditSection.Controls.Add(txtSection); txtSection.Text = this.Text; this.Controls.Add(panelEditSection); }
public panel(ArrayList x,String sectionName,Color tmpcolor1,Color tmpcolor2) { panelEditButton.BackColor = SystemColors.ControlDarkDark; panelEditSection.BackColor = SystemColors.ControlDarkDark; this.Text = sectionName; mangMyButton = x; this.Size = new Size(1022, 660); this.Location = new Point(1, 54); foreach (MyButton myButton in mangMyButton) { myButton.Click += new EventHandler(myButton_Click); this.Controls.Add(myButton); } color1 = tmpcolor1; color2 = tmpcolor2; colorBar1 = new ColorBar(color1); colorBar2 = new ColorBar(color2); panelEditButton.Location = new Point(4,570); panelEditButton.Size = new Size(604,81); panelEditButton.Visible = false; txtTableName.Location = new Point(9, 49); txtTableName.Size = new Size(159, 20); txtTableName.ForeColor = System.Drawing.Color.White; panelEditButton.Controls.Add(txtTableName); this.Controls.Add(panelEditButton); panelEditSection.Location = new Point(4, 570); panelEditSection.Size = new Size(604, 81); panelEditSection.Visible = false; colorBar1.Location = new Point(185,49); colorBar1.Size = new Size(121,23); colorBar1.BackColorChanged += new EventHandler(colorBar1_BackColorChanged); panelEditSection.Controls.Add(colorBar1); colorBar2.Location = new Point(333,49); colorBar2.Size = new Size(121,23); colorBar2.BackColorChanged += new EventHandler(colorBar2_BackColorChanged); panelEditSection.Controls.Add(colorBar2); colorBar3.Location = new Point(481, 49); colorBar3.Size = new Size(121, 23); panelEditSection.Controls.Add(colorBar3); txtSection.Location = new Point(9,49); txtSection.Size = new Size(159,20); panelEditSection.Controls.Add(txtSection); txtSection.Text = this.Text; this.Controls.Add(panelEditSection); }