Esempio n. 1
0
        static void Main()
        {
            FileHandler file = new FileHandler();
            Dictionary <string, string> questionsAndAnswers = file.GetDataFromFile();
            QuestionRandomizer          randomizer          = new QuestionRandomizer(questionsAndAnswers);

            qAndA = QuestionRandomizer.ChooseQuestion();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
Esempio n. 2
0
 private void setNextQuestion()
 {
     Program.qAndA      = QuestionRandomizer.ChooseQuestion();
     questionLabel.Text = Program.qAndA.Key;
     answerLabel.Text   = string.Empty;
 }
Esempio n. 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     QuestionRandomizer.RemoveQuestion(Program.qAndA.Key);
     setNextQuestion();
 }