/// <summary> /// Open a new course list window if not open; focus the window if open. /// </summary> /// <param name="sender">Target control that invoked this event</param> /// <param name="e">Arguments passed to this event</param> private void viewCoursesButton_Click(object sender, EventArgs e) { if (coursesWindow != null) { coursesWindow.Focus(); } else { coursesWindow = new CourseListForm(this); coursesWindow.Show(); } }
/// <summary> /// Clear the reference to the currently open course list window. /// </summary> public void ClearCoursesWindow() { coursesWindow = null; }