示例#1
0
 public void Close()
 {
     id--;
     MyProgressBar.id--;
     timers.Del();
     form.Controls.Remove(progressBar);
     form.Controls.Remove(this);
     progressBar.Dispose();
     progressBar = null;
     timers      = null;
     this.Dispose();
 }
示例#2
0
 public MyTextBox(MyForm form)
 {
     this.form   = form;
     progressBar = new MyProgressBar(form);
     timers      = new MyTimers(form, progressBar, this);
     Name        = "textBox" + id;
     Size        = new Size(76, 22);
     TabIndex    = 5;
     KeyDown    += new KeyEventHandler(KeyDownHandler);
     Location    = new Point(9, 10 + 22 * id);
     form.Controls.Add(this);
     Focus();
     id++;
 }