private void butAdd_Click(object sender, EventArgs e) { if (_database == null) { MessageBox.Show(@"Создайте новую базу данных", @"Инфо"); return; } _database.Add((_database.Count + 1).ToString(), true); counter.Maximum = _database.Count; counter.Value = _database.Count; }
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; } }