예제 #1
0
파일: Program.cs 프로젝트: alexkiro/Timr
        static void Main(string[] args)
        {
            Parser parser = new Parser();
            DateTime aa = DateTime.Now;
            List<TimetableItem> list = parser.GetTimetableForGroup(StudyYear.MIS1, HalfYear.None, "1");
            List<TimetableItem> list2 = parser.GetTimetableForYear(StudyYear.I1, HalfYear.B);
            List<TimetableItem> list3 = parser.GetTimetableForYear(StudyYear.MIS1);
            List<TimetableItem> list4 = parser.GetTimetableForYear(StudyYear.I2, HalfYear.B);
            List<TimetableItem> list5 = parser.GetTimetableForGroup(StudyYear.I3, HalfYear.B, "3");
            DateTime bb = DateTime.Now;
            Console.WriteLine((bb-aa).TotalMilliseconds);

            list.AddRange(list2);
            list.AddRange(list3);
            list.AddRange(list4);
            list.AddRange(list5);

            if (list != null)
            {
                foreach (var item in list)
                {
                    Console.WriteLine(item);
                }
            }
            Console.WriteLine(Exporter.ConvertToXML(list));
            Console.Read();
        }
예제 #2
0
 public List<TimetableItem> GetFullTimetable()
 {
     Parser parser = new Parser();
     List<TimetableItem> list = new List<TimetableItem>();
     list.AddRange(parser.GetTimetableForYear(StudyYear.I1, HalfYear.A));
     list.AddRange(parser.GetTimetableForYear(StudyYear.I1, HalfYear.B));
     list.AddRange(parser.GetTimetableForYear(StudyYear.I2, HalfYear.A));
     list.AddRange(parser.GetTimetableForYear(StudyYear.I2, HalfYear.B));
     list.AddRange(parser.GetTimetableForYear(StudyYear.I3, HalfYear.A));
     list.AddRange(parser.GetTimetableForYear(StudyYear.I3, HalfYear.B));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MIS1));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MIS2));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MLC1));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MLC2));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MOC1));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MOC2));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MSD1));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MSD2));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MSI1));
     list.AddRange(parser.GetTimetableForYear(StudyYear.MSI2));
     return list;
 }