Esempio n. 1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (databaseOfQuestions != null)
     {
         databaseOfQuestions.SaveAsXMLFormat();
     }
     else
     {
         MessageBox.Show("Data base has not been created");
     }
 }
Esempio n. 2
0
        private void tsmiNew_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                databaseOfQuestions = new TrueFalse(saveFileDialog.FileName);
                databaseOfQuestions.AddQuestion("В Японии ученики на доске пишут кисточкой с цветными чернилами?", true);
                databaseOfQuestions.SaveAsXMLFormat();
                nudNumber.Minimum = 1;
                nudNumber.Maximum = 1;
                nudNumber.Value   = 1;
                TurnButtons(true);
            }
        }