public void addSubject(Subject subject) { if (!subjects.Contains(subject)) { foreach (QuestionCard c in subject.Cards){ cards.Add(c.FlavourText, c); } subjects.Add(subject); } }
public void removeSubject(Subject subject) { if (subjects.Contains(subject)) { foreach (QuestionCard c in cards.Values) { if (checkForPresence(subject, c)) { cards.Remove(c.FlavourText); } } subjects.Remove(subject); } }
/// <summary> /// Creates a blank subject and loads it into memory, replacing the currently loaded subject. /// </summary> public static void newSubject() { refreshMainWindow(); Subject blankSubject = new Subject(); RuntimeData.CurrentlyLoadedSubject = blankSubject; RuntimeData.UnsavedChanges = false; notify(); }
private bool checkForPresence(Subject s, QuestionCard c) { return s.checkForCard(c); }