示例#1
0
 public DelButton(MyForm form1, MyTextBox textBox)
 {
     id++;
     buttons.Add(this);
     form         = form1;
     this.textBox = textBox;
     DelButton_Initiate();
 }
示例#2
0
        private void DelButton_Click(object sender, EventArgs e)
        {
            form.Height -= 22;
            for (int i = buttons.IndexOf(this) + 1; i < buttons.Count; i++)
            {
                buttons[i].textBox.Up();
                buttons[i].Location = new System.Drawing.Point(buttons[i].Location.X, buttons[i].Location.Y - 22);
            }
            id--;


            textBox.Close();
            form.Controls.Remove(this);
            buttons.Remove(this);
            textBox = null;
            System.GC.Collect();
        }
示例#3
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     form.Height += 22;
     textBox      = new MyTextBox(form);
     new DelButton(form, textBox);
 }
示例#4
0
 public AlarmGears(MyTextBox textBox)
 {
     this.textBox = textBox;
 }