public void UnpinCourse(Course course) { if (PinnedCourses.Contains(course) == true) { PinnedCourses.Remove(course); } UpdateDisplay(); }
public void PinCourse(Course course) { if (PinnedCourses.Contains(course) == false) { PinnedCourses.Add(course); } UpdateDisplay(); }
private void UpdateDisplay() { // Clear TimetableGrid.Children.Clear(); // Show pineed courses foreach (Course course in PinnedCourses) { AddCourseToDisplay(course); } // Show displaying course if not already shown if (DisplayingCourse != null && PinnedCourses.Contains(DisplayingCourse) == false) { AddCourseToDisplay(DisplayingCourse); } }