Esempio n. 1
0
        private bool CanBeAdded(ScheduleEntry pInterval)//para ser agregado
        {
            bool lResult = true;
            int  i       = this.TimeIntervals.Count - 1;

            while ((lResult == true) && (i >= 0))
            {
                ScheduleEntry lInterval = this.TimeIntervals[i];
                if (pInterval.IntersectsWith(lInterval))
                {
                    lResult = false;
                }
                i--;
            }
            return(lResult);
        }
Esempio n. 2
0
        private bool HasEqualTimeIntervals(Schedule pInterval)
        {
            bool lResult = false;
            int  i       = this.TimeIntervals.Count - 1;

            while ((lResult == false) && (i >= 0))
            {
                ScheduleEntry pTimeInterval = this.TimeIntervals[i];
                int           j             = pInterval.ActiveHours.Count() - 1;
                while ((lResult == false) && (j >= 0))
                {
                    lResult = pTimeInterval.IntersectsWith(pInterval.ActiveHours.ElementAt(j));
                    j--;
                }
                i--;
            }
            return(lResult);
        }
Esempio n. 3
0
 private bool CanBeAdded(ScheduleEntry pInterval)//para ser agregado
 {
     bool lResult = true;
     int i = this.TimeIntervals.Count - 1;
     while ((lResult == true) && (i >= 0))
     {
         ScheduleEntry lInterval = this.TimeIntervals[i];
         if (pInterval.IntersectsWith(lInterval))
         {
             lResult = false;
         }
         i--;
     }
     return lResult;
 }