/******************************************************************************** * * Method: Backbutton_Click * * Arguments: object sender, EventArgs e * * Return Type: void * * Purpose: Creates a new Form1 instance, initializes a new Bar_Form instance, * closes the current form, and opens the main menu (Form1). * * *******************************************************************************/ private void Backbutton_Click(object sender, EventArgs e) { Form1 form1 = new Form1(); Bar_Form bar_Form = new Bar_Form(data_values_2017); form1.Show(); this.Hide(); bar_Form.Close(); }
/******************************************************************************** * * Method: BarForm_Closed * * Arguments: object sender, EventArgs e * * Return Type: void * * Purpose: Creates a new Form1 instance, initializes a new Bar_Form instance, * closes the current form, and opens the main menu (Form1). * * *******************************************************************************/ private void BarForm_Closed(object sender, FormClosedEventArgs e) { Form1 form1 = new Form1(); Bar_Form bar_Form = new Bar_Form(data_values_2017); form1.Show(); this.Hide(); bar_Form.Close(); }
/******************************************************************************** * * Method: BarButton_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 BarButton_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(); Bar_Form bar_Form = new Bar_Form(data_values_2017); bar_Form.Show(); this.Hide(); form1.Close(); }