private void setTargetDatabaseToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.testConfig == null)
     {
         MessageBox.Show("Please open or create a new configuration first", "Configuration Needed", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         return;
     }
     else
     {
         SetDatabaseForm frmDb = new SetDatabaseForm(DbInformation.InfoHelper.GetDatabaseList(this.connData), this.testConfig.Name);
         frmDb.ShowDialog();
         this.testConfig.Name = frmDb.CurrentDatabase;
         this.testConfig.SaveConfiguration(this.configFileName);
         bgSprocList.RunWorkerAsync();
     }
 }
        public void OpenMRUFile(string fileName)
        {
            this.Cursor = Cursors.WaitCursor;
            if (File.Exists(fileName))
            {
                try
                {
                    testConfig = SqlSync.SprocTest.TestManager.ReadConfiguration(fileName);
                    this.connData.DatabaseName = testConfig.Name;
                }
                catch (Exception exe)
                {
                    MessageBox.Show(exe.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }
            else
            {
                testConfig = new Database();
                SetDatabaseForm frmDb = new SetDatabaseForm(DbInformation.InfoHelper.GetDatabaseList(this.connData), "");
                frmDb.ShowDialog();
                this.testConfig.Name = frmDb.CurrentDatabase;
                this.testConfig.SaveConfiguration(this.configFileName);
            }
            this.mruManager.Add(fileName);

            this.settingsControl1.Project = this.configFileName;
            BindTreeView();

            while (bgSprocList.IsBusy)
            {
                System.Threading.Thread.Sleep(100);
            }

            this.Cursor = Cursors.Default;
            pgBar.Style = ProgressBarStyle.Marquee;
            bgSprocList.RunWorkerAsync();
        }