Example #1
0
        private void BackgroundWorkerCourses_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            //Shows course selection form after calculation is complete
            CourseSelectionForm CourseSelection = new CourseSelectionForm(this);

            this.Hide();
            CourseSelection.ShowDialog();
        }
        //[FUNCTION - InputToMainButton_Click]
        //Performs actions designated for "InputToMainButton" button click
        private void InputToMainButton_Click(object sender, EventArgs e)
        {
            if (checkImputCompletion())
            {
                //Removes all imput error labels
                FirstNameNeedLabel.Visible = false;
                LastNameNeedLabel.Visible  = false;
                TermNeedLabel.Visible      = false;

                //Gathers all input into userData object
                userData.firstName = FirstNameTextBox.Text;
                userData.lastName  = LastNameTextBox.Text;
                if (TermComboBox.Text == "Fall")
                {
                    userData.termInterest = "FA";
                }
                else if (TermComboBox.Text == "Spring")
                {
                    userData.termInterest = "SP";
                }
                else
                {
                    userData.termInterest = "JA";
                }

                ReadExcelData();

                //Shows course selection form
                CourseSelectionForm CourseSelection = new CourseSelectionForm(this);
                this.Hide();
                CourseSelection.ShowDialog();
            }
            else
            {
                displayInputErrors();
            }
        }