Example #1
0
 public Quizzard(string quizID, string user)
 {
     type = XMLFileHandling.GetQuizType(quizID);
     if (type == "Identification")
     {
         Identification quiz = new Identification(quizID);
         if (!quiz.IsInOrder)
         {
             quiz.Shuffle();
         }
         questions               = new Queue <string>(quiz.Questions);
         correctAnswers          = new Queue <string>(quiz.CorrectAnswers);
         hints                   = new Queue <string>(quiz.Hints);
         alternateAnswers        = new Queue <List <string> >(quiz.AlternateAnswers);
         maxItems                = quiz.ItemCount();
         itemsLeft               = quiz.ItemCount();
         score                   = 0;
         questionOrdered         = quiz.IsInOrder;
         caseSensitive           = quiz.IsCaseSensitive;
         hintEnabled             = quiz.IsHintEnabled;
         alternateAnswersEnabled = quiz.IsAlternateAnswersEnabled;
         username                = user;
     }
     else if (type == "Multiple Choice")
     {
         MultipleChoice quiz = new MultipleChoice(quizID);
         if (!quiz.IsInOrder)
         {
             quiz.Shuffle();
         }
         questions       = new Queue <string>(quiz.Questions);
         correctAnswers  = new Queue <string>(quiz.CorrectAnswers);
         choices         = new Queue <List <string> >(quiz.Choices);
         maxItems        = quiz.ItemCount();
         itemsLeft       = quiz.ItemCount();
         score           = 0;
         questionOrdered = quiz.IsInOrder;
         username        = user;
     }
 }
 public Identification_AltAns(string Questions, string CorrectAnswers, string Hint, string a, Identification i)
 {
     InitializeComponent();
     A                = Questions;
     b                = CorrectAnswers;
     c                = Hint;
     uName            = a;
     iden             = i;
     alternateAnswers = new List <string>();
 }
Example #3
0
 public AddMoreQ(string QuestionS, string CorrectAnswer, List <string> AlternateAnswers, string Hint, string sel, string a, Identification i)
 {
     InitializeComponent();
     iden = i;
     iden.IdentificationAddItem(QuestionS, CorrectAnswer, AlternateAnswers.ToArray(), Hint);
     selected = sel;
     uName    = a;
 }
 public Identification_Question(string a, Identification i)
 {
     InitializeComponent();
     uName = a;
     iden  = i;
 }