Esempio n. 1
0
        private void p2_Click(object sender, EventArgs e)
        {
            Panel p  = (Panel)sender;
            bool  ok = false;

            for (int i = 0; i < p.Controls.Count; i++)
            {
                if (p.Controls[i].Name.Substring(0, 1) == "l")
                {
                    if (p.Controls[i].Text == searchmaths.SearchProp.rep)
                    {
                        ok = true; p.BackColor = Color.Green;
                    }
                }
            }
            if (p1 != p)
            {
                p1.BackColor = Color.DimGray; l1.Text = "";
            }
            if (p2 != p)
            {
                p2.BackColor = Color.DimGray; l2.Text = "";
            }
            if (p3 != p)
            {
                p3.BackColor = Color.DimGray; l3.Text = "";
            }
            if (p4 != p)
            {
                p4.BackColor = Color.DimGray; l4.Text = "";
            }
            counter++;
            if (ok == true)
            {
                correct++;
            }
            else
            {
                p.BackColor = Color.Red;
            }
            if ((counter == 5) && (correct > 2))
            {
                pTermineniv.Show();
                pTermineniv.BringToFront();
                if (searchmaths.SearchProp.niveau == "1")
                {
                    lniv1termine.Show(); Continue.Show(); Continue.Text = "Niveau2";
                }
                else if (searchmaths.SearchProp.niveau == "2")
                {
                    lniv1termine.Hide(); lniv2termine.Show(); Continue.Hide();
                }
            }
            else
            {
                Suivant.Show();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Metoda RefreshMenu obnovuje Form1 a zobrazí tlačítko "Pokračovat", pokud zjistí přítomnost uložené hry.
 /// </summary>
 public void RefreshMenu()
 {
     if (File.Exists("./lehka/pokracovani.txt"))
     {
         AlreadyLoaded = false;
         Continue.Show();
         Continue.Click += new EventHandler(Continue_Click);
     }
     else
     {
         Continue.Hide();
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Tato metoda se zavolá při kliknutí na tlačítko "Pokračovat". Pokud je to její první zavolání, načte uloženou hru. Metoda vždy nastaví parametr AlreadyLoaded na true, aby se už podruhé nepokoušela o načtení uložené hry.
        /// </summary>
        /// <param name="sender">Obsahuje data o objektu, který událost vyvolal.</param>
        /// <param name="e">Obsahuje informace o události.</param>
        private void Continue_Click(object sender, EventArgs e)
        {
            if (!AlreadyLoaded)
            {
                Sudoku = new Sudoku();

                Sudoku.LoadDirectory("pokracovani");
                Sudoku.Text = "Sudoku pokračování";
                Sudoku.Show();
                Continue.Hide();
            }

            AlreadyLoaded = true;
        }
Esempio n. 4
0
        private void choice_made_1()
        {
            this.BackgroundImage = Properties.Resources.hiding;
            story_box.Text       = "Since you decided to run and hide you decided that the best place was to hide in your walking closet which had nothing but a couple of knives." + "\nAs you here Zombies break in you hear a loud truck come blast through the wall" +
                                   "\nAnd you here your name and yell out here and it was your friends who are armed to the teeth. They asked you do you have your bugout bag and you reply No." + "So you end up getting it" +
                                   "as you hope in the back you decide to check the bag and realized some of your equipment is broken and missing because you were in a rush";
            choice_Button.Hide();
            Continue.Hide();

            Program.inventoryList2.Add("Bullet Proof Vest");
            Program.inventoryList2.Add("1 Ruger AR-556 5.56 Semiautomatic Rifle, with 90 rounds of 5.56 NATO\n " +
                                       " AR Attachments: \n" +
                                       "       Sights: 45 Degree AR-15 Transition Sight combo with Red dot sight\n" +
                                       "       FAB Defense Quick Release Vertical Foregrip "
                                       );
            Program.inventoryList2.Add("Tool Kit");
        }