//инициализировать настройки 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; }
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(); }
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(); }
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(); }
/// <summary> обновить настройки у дня </summary> public void UpdateSetting(SettingShedule setting) { InitializeSettingOfDay(setting, this.Day); }