private void button3_Click(object sender, EventArgs e) { findingCallnumbers r = new findingCallnumbers(); this.Hide(); r.Show(); }
private void button4_Click(object sender, EventArgs e) { string answer; try { answer = comboBox1.SelectedItem.ToString(); } catch { answer = ""; } if (answer == secondLevel) { mark += 1; richTextBox1.Text = "You correctly chose the first and second level of the third level question!\nWell done!\nThe initial Question had the call number: " + question.Substring(0, 3); results.completedTasks += 1; pictureBox1.Location = new Point(682, 100); } else { MessageBox.Show("That was the Incorrect Answer!\n\nTry Again!"); findingCallnumbers r = new findingCallnumbers(); this.Dispose(); r.Show(); } }
private void button2_Click(object sender, EventArgs e) { //reload page findingCallnumbers r = new findingCallnumbers(); this.Dispose(); r.Show(); }
private void button1_Click(object sender, EventArgs e) { string answer = comboBox1.SelectedItem.ToString(); if (answer == correctAnswer) { mark += 1; label5.Text = "Second Level Entries"; label6.Text = null; var secondlist = randomSecondLevel(root, firstNode, secondNode); var sorted = secondlist.OrderBy(d => d).ToArray(); comboBox1.Items.Clear(); for (int i = 0; i < 4; i++) { //listBox1.Items.Add(secondlist[i]); label6.Text += sorted[i] + "\n"; comboBox1.Items.Add(sorted[i]); comboBox1.SelectedIndex = 0; } button1.Hide(); button4.Show(); int p = Convert.ToInt32(correctAnswer.Substring(0, 1)); label3.Text = "Question 2"; richTextBox1.Text = "You got the first level correct!\n\nCan you get the second level correct too?\n\n" + "The next answer is in between " + p + "00 and " + (p + 1) + "00!"; } else { MessageBox.Show("That was the Incorrect Answer!\n\nTry Again!"); findingCallnumbers r = new findingCallnumbers(); this.Dispose(); r.Show(); } comboBox1.SelectedIndex = -1; }