можно удалять персонажей из списка
This commit is contained in:
parent
50fad066df
commit
001fc94011
2 changed files with 24 additions and 9 deletions
|
@ -41,6 +41,7 @@ namespace WindowsFormsApplication1
|
|||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.SaveCharButton = new System.Windows.Forms.Button();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.openSpace = new System.Windows.Forms.PictureBox();
|
||||
this.SpriteNumberLabel = new System.Windows.Forms.Label();
|
||||
this.SpriteNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.OpenButton = new System.Windows.Forms.Button();
|
||||
|
@ -59,7 +60,6 @@ namespace WindowsFormsApplication1
|
|||
this.ButtonAddChar = new System.Windows.Forms.Button();
|
||||
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.openSpace = new System.Windows.Forms.PictureBox();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PictureBoxBackground)).BeginInit();
|
||||
this.panel2.SuspendLayout();
|
||||
|
@ -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
|
||||
//
|
||||
|
@ -209,6 +210,14 @@ namespace WindowsFormsApplication1
|
|||
this.panel3.TabIndex = 2;
|
||||
this.panel3.Visible = false;
|
||||
//
|
||||
// openSpace
|
||||
//
|
||||
this.openSpace.Location = new System.Drawing.Point(65, 206);
|
||||
this.openSpace.Name = "openSpace";
|
||||
this.openSpace.Size = new System.Drawing.Size(245, 55);
|
||||
this.openSpace.TabIndex = 17;
|
||||
this.openSpace.TabStop = false;
|
||||
//
|
||||
// SpriteNumberLabel
|
||||
//
|
||||
this.SpriteNumberLabel.AutoSize = true;
|
||||
|
@ -357,14 +366,6 @@ namespace WindowsFormsApplication1
|
|||
//
|
||||
this.openFileDialog1.FileName = "openFileDialog1";
|
||||
//
|
||||
// openSpace
|
||||
//
|
||||
this.openSpace.Location = new System.Drawing.Point(65, 206);
|
||||
this.openSpace.Name = "openSpace";
|
||||
this.openSpace.Size = new System.Drawing.Size(245, 55);
|
||||
this.openSpace.TabIndex = 17;
|
||||
this.openSpace.TabStop = false;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
|
@ -134,7 +134,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;
|
||||
|
@ -295,5 +298,16 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue