Добавил лэйблы и кнопки (по нажатию)

This commit is contained in:
Voltronormu 2018-03-16 16:39:29 +04:00 committed by GitHub
parent 060dc34df2
commit d7cb790e6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 14 deletions

View file

@ -152,7 +152,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Left; this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(282, 380); this.panel1.Size = new System.Drawing.Size(282, 527);
this.panel1.TabIndex = 4; this.panel1.TabIndex = 4;
// //
// label13 // label13
@ -364,7 +364,7 @@
// //
this.splitter1.Location = new System.Drawing.Point(282, 0); this.splitter1.Location = new System.Drawing.Point(282, 0);
this.splitter1.Name = "splitter1"; this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(3, 380); this.splitter1.Size = new System.Drawing.Size(3, 527);
this.splitter1.TabIndex = 5; this.splitter1.TabIndex = 5;
this.splitter1.TabStop = false; this.splitter1.TabStop = false;
// //
@ -377,13 +377,13 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(285, 0); this.panel2.Location = new System.Drawing.Point(285, 0);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(392, 380); this.panel2.Size = new System.Drawing.Size(392, 527);
this.panel2.TabIndex = 6; this.panel2.TabIndex = 6;
// //
// SaveCharButton // SaveCharButton
// //
this.SaveCharButton.Dock = System.Windows.Forms.DockStyle.Bottom; this.SaveCharButton.Dock = System.Windows.Forms.DockStyle.Bottom;
this.SaveCharButton.Location = new System.Drawing.Point(0, 320); this.SaveCharButton.Location = new System.Drawing.Point(0, 467);
this.SaveCharButton.Name = "SaveCharButton"; this.SaveCharButton.Name = "SaveCharButton";
this.SaveCharButton.Size = new System.Drawing.Size(392, 30); this.SaveCharButton.Size = new System.Drawing.Size(392, 30);
this.SaveCharButton.TabIndex = 3; this.SaveCharButton.TabIndex = 3;
@ -411,7 +411,7 @@
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 26); this.panel3.Location = new System.Drawing.Point(0, 26);
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(392, 324); this.panel3.Size = new System.Drawing.Size(392, 471);
this.panel3.TabIndex = 2; this.panel3.TabIndex = 2;
this.panel3.Visible = false; this.panel3.Visible = false;
// //
@ -556,7 +556,7 @@
// SaveMultButton // SaveMultButton
// //
this.SaveMultButton.Dock = System.Windows.Forms.DockStyle.Bottom; this.SaveMultButton.Dock = System.Windows.Forms.DockStyle.Bottom;
this.SaveMultButton.Location = new System.Drawing.Point(0, 350); this.SaveMultButton.Location = new System.Drawing.Point(0, 497);
this.SaveMultButton.Name = "SaveMultButton"; this.SaveMultButton.Name = "SaveMultButton";
this.SaveMultButton.Size = new System.Drawing.Size(392, 30); this.SaveMultButton.Size = new System.Drawing.Size(392, 30);
this.SaveMultButton.TabIndex = 1; this.SaveMultButton.TabIndex = 1;
@ -582,7 +582,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(677, 380); this.ClientSize = new System.Drawing.Size(677, 527);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.splitter1); this.Controls.Add(this.splitter1);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);

View file

@ -18,7 +18,14 @@ namespace WindowsFormsApplication1
public partial class MainForm : Form public partial class MainForm : Form
{ {
public TextBox[] b1 = new TextBox[100]; int y = 300;
public Label[] l1 = new Label[100];
public Label[] l2 = new Label[100];
public Label[] l3 = new Label[100];
public Button[] b1 = new Button[100];
public Button[] b2 = new Button[100];
PictureBox[] pic1 = new PictureBox[1000]; PictureBox[] pic1 = new PictureBox[1000];
@ -329,12 +336,51 @@ namespace WindowsFormsApplication1
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
b1[0] = new TextBox(); l1[0] = new Label();
b1[0].Top = 10; l1[0].Top = y;
b1[0].Left = 30; l1[0].Left = 30;
b1[0].Width = 200; l1[0].Width = 50;
l1[0].Visible = true;
l1[0].Text = "gfhcghfgh";
this.panel1.Controls.Add(l1[0]);
l2[0] = new Label();
l2[0].Top = y;
l2[0].Left = 100;
l2[0].Width = 60;
l2[0].Visible = true;
l2[0].Text = "ocphcghfgh";
this.panel1.Controls.Add(l2[0]);
l3[0] = new Label();
l3[0].Top = y;
l3[0].Left = 170;
l3[0].Width = 40;
l3[0].Visible = true;
l3[0].Text = "ocphcghfgh";
this.panel1.Controls.Add(l3[0]);
b1[0] = new Button();
b1[0].Top = y;
b1[0].Left = 220;
b1[0].Width = 50;
b1[0].Visible = true; b1[0].Visible = true;
this.panel1.Controls.Add(b1[0]); this.panel1.Controls.Add(b1[0]);
b2[0] = new Button();
b2[0].Top = y;
b2[0].Left = 280;
b2[0].Width = 50;
b2[0].Visible = true;
this.panel1.Controls.Add(b2[0]);
y = y + 30;
} }
private void button3_Click(object sender, EventArgs e)
{
} }
} }
}

View file

@ -124,6 +124,6 @@
<value>153, 17</value> <value>153, 17</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>39</value> <value>25</value>
</metadata> </metadata>
</root> </root>