Esempio n. 1
0
        public object Clone()
        {
            var obj = new TimeMap();

            obj.map = map.Clone() as int[, ];
            return(obj);
        }
Esempio n. 2
0
        public bool IsOverlap(ClassTime time)
        {
            var map = new TimeMap();

            map.Set(time);
            return(IsOverlap(map));
        }
Esempio n. 3
0
 public void Set(TimeMap timemap)
 {
     for (int w = 0; w < 7; w++)
     {
         for (int i = 0; i < 1440 / ClassTimeItem.periodSpan; i++)
         {
             map[w, i] += timemap.map[w, i];
         }
     }
 }
Esempio n. 4
0
        public static bool IsOverlap(TimeMap a, TimeMap b)
        {
            for (int i = 0; i < 7; i++)
            {
                for (int j = 0; j < 1440 / ClassTimeItem.periodSpan; j++)
                {
                    if (a.map[i, j] > 0 && b.map[i, j] > 0)
                    {
                        return(true);
                    }
                }
            }


            return(false);
        }
Esempio n. 5
0
 public bool IsOverlap(TimeMap target)
 {
     return(IsOverlap(this, target));
 }
Esempio n. 6
0
 public ScheduleMid()
 {
     infos   = new List <ClassInfoPlus>();
     timemap = new TimeMap();
 }