Beispiel #1
0
 /// <summary>
 /// Removes a class from the list of classes matching the specified class
 /// </summary>
 /// <param name="c">Class</param>
 public void removeCLass(Class c)
 {
     foreach (Class s in classes)
     {
         if (s.Equals(c))
         {
             classes.Remove(s);
             OnPropertyChanged("classes");
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// Adds a class to the list of classes
 /// </summary>
 /// <param name="c">Class</param>
 public void addClass(Class c)
 {
     classes.Add(c);
 }
        private void initiateSchedleOfClasses()
        {
            #region year1

            Year year1 = new Year(1);
            Year year2 = new Year(2);
            Year year3 = new Year(3);
            Year year4 = new Year(4);
            scheduleOfClasses.Add(year1);
            scheduleOfClasses.Add(year2);
            scheduleOfClasses.Add(year3);
            scheduleOfClasses.Add(year4);

            #endregion

            #region Mock Schedule Data
            int mockS = 1;
            foreach (Year y in scheduleOfClasses)
            {
                foreach (Quarter q in y.Quarters)
                {
                    Class c = new Class("class " + mockS, ClassStatus.CanBeTaken);
                    q.addClass(c);
                    listOfAllClasses.Add(c);
                    mockS++;
                    c = new Class("class " + mockS, ClassStatus.CanBeTaken);
                    q.addClass(c);
                    listOfAllClasses.Add(c);
                    mockS++;
                }
            }
            #endregion
        }