示例#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;
     }
 }
示例#2
0
 private void Timer2_Tick(object sender, EventArgs e)
 {
     try
     {
         this.Opacity -= 0.1;
         if (this.Opacity == 0)
         {
             TimerCierre.Stop();
             if (response != "")
             {
                 TimerMensajes.Stop();
                 TimerInicio.Stop();
                 this.Close();
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }