Beispiel #1
0
        private void btDetener_Click(object sender, EventArgs e)
        {
            //Solicita al Reloj que se detenga
            Reloj.Stop();

            //Habilitar botones de iniciar y de acciones
            btIniciar.Enabled    = true;
            btAcciones.Enabled   = true;
            txFrecuencia.Enabled = true;

            btDetener.Enabled = false;
        }
 private void CompartirButton_Click(object sender, EventArgs e)
 {
     if (CompartirButton.ButtonText.StartsWith("Transmitir"))
     {
         Reloj.Start();
         CompartirButton.ButtonText = "Dejar de Transmitir";
     }
     else
     {
         Reloj.Stop();
         CompartirButton.ButtonText = "Transmitir Pantalla";
     }
 }
Beispiel #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (automatico)
     {
         button2.Text = "Iniciar Simulación Automatica";
         Reloj.Stop();
         automatico = false;
     }
     else
     {
         //que me avise cada 1000 milisegundos
         try
         {
             Reloj.Interval = Convert.ToInt32(Convert.ToDouble(tiempoBox.Text) * 1000);
             Reloj.Start();
             button2.Text = "Parar Simulacion Automatica";
             automatico   = true;
         }
         catch (FormatException)
         {
             MessageBox.Show("Datos no introducidos");
         }
     }
 }