コード例 #1
0
        // Обработчик пункта меню Open
        private void miOpen_Click(object sender, 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;
            }
        }
コード例 #2
0
        // Обработчик пункта меню Open
        private void btnOpen_Click(object sender, 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;
                BnBdatabase.Text  = database.FileName.Split('\\').LastOrDefault();
            }
        }
コード例 #3
0
 private void LoadGameBase()
 {
     gameDB = new TrueFalse("myDB");
     gameDB.Load();
 }