Ejemplo n.º 1
0
        // ============================ //

        public EndGameDialog(Form callingForm)
        {
            mainForm = callingForm as NewGame;
            // inicijaliziraj ja null instancata od formata NewGame na povikuvackata forma, koja se tretira soodvetno kako NewGame instanca
            InitializeComponent();
            Cursor.Show();
            this.ControlBox = false;

            lbHighscoreBeaten.Hide();
            pictureBox1.Hide();

            checkHighScore();
        }
Ejemplo n.º 2
0
        private void validate()
        {
            if (tbGamertag.Text.Length == 0)
            {
                errorProvider1.SetError(tbGamertag, "Gamertag required.");
                return;
            }

            gamertag = tbGamertag.Text;
            if (checkDatabase(gamertag) == false)
            {
                Player player = new Player(gamertag, 0);
                writeToDatabase(player);
                highScore = 0;
            }

            Cursor.Hide();

            NewGame newGameDialog = new NewGame(this);

            newGameDialog.Show();
        }