コード例 #1
0
        private void TimerInicio_Tick(object sender, EventArgs e)
        {
            segundos++;

            if (segundos == 3)
            {
                foreach (Control control in Table.Controls)
                {
                    Label iconLabel = control as Label;
                    iconLabel.ForeColor = iconLabel.BackColor;
                }

                TimerInicio.Stop();
            }
        }
コード例 #2
0
        private void IniciarJogo()
        {
            foreach (Control control in Table.Controls)
            {
                Label iconLabel = control as Label;

                if (iconLabel != null)
                {
                    if (icons.Count > 0)
                    {
                        int randomNumber = random.Next(icons.Count);
                        iconLabel.Text = icons[randomNumber];
                        icons.RemoveAt(randomNumber);
                    }
                }
            }

            TimerInicio.Start();
        }
コード例 #3
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);
            }
        }
コード例 #4
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;
     }
 }
コード例 #5
0
        private void Timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                if (this.Opacity < 1)
                {
                    this.Opacity += 0.05;                   //Opacity trabaja en procentaje 1 es 100%
                }
                circularProgressBar1.Value += 1;

                if (circularProgressBar1.Value == 500)
                {
                    circularProgressBar1.Value = 0;
                    TimerInicio.Stop();
                    TimerInicio.Start();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }