Example #1
0
 private void TimerMensajes_Tick(object sender, EventArgs e)
 {
     try
     {
         Contador++;
         if (Contador == 1)
         {
             LblTextoCarga.Text = "Modificando.";
             LblTextoCarga.Left = (this.ClientSize.Width - LblTextoCarga.Width) / 2;
         }
         if (Contador == 2)
         {
             LblTextoCarga.Text = "Modificando..";
             LblTextoCarga.Left = (this.ClientSize.Width - LblTextoCarga.Width) / 2;
         }
         if (Contador == 3)
         {
             LblTextoCarga.Text = "Modificando...";
             LblTextoCarga.Left = (this.ClientSize.Width - LblTextoCarga.Width) / 2;
         }
         if (Contador == 4)
         {
             Contador = 0;
             TimerMensajes.Stop();
             TimerMensajes.Start();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #2
0
        private void CargaInicial_Load(object sender, EventArgs e)
        {
            try
            {
                circularProgressBar1.Value   = 0;
                circularProgressBar1.Minimum = 0;
                circularProgressBar1.Maximum = 500;
                TimerInicio.Start();
                TimerMensajes.Start();
                TimerCierre.Start();
            }

            catch (Exception ex)
            {
                this.Hide();
                MessageBox.Show("Error al intertar cargar datos. \r" + ex, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(0);
            }
        }