Example #1
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (database != null)
     {
         if (csv == false)
         {
             database.Save(database.FileName);
         }
         else
         {
             database.Save(database.FileName + ".xml");
         }
     }
     else
     {
         MessageBox.Show("База данных не создана");
     }
 }
Example #2
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            if (sfd.ShowDialog() == DialogResult.OK)
            {
                //database.FileName = sfd.FileName;
                database = new TrueFalse(sfd.FileName);
                database.Add("123", true);
                database.Save(database.FileName);
                nudNumber.Minimum = 1;
                nudNumber.Maximum = 1;
            }
        }