private void AddBtn_Click(object sender, EventArgs e) { if (_db == null) { MessageBox.Show(@"Создайте новую базу данных", @"Сообщение"); return; } _db.Add((_db.Count + 1).ToString(), true, ImageBox.ImageLocation); NumQuestion.Maximum = _db.Count; NumQuestion.Value = _db.Count; }
private void NewFile_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); if (sfd.ShowDialog() == DialogResult.OK) { SavePathDb(sfd.FileName); _db = new TrueFalse(sfd.FileName); _db.Add("test", true, ImageBox.ImageLocation); _db.Save(); NumQuestion.Minimum = 1; NumQuestion.Maximum = 1; NumQuestion.Value = 1; } }