Exemple #1
0
        /********************************************************************************
         *
         * Method: LineButton_Click
         *
         * Arguments: object sender, EventArgs e
         *
         * Return Type: void
         *
         * Purpose: Reads the entire set of data from the file, passes it to a new form,
         *          closes Form1, and opens a new form.
         *
         * *******************************************************************************/
        private void LineButton_Click(object sender, EventArgs e)
        {
            List <string> data_values_2014 = new List <string>();
            List <string> data_values_2015 = new List <string>();
            List <string> data_values_2016 = new List <string>();
            List <string> data_values_2017 = new List <string>();

            for (int i = 0; i <= data.Count - 1; i++)
            {
                if (i < 12)
                {
                    data_values_2014.Add(data.ElementAt(i));
                }
                else if (i >= 12 && i < 24)
                {
                    data_values_2015.Add(data.ElementAt(i));
                }
                else if (i >= 24 && i < 36)
                {
                    data_values_2016.Add(data.ElementAt(i));
                }
                else
                {
                    data_values_2017.Add(data.ElementAt(i));
                }
            }

            Form1     form1     = new Form1();
            Line_Form line_Form = new Line_Form(data_values_2014, data_values_2015, data_values_2016, data_values_2017);

            line_Form.Show();
            this.Hide();
            form1.Close();
        }
Exemple #2
0
        /********************************************************************************
         *
         * Method: Backbutton_Click
         *
         * Arguments: object sender, EventArgs e
         *
         * Return Type: void
         *
         * Purpose: Creates a new Form1 instance, initializes a new Line_Form instance,
         *          closes the current form, and opens the main menu (Form1).
         *
         * *******************************************************************************/
        private void Backbutton_Click(object sender, EventArgs e)
        {
            Form1     form1     = new Form1();
            Line_Form line_Form = new Line_Form(data_values_2014, data_values_2015, data_values_2016, data_values_2017);

            form1.Show();
            this.Hide();
            line_Form.Close();
        }
Exemple #3
0
        /********************************************************************************
         *
         * Method: LineForm_Closed
         *
         * Arguments: object sender, EventArgs e
         *
         * Return Type: void
         *
         * Purpose: Creates a new Form1 instance, initializes a new Line_Form instance,
         *          closes the current form, and opens the main menu (Form1).
         *
         * *******************************************************************************/
        private void LineForm_Closed(object sender, FormClosedEventArgs e)
        {
            Form1     form1     = new Form1();
            Line_Form line_Form = new Line_Form(data_values_2014, data_values_2015, data_values_2016, data_values_2017);

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