Пример #1
0
 private void Save_Click(object sender, EventArgs e)
 {
     if (_database != null)
     {
         _database.Save();
     }
     else
     {
         MessageBox.Show(@"База данных отсутствует");
     }
 }
Пример #2
0
        private void New_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFile = new SaveFileDialog();

            if (saveFile.ShowDialog() == DialogResult.OK)
            {
                _database = new TrueFalse(saveFile.FileName);
                _database.Add("Текст вопроса", true);
                _database.Save();
                counter.Minimum = 1;
                counter.Maximum = 1;
                counter.Value   = 1;
            }
        }