public bool TryAdd(int Course, int Group, ref AllCourseCls AC)
 {
     if (!IsEmpty(Course, Group, ref AC))
     {
         return(false);
     }
     AddedItems.Add(new Course_GroupIndexCls(Course, Group));
     return(true);
 }
 public bool IsEmpty(int Course, int Group, ref AllCourseCls AC)
 {
     foreach (SpacetimeCls ST in AC.Course[Course].Group[Group].Spacetime)
     {
         if (!IsEmpty(ST.Day, ST.Period, ref AC))
         {
             return(false);
         }
     }
     return(true);
 }
 public bool IsEmpty(string Day, string Period, ref AllCourseCls AC)
 {
     for (int i = 0; i < AddedItems.Count; i++)
     {
         foreach (SpacetimeCls ST in AC.Course[AddedItems[i].Course].Group[AddedItems[i].Group].Spacetime)
         {
             if (ST.Day == Day)
             {
                 if (ST.Period == Period)
                 {
                     return(false);
                 }
             }
         }
     }
     return(true);
 }