Example #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)
        {
            int currentStartTime = MD.startTime;

            MD           = new MediumData();
            MD.startTime = currentStartTime;
            MD.medium_summation_matrix        = summation_matrix;
            MD.should_display_number          = should_display_number;
            MD.initially_displayed            = initially_displayed;
            MD.medium_right_edge              = right_edge;
            MD.medium_bottom_edge             = bottom_edge;
            MD.medium_custom_summation_matrix = custom_summation_matrix;
            MD.medium_custom_right_edge       = custom_right_edge;
            MD.medium_custom_bottom_edge      = custom_bottom_edge;
            Form1       form1       = new Form1(MD);
            Medium_Form medium_Form = new Medium_Form(MD);

            form1.Show();
            this.Hide();
            medium_Form.Close();
        }
Example #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");
            }
        }