Ejemplo n.º 1
0
        /// <summary>
        /// Opens a new dialog to open an MDB File and make backup of the file.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDatabasePath_Click(object sender, EventArgs e)
        {
            clearForm();
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = strings.fileFilter;
            ofd.ShowDialog();

            if (!System.IO.File.Exists(ofd.FileName))
                return;

            txtDatabasePath.Text = ofd.FileName;
            doBackup(ofd.FileName);
            DB = new Database(ofd.FileName);

            txtPrimarySavePath.Text = DB.PrimarySavePath;
            txtSecondarySavePath.Text = DB.SecondarySavePath;

            listPrimary.Items.AddRange(DB.PrimaryLoadPaths);
            listSecondary.Items.AddRange(DB.SecondaryLoadPaths);

            groupBox5.Enabled = true;
            groupBox6.Enabled = true;

            btnSave.Enabled = true;

            lstLvl1.Items.AddRange(DB.readTables().ToArray());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Opens a new dialog for openening a second mdb file for comparison
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDatabaseComparePath_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = strings.fileFilter;
            ofd.ShowDialog();

            if (!System.IO.File.Exists(ofd.FileName))
                return;

            txtDatabaseComparePath.Text = ofd.FileName;

            DBcompare = new Database(ofd.FileName);
        }