/// <summary> /// This function views the courses controller. /// </summary> private void ViewCourses() { if (m_ucCourses == null) { // Since StudentProfile is static class, directly access it from children classes instead. m_ucCourses = new StudentCourseUC(this); m_ucCourses.Dock = DockStyle.Fill; contentPanel.Controls.Add(m_ucCourses); } m_ucCourses.BringToFront(); }
/// <summary> /// This function initializes all the controllers namely /// dashbaord, courses, and appointments. /// </summary> private void InitializeAllTabs() { m_ucDashboard = new StudentDashboardUC(this); m_ucDashboard.Dock = DockStyle.Fill; m_ucCourses = new StudentCourseUC(this); m_ucCourses.Dock = DockStyle.Fill; m_ucAppointments = new AppointmentControl(this, true); m_ucAppointments.Dock = DockStyle.Fill; /// Adds all the initialized contollers to the panel. contentPanel.Controls.Add(m_ucDashboard); contentPanel.Controls.Add(m_ucCourses); contentPanel.Controls.Add(m_ucAppointments); }