Fixed logic so that Recently Used List is not cleared when the connection string uses a specific database rather than {MENU}.

This commit is contained in:
Rich 2013-04-10 15:14:50 +00:00
parent a1e91b689d
commit 462a93f53d

View File

@ -211,7 +211,7 @@ namespace VEPROMS
throw new Exception("Inconsistent Formats");
if (!ItemAuditInfo.IsChangeManagerVersion())
throw new Exception("Inconsistent Data");
if (Database.LastDatabase != Database.SelectedDatabase)
if ((Database.LastDatabase ?? "") != (Database.SelectedDatabase ?? ""))
{
Properties.Settings.Default.MRIList = null;
Properties.Settings.Default.DefaultDB = Database.SelectedDatabase;
@ -344,11 +344,11 @@ namespace VEPROMS
string fileName = Volian.Base.Library.VlnSettings.TemporaryFolder + "\\" + args.MyFilename;
try
{
FileStream fs = new FileStream(fileName, FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
fs.Close();
System.Diagnostics.Process.Start(fileName);
}
FileStream fs = new FileStream(fileName, FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
fs.Close();
System.Diagnostics.Process.Start(fileName);
}
catch (Exception ex)
{
StringBuilder sb = new StringBuilder();
@ -965,7 +965,6 @@ namespace VEPROMS
private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
_ExpandingTree = true;
Volian.Base.Library.vlnStackTrace.ShowStackLocal("tv_BeforeExpand", 3);
VETreeNode tn = ((VETreeNode)e.Node);
tn.LoadingChildrenDone += new VETreeNodeEvent(tn_LoadingChildrenDone);
tn.LoadingChildrenMax += new VETreeNodeEvent(tn_LoadingChildrenMax);