Example #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     timer1.Interval            = (int)txtFrecuencia.Value * 1000;
     Accion                     = eAcciones.Detener;
     btnAccion.Text             = eAcciones.Detener.ToString();
     notifyIcon1.BalloonTipText = string.Format("Se moverá el mouse cada {0} segundos.", txtFrecuencia.Value);
     this.WindowState           = FormWindowState.Minimized;
     timer1.Start();
 }
Example #2
0
 private void btnAccion_Click(object sender, EventArgs e)
 {
     if (Accion == eAcciones.Detener)
     {
         Accion                     = eAcciones.Iniciar;
         btnAccion.Text             = eAcciones.Iniciar.ToString();
         notifyIcon1.BalloonTipText = "El mouse no se moverá porque se encuentra detenido.";
         timer1.Stop();
     }
     else
     {
         Accion                     = eAcciones.Detener;
         btnAccion.Text             = eAcciones.Detener.ToString();
         notifyIcon1.BalloonTipText = string.Format("Se moverá el mouse cada {0} segundos.", timer1.Interval / 1000);
         timer1.Start();
     }
 }