Beispiel #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (cont == 0)
     {
         dadopb.Image = WindowsFormsApplication1.Properties.Resources._1;
         dadopb.Refresh();
     }
     if (cont == 1)
     {
         dadopb.Image = WindowsFormsApplication1.Properties.Resources._2;
         dadopb.Refresh();
     }
     if (cont == 2)
     {
         dadopb.Image = WindowsFormsApplication1.Properties.Resources._3;
         dadopb.Refresh();
     }
     if (cont == 3)
     {
         dadopb.Image = WindowsFormsApplication1.Properties.Resources._4;
         dadopb.Refresh();
     }
     if (cont == 4)
     {
         dadopb.Image = WindowsFormsApplication1.Properties.Resources._5;
         dadopb.Refresh();
     }
     if (cont == 5)
     {
         dadopb.Image = WindowsFormsApplication1.Properties.Resources._6;
         dadopb.Refresh();
     }
     if (cont == 6)
     {
         dadito.TirarDado();
         dadopb = dadito.MostrarCara(dadopb);
         dadopb.Refresh();
         timer1.Enabled = false;
     }
     if (cont != 6)
     {
         cont++;
     }
     else
     {
         cont = 0;
     }
 }