示例#1
0
 protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
 {
     string indexStr;
     if (NavigationContext.QueryString.TryGetValue("index", out indexStr))
     {
         int index = int.Parse(indexStr);
         if ( index > 0)
         {
             this.unQuestionnaire = Passerelle.getLesQuestionnaires(index);
         }
         else
         {
             this.unQuestionnaire = Passerelle.getLesQuestionnaires(0);
         }
     }
     base.OnNavigatedTo(e);
 }
示例#2
0
        public static SerieQuestionnaire getLesQuestionnaires()
        {
            Indice unIndice = new Indice("Ce film fantastique d’épouvante de 1987 est un remake du film de Kurt Neumann de 1958");
            Indice unAutreIndice = new Indice("Le personnage de Seth Brundle devait initialement être interprété par Michael Keaton, mais il refusa.");
            List<Indice> uneListeIndice = new List<Indice>();
            uneListeIndice.Add(unIndice);
            uneListeIndice.Add(unAutreIndice);
            Question uneQuestion = new Question("De quel film s’agit-il?",
            uneListeIndice, "la mouche", "/quizzApp;component/images/cinema88.jpg");
            List<Question> ls = new List<Question>();
            ls.Add(uneQuestion);
            Questionnaire lesQestions = new Questionnaire(ls, "/quizzApp;component/images/Idées-de-thèmes-Le-cinéma-300x214.jpg", "Cinéma");
            List<Questionnaire> dec = new List<Questionnaire>();
            dec.Add(lesQestions);
            SerieQuestionnaire uneSerie = new SerieQuestionnaire(dec);

            return uneSerie;
        }