private void SaveFile_Click(object sender, EventArgs e) { if (_db != null) { _db.Save(); } else { MessageBox.Show(@"База данных не создана"); } }
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; } }