Esempio n. 1
0
        public HourPlan Clone()
        {
            var res = new HourPlan();

            res.GroupToTeacher = new Dictionary <int, int>(GroupToTeacher);
            res.TeacherToGroup = new Dictionary <int, int>(TeacherToGroup);

            return(res);
        }
Esempio n. 2
0
        /// <summary>
        /// Создание плана по списку пар
        /// </summary>
        public bool Init(List <Lessоn> pairs)
        {
            //if ()
            //{

            //}
            for (int i = 0; i < HoursPerDay; i++)
            {
                for (int j = 0; j < DaysPerWeek; j++)
                {
                    HourPlans[j, i] = new HourPlan();
                }
            }

            foreach (var p in pairs)
            {
                if (!AddToAnyDayAndHour(p.Group, p.Teacher))
                {
                    return(false);
                }
            }
            return(true);
        }