private List <Course> getClasses() { List <Course> coursesToAdd = new List <Course>(); ClassSelectorWindow csWindow = new ClassSelectorWindow(this.loader); bool?dialogResult = csWindow.ShowDialog(); switch (dialogResult) { case true: coursesToAdd = csWindow.selectedCourses(); break; case false: break; default: break; } return(coursesToAdd); }
private void Prereqs_Selector_Button(object sender, RoutedEventArgs e) { ClassSelectorWindow csWindow = new ClassSelectorWindow(this.loader); bool?dialogResult = csWindow.ShowDialog(); switch (dialogResult) { case true: if (prereqs == null) { prereqs = csWindow.selectedCourses(); } else { prereqs.AddRange(csWindow.selectedCourses()); } break; case false: break; default: break; } listOfPrereqs.Text = ""; if (prereqs != null) { for (int i = 0; i < prereqs.Count; i++) { if (i == prereqs.Count - 1) { listOfPrereqs.Text += prereqs[i].courseNumber; } else { listOfPrereqs.Text += prereqs[i].courseNumber + ", "; } } } }