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:
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4211
|
||||
// Runtime Version:2.0.50727.4216
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -243,5 +243,17 @@ namespace VEPROMS.Properties {
|
||||
this["QATItems"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string DefaultDB {
|
||||
get {
|
||||
return ((string)(this["DefaultDB"]));
|
||||
}
|
||||
set {
|
||||
this["DefaultDB"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -59,5 +59,8 @@
|
||||
<Setting Name="QATItems" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="DefaultDB" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user