private void miOpen_Click(System.Object sender, System.EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.OK) { database = new TrueFalse(ofd.FileName); database.Load(); nudNumber.Minimum = 1; nudNumber.Maximum = database.Count; nudNumber.Value = 1; } }
private void miNew_Click(System.Object sender, System.EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); if (sfd.ShowDialog() == DialogResult.OK) { database = new TrueFalse(sfd.FileName); database.Add("Начальные данные", true); database.Save(); nudNumber.Minimum = 1; nudNumber.Maximum = 1; nudNumber.Value = 1; } ; }