private void initCursusINFDLM1()
        {
            cursus = new Cursus(2016, "inf dlm", 3);

            List<StudyYear> studyYears = new List<StudyYear>();
            studyYears.Add(new StudyYear(2013));
            studyYears.Add(new StudyYear(2014));
            studyYears.Add(new StudyYear(2015));

            cursus.StudyYears = studyYears;

            Module m1 = new Module("Sciences IA");
            Module m2 = new Module("Sciences IB");
            Module m3 = new Module("Programmation I");

            studyYears.ElementAt(0).Modules.Add(m1);
            studyYears.ElementAt(0).Modules.Add(m2);
            studyYears.ElementAt(0).Modules.Add(m3);

            Lecture l1_1 = new Lecture("Math IA", 3);
            Lecture l1_2 = new Lecture("Physique IA", 2);
            m1.Lectures.Add(l1_1);
            m1.Lectures.Add(l1_2);

            Lecture l2_1 = new Lecture("Math IB", 5);
            Lecture l2_2 = new Lecture("Physique IB", 3);
            Lecture l2_3 = new Lecture("Labo Physique IB", 2);
            m2.Lectures.Add(l2_1);
            m2.Lectures.Add(l2_2);
            m2.Lectures.Add(l2_3);

            Lecture l3_1 = new Lecture("Langage C", 3);
            Lecture l3_2 = new Lecture("Langage C++", 3);
            Lecture l3_3 = new Lecture("Algo I", 4);
            Lecture l3_4 = new Lecture("Assembleur", 2);
            m3.Lectures.Add(l3_1);
            m3.Lectures.Add(l3_2);
            m3.Lectures.Add(l3_3);
            m3.Lectures.Add(l3_4);

            Grade g1_1 = new Grade(4, 1);
            Grade g1_2 = new Grade(5, 1);
            Grade g1_3 = new Grade(5, 1);
            l1_1.Grades.Add(g1_1);
            l1_1.Grades.Add(g1_2);
            l1_1.Grades.Add(g1_3);

            Grade g2_1 = new Grade(5, 1);
            Grade g2_2 = new Grade(5.5, 1);
            Grade g2_3 = new Grade(4, 1);
            l1_2.Grades.Add(g2_1);
            l1_2.Grades.Add(g2_2);
            l1_2.Grades.Add(g2_3);

            Grade g3_1 = new Grade(4, 1);
            Grade g3_2 = new Grade(4.2, 1);
            Grade g3_3 = new Grade(4.8, 0.5);
            Grade g3_4 = new Grade(4.6, 0.5);
            l2_1.Grades.Add(g3_1);
            l2_1.Grades.Add(g3_2);
            l2_1.Grades.Add(g3_3);
            l2_1.Grades.Add(g3_4);

            Grade g4_1 = new Grade(5, 1);
            Grade g4_2 = new Grade(5.6, 1);
            Grade g4_3 = new Grade(5.3, 1);
            l2_2.Grades.Add(g4_1);
            l2_2.Grades.Add(g4_2);
            l2_2.Grades.Add(g4_3);

            Grade g5_1 = new Grade(4, 1);
            Grade g5_2 = new Grade(3.5, 0.5);
            Grade g5_3 = new Grade(3.2, 2);
            l2_3.Grades.Add(g5_1);
            l2_3.Grades.Add(g5_2);
            l2_3.Grades.Add(g5_3);

            Console.WriteLine(g5_1.getValue());
            Console.WriteLine(g5_1.getAverage());
            Console.WriteLine(g5_2.getValue());
            Console.WriteLine(g5_2.getAverage());
            
            Console.WriteLine("grades count: " + l2_3.Grades.Count);
            Console.WriteLine("lecture average: " + l2_3.getAverage());

            Console.WriteLine("m1 average: " + m1.getAverage());
            Console.WriteLine("m2 average: " + m2.getAverage());
            Console.WriteLine("m3 average: " + m3.getAverage());            
        }
        private void initCursusINFDLM3()
        {
            cursus = new Cursus(2015, "inf dlm", 3);

            List<StudyYear> studyYears = new List<StudyYear>();
            studyYears.Add(new StudyYear(2015));

            cursus.StudyYears = studyYears;

            Module m1 = new Module("Gestion");
            Module m2 = new Module("Imagerie numérique");
            Module m3 = new Module("Développement système");
            Module m4 = new Module("Développement web et mobile");
            Module m5 = new Module("IA et frameworks");
            Module m6 = new Module("Projet P3");

            studyYears.ElementAt(0).Modules.Add(m1);
            studyYears.ElementAt(0).Modules.Add(m2);
            studyYears.ElementAt(0).Modules.Add(m3);
            studyYears.ElementAt(0).Modules.Add(m4);
            studyYears.ElementAt(0).Modules.Add(m5);
            studyYears.ElementAt(0).Modules.Add(m6);

            Lecture l1_1 = new Lecture("Gestion et économie d'entreprise", 1);
            Lecture l1_2 = new Lecture("Communication III", 1);
            Lecture l1_3 = new Lecture("Qualité du logiciel", 2);
            m1.Lectures.Add(l1_1);
            m1.Lectures.Add(l1_2);
            m1.Lectures.Add(l1_3);

            Lecture l2_1 = new Lecture("Infographie avec GLSL", 9);
            Lecture l2_2 = new Lecture("Traitement d'image", 9);
            Lecture l2_3 = new Lecture("GPGPU pour l'imagerie numérique", 6);
            m2.Lectures.Add(l2_1);
            m2.Lectures.Add(l2_2);
            m2.Lectures.Add(l2_3);

            Lecture l3_1 = new Lecture("Conception OS", 2);
            Lecture l3_2 = new Lecture("Compilateur", 2);
            Lecture l3_3 = new Lecture("Cryptographie", 1);
            Lecture l3_4 = new Lecture("Sécurité", 1);
            m3.Lectures.Add(l3_1);
            m3.Lectures.Add(l3_2);
            m3.Lectures.Add(l3_3);
            m3.Lectures.Add(l3_4);

            Lecture l4_1 = new Lecture("Développement mobile", 4);
            Lecture l4_2 = new Lecture("Développement Web", 5);
            m4.Lectures.Add(l4_1);
            m4.Lectures.Add(l4_2);

            Lecture l5_1 = new Lecture("Intelligence Artificielle", 1);
            Lecture l5_2 = new Lecture(".NET", 1);
            Lecture l5_3 = new Lecture("Java Entreprise Edition (JEE)", 1);
            m5.Lectures.Add(l5_1);
            m5.Lectures.Add(l5_2);
            m5.Lectures.Add(l5_3);

            Lecture l6_1 = new Lecture("Projet P3", 1);
            m6.Lectures.Add(l6_1);
        }
 private void mnuAddModule_Click(object sender, RoutedEventArgs e)
 {
     Console.WriteLine("add module click");
     var dialog = new NewModule();
     if (dialog.ShowDialog() == true)
     {
         Console.WriteLine("add module");
         Module newModule = new Module(dialog.ModuleName);
         displayedStudyYear.addModule(newModule);
         Console.WriteLine("module count: " + displayedStudyYear.Modules.Count);
     }
     else
     {
         Console.WriteLine("showDialog != true");
     }
     
     displayCursus();
 }