Exemplo n.º 1
0
 public void addSubject(Subject subject)
 {
     if (!subjects.Contains(subject)) {
         foreach (QuestionCard c in subject.Cards){
             cards.Add(c.FlavourText, c);
         }
         subjects.Add(subject);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 /// <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();
 }
Exemplo n.º 4
0
 private bool checkForPresence(Subject s, QuestionCard c)
 {
     return s.checkForCard(c);
 }