Beispiel #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="Lesson" /> class.
        ///     To be properly instanciated, the lesson need a name, the path of the PDF and the current number of pages of this
        ///     document.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="nbPages">The nb pages.</param>
        public Lesson(string name, int nbPages)
        {
            Name = name;

            // Preparation of the slides
            Slides = new SlideHolder();
            for (var i = 0; i < nbPages; i++)
            {
                Slides.AddNewContent();
            }

            Slides.AddLayer("Mes notes");

            // Preparation of the global notes (free note zone)
            GlobalNotes = new GlobalNotesHolder();
            GlobalNotes.AddNewContent("Default");
            GlobalNotes.AddLayer("Notes libres");

            // Preparation of the exercice holder
            Exercises = new ExerciseHolder();

            // Test, adding one quiz layer
            var             exFactory = new ExerciseContent.ExerciseFactory(Exercises);
            ExerciseContent ex        = exFactory.GetQCM("QCM Démonstration");

            (ex as QuizContent).AddQuestionLayer("Question");
            (ex as QuizContent).AddAnswerLayer("Réponse");
            Exercises.Contents.Add(ex);
        }
Beispiel #2
0
 public ExerciseFactory(ExerciseHolder holder)
 {
     _holder = holder;
 }