Пример #1
0
        /// <summary>
        ///  opened de startgame form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void pictureBox1Speel_Click(object sender, EventArgs e)
        {
            this.pictureBox1Speel.BackgroundImage = (Bitmap)Properties.Resources.ResourceManager.GetObject("SpeelButtonGroen2D");
            await Task.Delay(300);

            this.pictureBox1Speel.BackgroundImage = (Bitmap)Properties.Resources.ResourceManager.GetObject("SpeelButtonGroen");
            FormStartgame startgame = new FormStartgame();

            startgame.ShowDialog();
        }
Пример #2
0
        /// <summary>
        /// Opened het de startgame form zodat je een nieuw spel kunt doen met andere instellingen
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void ButtonInstellingen_Click(object sender, EventArgs e)
        {
            this.pictureBoxInstellingen.BackgroundImage = (Bitmap)Properties.Resources.ResourceManager.GetObject("InstellingenButtonBlauwEndgame2D");
            await Task.Delay(300);

            this.pictureBoxInstellingen.BackgroundImage = (Bitmap)Properties.Resources.ResourceManager.GetObject("InstellingenButtonBlauwEndgame");
            if (BaseGame.Gamemode == 2)
            {
                GameMultiplayerOnline.Disconnect();
            }
            this.Close();
            this.Dispose();
            GC.Collect();
            BaseGame.Reset();
            FormStartgame startgame = new FormStartgame();

            startgame.ShowDialog();
        }