/// <summary>
        /// What happens when the user clicks the search button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SearchButton_Click(object sender, EventArgs e)
        {
            this.AvailableCourseView.ResetToDefault();
            int startTime, endTime;

            if (timeCheckbox.Checked)
            {
                startTime = startTimePicker.Value.TimeOfDay.Hours * 100 + startTimePicker.Value.TimeOfDay.Minutes;
                endTime   = endTimePicker.Value.TimeOfDay.Hours * 100 + endTimePicker.Value.TimeOfDay.Minutes;
            }
            else
            {
                startTime = -1;
                endTime   = -1;
            }

            List <AvailableCourse> courses =
                HttpRequester.Default.SearchForCourses(termComboBox.Text, PrefixTextBox.Text, CourseNumTextBox.Text, IlnTextBox.Text, startTime, endTime, (int)slotsUpDown.Value,
                                                       (FullAvailableCourseResponse res) =>
            {
                if (res.errorCode != null)
                {
                    GeneralUtil.ShowError(res);
                    return(false);
                }

                if (res.classes == null)
                {
                    MessageBox.Show("No classes found that match criteria.");
                    return(false);
                }

                return(true);
            });

            if (courses != null)
            {
                AvailableCourseView.SetCourses(courses);
                AvailableCourseView.Refresh();
            }
        }
 /// <summary>
 /// What happens when the user clicks on the AvailableCourseView
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AvailableCourseView_Click(object sender, EventArgs e)
 {
     AvailableCourseView.OnClickEvent(e);
 }