Exemplo n.º 1
0
        // start a new game, choose difficulty
        private void mni_NewGame_Click(object sender, EventArgs e)
        {
            Frm_Difficulty dia_Difficulty = new Frm_Difficulty();
            DialogResult   res            = dia_Difficulty.ShowDialog();

            if (res == DialogResult.OK)
            {
                Reference.Difficulty = dia_Difficulty.diff;
            }
            else
            {
                return;
            }

            setImage(Reference.currentImage);
            for (int i = 0; i < (int)Reference.Difficulty; i++)
            {
                pan_PuzzlePanel.Split();
            }
            pan_PuzzlePanel.Distribute();
        }
Exemplo n.º 2
0
        // start a new game, choose difficulty
        private void mni_NewGame_Click(object sender, EventArgs e)
        {
            Frm_Difficulty dia_Difficulty = new Frm_Difficulty();
            DialogResult res = dia_Difficulty.ShowDialog();
            if (res == DialogResult.OK)
            {
                Reference.Difficulty = dia_Difficulty.diff;
            }
            else
            {
                return;
            }

            setImage(Reference.currentImage);
            for (int i = 0; i < (int)Reference.Difficulty; i++)
            {
                pan_PuzzlePanel.Split();
            }
            pan_PuzzlePanel.Distribute();
        }