Exemplo n.º 1
0
 public MyTimers(MyForm form, MyProgressBar myProgres, TextBox textBox)
 {
     this.form       = form;
     progressBar     = myProgres;
     tb              = textBox;
     timer1          = new Timer(form.components);
     timer2          = new Timer(form.components);
     timer1.Interval = 1000;
     timer1.Tick    += new EventHandler(Timer1_Tick);
     timer2.Tick    += new EventHandler(Timer2_Tick);
 }
Exemplo n.º 2
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();
 }
Exemplo n.º 3
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++;
 }