Ejemplo n.º 1
0
 private void startGame_Click(object sender, EventArgs e)
 {
     startGame.Visible = false;
     if (puzzleGame != null)
     {
         if (firstRound)
         {
             DialogResult dialogResult = MessageBox.Show("Are you sure you want end this game?", "New Game", MessageBoxButtons.YesNo);
             if (dialogResult == DialogResult.Yes)
             {
                 puzzleGame.DisposePuzzles();
                 puzzleGame = new RunPuzzlesGame(this, mainPicture);
                 puzzleGame.Start();
                 autoConstruct.Enabled = true;
             }
             else if (dialogResult == DialogResult.No)
             {
             }
         }
         else
         {
             puzzleGame.DisposePuzzles();
             puzzleGame = new RunPuzzlesGame(this, mainPicture);
             puzzleGame.Start();
             autoConstruct.Enabled = true;
         }
     }
     else
     {
         puzzleGame = new RunPuzzlesGame(this, mainPicture);
         puzzleGame.Start();
         autoConstruct.Enabled = true;
     }
 }
Ejemplo n.º 2
0
 public void ChangePicture()
 {
     DialogResult dialogResult = MessageBox.Show("Are you sure you want change picture and end this game ?", "ChangePicture", MessageBoxButtons.YesNo);
     if (dialogResult == DialogResult.Yes)
     {
         puzzleGame.DisposePuzzles();
         puzzleGame = null;
         firstRound = false;
         mainPicture_Click(new object(), new EventArgs());
         startGame.Visible = true;
         autoConstruct.Enabled = false;
     }
     else if (dialogResult == DialogResult.No)
     {
     }
 }
Ejemplo n.º 3
0
        public void ChangePicture()
        {
            DialogResult dialogResult = MessageBox.Show("Are you sure you want change picture and end this game ?", "ChangePicture", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                puzzleGame.DisposePuzzles();
                puzzleGame = null;
                firstRound = false;
                mainPicture_Click(new object(), new EventArgs());
                startGame.Visible     = true;
                autoConstruct.Enabled = false;
            }
            else if (dialogResult == DialogResult.No)
            {
            }
        }
Ejemplo n.º 4
0
 private void startGame_Click(object sender, EventArgs e)
 {
     startGame.Visible = false;
     if (puzzleGame != null)
     {
         if (firstRound)
         {
             DialogResult dialogResult = MessageBox.Show("Are you sure you want end this game?", "New Game", MessageBoxButtons.YesNo);
             if (dialogResult == DialogResult.Yes)
             {
                 puzzleGame.DisposePuzzles();
                 puzzleGame = new RunPuzzlesGame(this, mainPicture);
                 puzzleGame.Start();
                 autoConstruct.Enabled = true;
             }
             else if (dialogResult == DialogResult.No)
             {
             }
         }
         else
         {
             puzzleGame.DisposePuzzles();
             puzzleGame = new RunPuzzlesGame(this, mainPicture);
             puzzleGame.Start();
             autoConstruct.Enabled = true;
         }
     }
     else
     {
         puzzleGame = new RunPuzzlesGame(this, mainPicture);
         puzzleGame.Start();
         autoConstruct.Enabled = true;
     }
 }