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