/********************************************************************************
         *
         * Method: Backbutton_Click
         *
         * Arguments: object sender, EventArgs e
         *
         * Return Type: void
         *
         * Purpose: Creates a new Form1 instance, initializes a new Donut_Form instance,
         *          closes the current form, and opens the main menu (Form1).
         *
         * *******************************************************************************/
        private void Backbutton_Click(object sender, EventArgs e)
        {
            Form1      form1      = new Form1();
            Donut_Form donut_Form = new Donut_Form(data_values_2017);

            form1.Show();
            this.Hide();
            donut_Form.Close();
        }
        /********************************************************************************
         *
         * Method: DonutForm_Closed
         *
         * Arguments: object sender, EventArgs e
         *
         * Return Type: void
         *
         * Purpose: Creates a new Form1 instance, initializes a new Donut_Form instance,
         *          closes the current form, and opens the main menu (Form1).
         *
         * *******************************************************************************/
        private void DonutForm_Closed(object sender, FormClosedEventArgs e)
        {
            Form1      form1      = new Form1();
            Donut_Form donut_Form = new Donut_Form(data_values_2017);

            form1.Show();
            this.Hide();
            donut_Form.Close();
        }
Exemple #3
0
        /********************************************************************************
         *
         * Method: DonutButton_Click
         *
         * Arguments: object sender, EventArgs e
         *
         * Return Type: void
         *
         * Purpose: Reads only a subset of the data, passes it to a new form, closes Form1,
         *          and opens a new form.
         *
         * *******************************************************************************/
        private void DonutButton_Click(object sender, EventArgs e)
        {
            List <string> data_values_2017 = new List <string>();

            for (int i = 0; i < 48; i++)
            {
                if (i >= 36 && i < 48)
                {
                    data_values_2017.Add(data.ElementAt(i));
                }
            }

            Form1      form1      = new Form1();
            Donut_Form donut_Form = new Donut_Form(data_values_2017);

            donut_Form.Show();
            this.Hide();
            form1.Close();
        }