Fixed so that a passed-in parameter can specify the database to open

This commit is contained in:
Rich 2012-06-15 17:18:03 +00:00
parent 51312b4b38
commit 0e9a7efdae

View File

@ -108,6 +108,8 @@ namespace VEPROMS.CSLA.Library
set { Database._LastDatabase = value; }
}
private static string ChooseDatabase(string constr)
{
if (_SelectedDatabase == null)
{
if (LastDatabase != "NoDefault" && LastDatabase != "")
{
@ -123,6 +125,7 @@ namespace VEPROMS.CSLA.Library
cms.Show(new System.Drawing.Point((System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width - cms.Width) / 2, (System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height - cms.Height) / 2));
System.Windows.Forms.Application.DoEvents();
}
}
return constr.Replace("{MENU}", _SelectedDatabase);
}
private static System.Windows.Forms.ContextMenuStrip BuildDatabaseMenu(string constr)