Merge pull request #37 from IngenerkaTeamCenter/Zifrkoks-patch-2
можно удалять персонажей из списка
This commit is contained in:
commit
190b120268
2 changed files with 16 additions and 1 deletions
|
@ -126,6 +126,7 @@ namespace WindowsFormsApplication1
|
|||
this.label13.Size = new System.Drawing.Size(180, 13);
|
||||
this.label13.TabIndex = 23;
|
||||
this.label13.Text = "ИНФОРМАЦИЯ О ПЕРСОНАЖАХ";
|
||||
this.label13.Click += new System.EventHandler(this.label13_Click);
|
||||
//
|
||||
// PictureBoxBackground
|
||||
//
|
||||
|
|
|
@ -137,7 +137,10 @@ namespace WindowsFormsApplication1
|
|||
persons[nomerPersa].b2.Width = 50;
|
||||
persons[nomerPersa].b2.Visible = true;
|
||||
persons[nomerPersa].b2.Text = "X";
|
||||
persons[nomerPersa].b2.Click +=
|
||||
new System.EventHandler(this.label13_Click);
|
||||
this.panel1.Controls.Add(persons[nomerPersa].b2);
|
||||
|
||||
|
||||
persons[nomerPersa].coord = TextBoxWall1.Text;
|
||||
persons[nomerPersa].coord2 = TextBoxWall2.Text;
|
||||
|
@ -299,6 +302,17 @@ namespace WindowsFormsApplication1
|
|||
}
|
||||
}
|
||||
|
||||
private void label13_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.panel1.Controls.Remove(persons[nomerPersa - 1].l1);
|
||||
this.panel1.Controls.Remove(persons[nomerPersa - 1].l2);
|
||||
this.panel1.Controls.Remove(persons[nomerPersa - 1].l3);
|
||||
this.panel1.Controls.Remove(persons[nomerPersa - 1].b1);
|
||||
this.panel1.Controls.Remove(persons[nomerPersa - 1].b2);
|
||||
nomerPersa--;
|
||||
yPersa = yPersa - 30;
|
||||
}
|
||||
|
||||
private void TextBoxWall1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
char c = e.KeyChar;
|
||||
|
@ -309,4 +323,4 @@ namespace WindowsFormsApplication1
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue