Ejemplo n.º 1
0
        /********************************************************************************
         *
         * Method: Back_Button_Click
         *
         * Arguments: object sender, EventArgs e
         *
         * Return Type: void
         *
         * Purpose: Saves the game upon going back.
         *
         * *******************************************************************************/
        private void Back_Button_Click(object sender, EventArgs e)
        {
            HD = new HardData();
            HD.hard_summation_matrix        = summation_matrix;
            HD.should_display_number        = should_display_number;
            HD.initially_displayed          = initially_displayed;
            HD.hard_right_edge              = right_edge;
            HD.hard_bottom_edge             = bottom_edge;
            HD.hard_custom_summation_matrix = custom_summation_matrix;
            HD.hard_custom_right_edge       = custom_right_edge;
            HD.hard_custom_bottom_edge      = custom_bottom_edge;
            Form1     form1     = new Form1(HD);
            Hard_Form Hard_Form = new Hard_Form(HD);

            form1.Show();
            this.Hide();
            Hard_Form.Close();
        }
Ejemplo n.º 2
0
        /********************************************************************************
         *
         * Method: Choose_Difficulty_Playing_Field
         *
         * Arguments: object sender, MouseEventArgs e
         *
         * Return Type: void
         *
         * Purpose: Chooses difficulty for the form to be pulled up.
         *
         * *******************************************************************************/
        private void Choose_Difficulty_Playing_Field(object sender, MouseEventArgs e)
        {
            Form1       form1    = new Form1();
            RadioButton EasyRB   = EasyRadioButton;
            RadioButton MediumRB = MediumRadioButton;
            RadioButton HardRB   = HardRadioButton;

            if (EasyRB.Checked)
            {
                InitializeEasyData();
                Easy_Form easy_Form = new Easy_Form(easyData1);
                easy_Form.Show();
                this.Hide();
                form1.Close();
            }
            else if (MediumRB.Checked)
            {
                InitializeMediumData();
                Medium_Form medium_Form1 = new Medium_Form(mediumData1);
                medium_Form1.Show();
                this.Hide();
                form1.Close();
            }
            else if (HardRB.Checked)
            {
                InitializeHardData();
                Hard_Form hard_Form = new Hard_Form(hardData1);
                hard_Form.Show();
                this.Hide();
                form1.Close();
            }
            else
            {
                MessageBox.Show("Select difficulty level.", "ERROR");
            }
        }