Beispiel #1
0
 private void HideAllCats()
 {
     LBL_Yellow.Hide();
     LBL_Green.Hide();
     LBL_Red.Hide();
     LBL_White.Hide();
     LBL_Blue.Hide();
 }
Beispiel #2
0
        private void BTN_Tourner_Click(object sender, EventArgs e)
        {
            EnableAnswers();
            Random r    = new Random();
            int    rInt = r.Next(0, 50); //for ints

            for (int i = 0; i < rInt; i++)
            {
                int j = r.Next(0, 5);
                if (j == 0)
                {
                    HideAllCats();
                    LBL_Green.Show();
                    if (i == rInt - 1)
                    {
                        ShowQuestion("V");
                    }
                }
                if (j == 1)
                {
                    HideAllCats();
                    LBL_Red.Show();
                    if (i == rInt - 1)
                    {
                        ShowQuestion("R");
                    }
                }
                if (j == 2)
                {
                    HideAllCats();
                    LBL_White.Font = new Font("Times New Roman", 12, FontStyle.Bold);
                    LBL_White.Show();
                    EnablePicBoxes();
                    MakeAllLabelsVisible();
                }
                if (j == 3)
                {
                    HideAllCats();
                    LBL_Blue.Show();
                    if (i == rInt - 1)
                    {
                        ShowQuestion("B");
                    }
                }
                if (j == 4)
                {
                    HideAllCats();
                    LBL_Yellow.Show();
                    if (i == rInt - 1)
                    {
                        ShowQuestion("J");
                    }
                }
            }
        }