예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }