Use new settings

Removed outdated comments
This commit is contained in:
Rich 2012-01-13 18:40:46 +00:00
parent b480a879c5
commit 617f060bee
5 changed files with 246 additions and 21 deletions

View File

@ -82,25 +82,12 @@ namespace DataLoader
{
try
{
//#if DEBUG
if (VlnSettings.DebugMode)
{
MessageBox.Show(@"Format files are taken from c:\development\fmtall");
_FmtAllPath = @"c:\development\fmtall";
_GenmacAllPath = @"c:\development\genmacall";
}
//#else
else
{
MessageBox.Show(@"Format files are taken from " + vepromspath + @"\fmtall");
_FmtAllPath = vepromspath + @"\fmtall";
_GenmacAllPath = vepromspath + @"\genmacall";
}
//#endif
_FmtAllPath = frmMain.MySettings.FormatFolder;
_GenmacAllPath = frmMain.MySettings.GenMacFolder;
frmMain.Status = "Make Connection";
// make the initial database connection record, annotation types & top
// system folder.
dbConn = Connection.MakeConnection("Default", "Default", "Data Source=.\\SQLEXPRESS;Initial Catalog=VEPROMS;Integrated Security=True", 1, null, DateTime.Now, "Migration");
dbConn = Connection.MakeConnection("Default", "Default", frmMain.MySettings.ConnectionString.Replace("{DBName}",frmMain.MySettings.DBName), 1, null, DateTime.Now, "Migration");
ConfigFile cfg = new ConfigFile();
frmMain.Status = "Add AnnotationTypes";

View File

@ -86,7 +86,6 @@ namespace DataLoader
// check that file exists, i.e. if proc file doesn't exist but has entry in set
// file, flag error, but continue.
//string fname = frmMain.tbSourceText +"\\"+ dr["entry"] + ".dbf";
string fname = pth + "\\" + dr["entry"] + ".dbf";
if (File.Exists(fname))
{
@ -381,7 +380,6 @@ namespace DataLoader
}
private void DbtOk(string fname, string pth)
{
//string dbtname = frmMain.tbSourceText + "\\" + fname + ".dbt";
string dbtname = pth + "\\" + fname + ".dbt";
if (File.Exists(dbtname))
{

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
// Runtime Version:2.0.50727.4216
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -118,5 +118,197 @@ namespace DataLoader.Properties {
this["BackupFileName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string BackupFolder {
get {
return ((string)(this["BackupFolder"]));
}
set {
this["BackupFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=.\\SQLEXPRESS;Initial Catalog={DBName};Integrated Security=True")]
public string ConnectionString {
get {
return ((string)(this["ConnectionString"]));
}
set {
this["ConnectionString"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("VEPROMS")]
public string DBName {
get {
return ((string)(this["DBName"]));
}
set {
this["DBName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DBPath {
get {
return ((string)(this["DBPath"]));
}
set {
this["DBPath"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string PDFFolder {
get {
return ((string)(this["PDFFolder"]));
}
set {
this["PDFFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Unchecked")]
public global::System.Windows.Forms.CheckState CheckRTF {
get {
return ((global::System.Windows.Forms.CheckState)(this["CheckRTF"]));
}
set {
this["CheckRTF"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int Skip {
get {
return ((int)(this["Skip"]));
}
set {
this["Skip"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
public int ConvertTo {
get {
return ((int)(this["ConvertTo"]));
}
set {
this["ConvertTo"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Checked")]
public global::System.Windows.Forms.CheckState RedPDFs {
get {
return ((global::System.Windows.Forms.CheckState)(this["RedPDFs"]));
}
set {
this["RedPDFs"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Checked")]
public global::System.Windows.Forms.CheckState OnlyThisSet {
get {
return ((global::System.Windows.Forms.CheckState)(this["OnlyThisSet"]));
}
set {
this["OnlyThisSet"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ExecutionMode {
get {
return ((int)(this["ExecutionMode"]));
}
set {
this["ExecutionMode"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Phase1")]
public string Phase1 {
get {
return ((string)(this["Phase1"]));
}
set {
this["Phase1"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Phase2")]
public string Phase2 {
get {
return ((string)(this["Phase2"]));
}
set {
this["Phase2"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Phase3")]
public string Phase3 {
get {
return ((string)(this["Phase3"]));
}
set {
this["Phase3"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("c:\\development\\fmtall")]
public string FormatFolder {
get {
return ((string)(this["FormatFolder"]));
}
set {
this["FormatFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("c:\\development\\genmacall")]
public string GenMacFolder {
get {
return ((string)(this["GenMacFolder"]));
}
set {
this["GenMacFolder"] = value;
}
}
}
}

View File

@ -26,5 +26,53 @@
<Setting Name="BackupFileName" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="BackupFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ConnectionString" Type="System.String" Scope="User">
<Value Profile="(Default)">Data Source=.\SQLEXPRESS;Initial Catalog={DBName};Integrated Security=True</Value>
</Setting>
<Setting Name="DBName" Type="System.String" Scope="User">
<Value Profile="(Default)">VEPROMS</Value>
</Setting>
<Setting Name="DBPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="PDFFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="CheckRTF" Type="System.Windows.Forms.CheckState" Scope="User">
<Value Profile="(Default)">Unchecked</Value>
</Setting>
<Setting Name="Skip" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ConvertTo" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
<Setting Name="RedPDFs" Type="System.Windows.Forms.CheckState" Scope="User">
<Value Profile="(Default)">Checked</Value>
</Setting>
<Setting Name="OnlyThisSet" Type="System.Windows.Forms.CheckState" Scope="User">
<Value Profile="(Default)">Checked</Value>
</Setting>
<Setting Name="ExecutionMode" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="Phase1" Type="System.String" Scope="User">
<Value Profile="(Default)">Phase1</Value>
</Setting>
<Setting Name="Phase2" Type="System.String" Scope="User">
<Value Profile="(Default)">Phase2</Value>
</Setting>
<Setting Name="Phase3" Type="System.String" Scope="User">
<Value Profile="(Default)">Phase3</Value>
</Setting>
<Setting Name="FormatFolder" Type="System.String" Scope="User">
<Value Profile="(Default)">c:\development\fmtall</Value>
</Setting>
<Setting Name="GenMacFolder" Type="System.String" Scope="User">
<Value Profile="(Default)">c:\development\genmacall</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -636,12 +636,12 @@ namespace DataLoader
switch (ex.Message)
{
case "Index file not found.":// then delete inf file
fi = new FileInfo(frmMain.tbSourceText + "\\" + FileName + ".inf");
fi = new FileInfo(frmMain.MySettings.ProcedureSetPath + "\\" + FileName + ".inf");
fi.Delete();
LoadSection(ds, da, FileName);// Try Again
break;
case "External table is not in the expected format.": // then pad dbt file with 128 zeros.
fi = new FileInfo(frmMain.tbSourceText + "\\" + FileName + ".dbt");
fi = new FileInfo(frmMain.MySettings.ProcedureSetPath + "\\" + FileName + ".dbt");
FileStream fs = fi.OpenWrite();
fs.Position = fs.Length;
byte[] buf = new byte[128];