Example #1
0
        public void Win()
        {
            if (levelconter == 1)
            {
                level = "02";
                lives = 3;
                LoadLevel();
                levelconter++;
                gameTimer.Enabled = true;
            }
            else if (levelconter == 2)
            {
                level = "03";
                lives = 3;
                LoadLevel();
                levelconter++;
            }
            else if (levelconter == 3)
            {
                Form form = this.FindForm();

                WinnerScreen ws = new WinnerScreen();

                ws.Location = new Point((form.Width - ws.Width) / 2, (form.Height - ws.Height) / 2);

                form.Controls.Add(ws);
                form.Controls.Remove(this);
            }
        }
Example #2
0
        public void Win()
        {
            Form form = this.FindForm();

            WinnerScreen ws = new WinnerScreen();

            ws.Location = new Point((form.Width - ws.Width) / 2, (form.Height - ws.Height) / 2);

            form.Controls.Add(ws);
            form.Controls.Remove(this);
        }