//[FUNCTION - MainToResultButton_Click] //Shows popup once a "Add Course" button is clicked private void AddCourseButton_Click(object sender, EventArgs e) { if (!popUpCreated) { CourseAddPopup = new AddCourseForm(this); CourseAddPopup.ShowDialog(); popUpCreated = true; } else { CourseAddPopup.TryAddingCourse(); CourseAddPopup.Show(); } }
//[FUNCTION - AddCourseButton_Click] //Shows popup once a "Add Course" button is clicked private void AddCourseButton_Click(object sender, EventArgs e) { if (!popUpCreated) { RefToCourseAddPopup = new AddCourseForm(this); RefToCourseAddPopup.ShowDialog(); popUpCreated = true; } else { if (RefToCourseAddPopup.getFilteredCourses().Count() != 0) { RefToCourseAddPopup.TryAddingCourse(); } RefToCourseAddPopup.Show(); } }