示例#1
0
 //[FUNCTION - CourseReselectionButton_Click]
 //Closes schedule select form and goes back course select form after buttton "Reselect Courses" click
 private void CourseReselectionButton_Click(object sender, EventArgs e)
 {
     isOptimized = false;
     RefToCourseSelectForm.setIsOptimizationState(false);
     ChangeOptimizationText();
     RefToCourseSelectForm.Show();
     Debug.WriteLine("CourseSelect Form Shown");
     this.Hide(); //(revise because form cannot be closed - open forms from main program)
 }
        private void SelectScheduleButton_Click(object sender, EventArgs e)
        {
            List <bool> canOptimize = new List <bool>(allCB.Count() - 1);

            foreach (var checkBox in allCB)
            {
                if (checkBox.Checked == true)
                {
                    canOptimize.Add(false);
                }
                else
                {
                    canOptimize.Add(true);
                }
            }
            RefToCourseSelectForm.Show();
            RefToLoadResultsForm.Hide();
            this.Hide();
            RefToCourseSelectForm.setIsFirstCalculationState(true);
            RefToCourseSelectForm.setIsOptimizationState(true);
            RefToCourseSelectForm.ChooseOptimizationCourses(canOptimize, oldSchedule, RefToLoadResultsForm);
        }