Esempio n. 1
0
 public GameController()
 {
     build();
     difficultyChooser = new DifficultyChooser(this);
     difficultyChooser.Show();
     inputNumber = new InputNumber(this, gui);
     gui.setInputNumber(inputNumber);
     hintsRemaining = 0;
 }
Esempio n. 2
0
        //catchall for each of the box buttons, since they all work the same
        private void event_Click(object sender, EventArgs e)
        {
            Control button = (Control)sender;

            //only if the number in the box was placed in there by the user
            if (!notClickable.Contains(button))
            {
                //bring up the input number form and update its notes
                if (!iNum.IsDisposed)
                {
                    iNum.setNotes(gameController, button.Name.ToString());
                    iNum.resetFocus();
                    iNum.Show();
                }
                //if the user doesnt click go button and clicks X the iNum form is gone create a new one
                else
                {
                    iNum = new InputNumber(gameController, this);
                    iNum.setNotes(gameController, button.Name.ToString());
                    iNum.resetFocus();
                    iNum.Show();
                }
            }
        }
Esempio n. 3
0
        /*
         * //currently used for debugging
         * internal void write(string s)
         * {
         *  textBox1.Text += s;
         * }*/

        internal void setInputNumber(InputNumber inputNumber)
        {
            iNum = inputNumber;
        }