private void Start_Click(object sender, RoutedEventArgs e) { Quiz quiz = new Quiz(); quiz.Show(); this.Visibility = Visibility.Hidden; this.Close(); Flash flash = new Flash(); //flash.load_quiz(); Bridges bridges = new Bridges(); bridges.Load_Bridges(); bridges.Questions(0); bridges.Load(0); Answers answers = new Answers(); //quiz.Question.Text = flash.quiz1[3].name; //Questions questions1 = new Questions(); //questions1.Load_Questions(0); quiz.Question.Text = Convert.ToString(bridges.questions[0]); //quiz.Answer.Content = Convert.ToString(answers.answers1[0].isAnwser); }
public void Questions(int index) { Bridges current = cross[index]; string query = "select Question from Questions where ID=" + current.QuestionID1;//Reads in the Question field from the Questions table OleDbCommand cmd = new OleDbCommand(query, cn); OleDbDataReader read = cmd.ExecuteReader(); while (read.Read()) { questions.Add(read[0].ToString());//Reads in question text } }
private void Next_Click(object sender, RoutedEventArgs e) { Bridges bridges = new Bridges(); Flash flash = new Flash(); //flash.load_quiz(); bridges.Load_Bridges(); Quiz quiz = new Quiz(); quiz.Question.Text = bridges.questions[0]; }
private void Button_Click(object sender, RoutedEventArgs e) //Categories { Quiz quiz = new Quiz(); quiz.Show(); this.Visibility = Visibility.Hidden; this.Close(); Flash flash = new Flash(); //flash.load_quiz(); Bridges bridges = new Bridges(); bridges.Load_Bridges(); bridges.Questions(0); bridges.Load(0); }
public void load_anwsers(Bridges current) { Bridges bridges = new Bridges(); bridges.Load_Bridges(); string query = "Select * from Anwsers where QuestionID=" + current.QuestionID1; OleDbCommand cmd = new OleDbCommand(query, cn); cn.Open(); OleDbDataReader read = cmd.ExecuteReader(); while (read.Read()) { bool val = Convert.ToBoolean(read[2].ToString()); answers1.Add(new Answers(read[1].ToString(), val)); } cn.Close(); }