Example #1
0
        public journal(int new_index_of_current_group,int index_of_new_subject, int index_of_new_teacher,
            string new_topic, date new_date)
        {
            index_of_current_subject = index_of_new_subject;
            index_of_current_group = new_index_of_current_group;
            current_lesson.current_teacher = all_teachers.names[index_of_new_teacher];
            current_lesson.current_topic = new_topic;
            current_lesson.date_of_lesson = new_date;

            Directory.CreateDirectory(@"all_groups\" + all_groups[index_of_current_group].name_of_group
                + @"\all_lessons\" + all_subjects.names[index_of_new_subject]);
            DirectoryInfo current_dir_info = new DirectoryInfo(@"all_groups\" + 
                all_groups[index_of_current_group].name_of_group
                + @"\all_lessons\" + all_subjects.names[index_of_new_subject]);
            XmlSerializer our_serializer = new XmlSerializer(typeof(lesson));
            foreach (FileInfo current_file_info in current_dir_info.GetFiles())
            {
                XmlReader reader_for_lessons = XmlReader.Create(current_file_info.FullName, settings);
                previous_lessons.Add((lesson)our_serializer.Deserialize(reader_for_lessons));
                reader_for_lessons.Close();
            }
        }
Example #2
0
 public lesson (string new_topic, string new_teacher,date new_date)
 {
     current_topic = new_topic;
     current_teacher = new_teacher;
     date_of_lesson = new_date;
 }