private void miSave_Click(object sender, EventArgs e) { if (dataBase != null) { dataBase.Save(); } else { MessageBox.Show("База данных не создана"); } }
private void miNew_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); if (sfd.ShowDialog() == DialogResult.OK) { dataBase = new TrueFalse(sfd.FileName); dataBase.Add("123", true); dataBase.Save(); numNumber.Minimum = 1; numNumber.Maximum = 1; numNumber.Value = 1; } }