예제 #1
0
 private static DateTime GetFirstMaxHour(LineUp lineUp)
 {
     foreach (Optreden optreden in Festival.SingleFestival.Optredens)
     {
         if (optreden.LineUp == lineUp)
         {
             return(optreden.Until);
         }
     }
     return(DateTime.Now);
 }
예제 #2
0
        public static DateTime GetMaxHourByLineUp(LineUp lineUp)
        {
            if (Festival.SingleFestival.Stages.Count <= 0)
            {
                return(DateTime.Now);
            }
            DateTime max = GetFirstMaxHour(lineUp);

            foreach (Optreden optreden in Festival.SingleFestival.Optredens)
            {
                if (optreden.LineUp == lineUp && optreden.Until > max)
                {
                    max = optreden.Until;
                }
            }
            //DateTime min = Stages[0].MinHour;
            //foreach (Stage stage in Stages)
            //    if (stage.MinHour < min) min = stage.MinHour;

            return(new DateTime(max.Year, max.Month, max.Day, max.Hour, 0, 0).AddHours(1));
        }
예제 #3
0
        public static DateTime GetMinHourByLineUp(LineUp lineUp)
        {
            if (Festival.SingleFestival.Stages.Count <= 0)
            {
                return(DateTime.Now);
            }
            DateTime min = GetFirstMinHour(lineUp);

            foreach (Optreden optreden in Festival.SingleFestival.Optredens)
            {
                if (optreden.LineUp == lineUp && optreden.From < min)
                {
                    min = optreden.From;
                }
            }
            //DateTime min = Stages[0].MinHour;
            //foreach (Stage stage in Stages)
            //    if (stage.MinHour < min) min = stage.MinHour;

            return(new DateTime(min.Year, min.Month, min.Day, min.Hour, 0, 0));
        }