예제 #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;
 }