예제 #1
0
 //инициализировать настройки
 private void InitializeSettingOfDay(SettingShedule setting, Day day)
 {
     //с понедельника по пятницу и в выходные часы для проставления пар отличаются
     earlierPossibleHour     = (int)day <= (int)Day.Friday ? setting.FirstLessonsOfWeekDay : setting.FirstLessonsOfWeekEnd;
     lastPossibleHour        = (int)day <= (int)Day.Friday ? setting.LastLessonsOfWeekDay : setting.LastLessonsOfWeekEnd;
     maxPossibleCountLessons = (int)day <= (int)Day.Friday ? setting.MaxCountLessonsOfWeekDay : setting.MaxCountLessonsOfWeekEnd;
 }
예제 #2
0
 public ScheduleWeeks(List <ScheduleRoom> rooms, SettingShedule setting, DateTime firstDaySem, DateTime lastDaySem)
 {
     Rooms       = rooms;
     Setting     = setting;
     FirstDaySem = firstDaySem;
     LastDaySem  = lastDaySem;
     InitializeDays();
     Employments = new Employments();
     Employments.Clear();
 }
예제 #3
0
 public ScheduleGenerator(EducationLoadAdapter Adapter, List <ScheduleRoom> rooms,
                          SettingShedule Setting, DateTime firstDaySem, DateTime lastDaySem, Employments employments)
 {
     Rooms               = rooms;
     Shedule             = new ScheduleWeeks(Rooms, Setting, firstDaySem, lastDaySem);
     Employments         = employments;
     Shedule.Employments = Employments;
     LoadItemsAdapter    = Adapter;
     Shedule.Employments.ClearGeneratedLessons();
 }
예제 #4
0
 public ScheduleDay(Week week, Day day, IEnumerable <ScheduleRoom> rooms, SettingShedule setting, DateTime firstDate)
 {
     //times
     Week = week;
     Day  = day;
     //settings
     InitializeSettingOfDay(setting, day);
     //main
     InitializeDatesOfDay(firstDate, setting.CountWeeksShedule, setting.CountEducationalWeekBySem);
     Lessons = InitializeLessonsOfDay(rooms.ToList(), setting.CountLessonsOfDay, setting.FirstLessonsOfWeekDay).ToList();
 }
예제 #5
0
 /// <summary> обновить настройки у дня </summary>
 public void UpdateSetting(SettingShedule setting)
 {
     InitializeSettingOfDay(setting, this.Day);
 }