Exemple #1
0
 public FormGame()
 {
     InitializeComponent();
     database.LoadXml("questions.xml");
     tbQuestion.Text      = database.ListQuestion[0].Text;
     lblNumbQuestion.Text = "Вопрос " + countQuestion + " из " + database.ListQuestion.Count;
 }
Exemple #2
0
        private void TsmiLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Filter = "*.xml|*.xml|Все файлы(*.*)|*.*";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                database.LoadXml(dlg.FileName);
                tbTextQuestion.Text     = database.ListQuestion[0].Text;
                cbTruth.Checked         = database.ListQuestion[0].Truth;
                nudNumbQuestion.Maximum = database.ListQuestion.Count - 1;
                lblCountQuestion.Text   = "Всего вопросов: " + database.ListQuestion.Count;
            }
        }