Add LastDatabase property

This eliminates the need to look at all of the databases on the server, and thus speeds-up startup
Get and Save DefaultDB Setting
Added DefaultDB Setting
This commit is contained in:
Rich
2012-03-07 15:58:34 +00:00
parent 6c125d8997
commit af59ad1538
4 changed files with 47 additions and 10 deletions

View File

@@ -174,10 +174,14 @@ namespace VEPROMS
if (parameter.StartsWith("/DB="))
Database.SelectedDatabase = parameter.Substring(4);
}
if (Properties.Settings.Default["DefaultDB"] != string.Empty)
Database.LastDatabase = Properties.Settings.Default.DefaultDB;
if (!FormatInfo.HasLatestChanges())
throw new Exception("Inconsistent Formats");
if (!ItemAuditInfo.IsChangeManagerVersion())
throw new Exception("Inconsistent Data");
Properties.Settings.Default.DefaultDB = Database.SelectedDatabase;
Properties.Settings.Default.Save();
VETreeNode tn = VETreeNode.GetFolder(1);
tv.Nodes.Add(tn);
tv.NodePSI += new vlnTreeViewPSIEvent(tv_NodePSI);