Added property settings WhatROsToConvert, SelectedROFst, AnnotateWhenConvertingToText, AnnotateWhenShowingMissingRO, and AnnotateWhenShowingDifferentRO

Added property settings WhatROsToConvert, SelectedROFst, AnnotateWhenConvertingToText, AnnotateWhenShowingMissingRO, and AnnotateWhenShowingDifferentRO.
Added ROUpdateMode enum
Changed how text is added to tbErrors textbox
Added property settings WhatROsToConvert, SelectedROFst, AnnotateWhenConvertingToText, AnnotateWhenShowingMissingRO, and AnnotateWhenShowingDifferentRO
Added createEmptyPROMS boolean value to allow creating an empty PROMS database
Added loadTree menu item click event handler
Added Load Tree menu item, Selection main menu with Fix ROs menu item under Selection menu item and Create Empty database menu item
Used createEmptyPROMS value.  Changed how Migration Error annotation type created.
This commit is contained in:
Rich 2014-05-14 02:05:11 +00:00
parent 37afbace90
commit 249ddafe54
6 changed files with 297 additions and 76 deletions

View File

@ -152,6 +152,24 @@
<setting name="Phase4" serializeAs="String"> <setting name="Phase4" serializeAs="String">
<value>Phase4</value> <value>Phase4</value>
</setting> </setting>
<setting name="ProcessOnlyInLocation" serializeAs="String">
<value />
</setting>
<setting name="WhatROsToConvert" serializeAs="String">
<value>0</value>
</setting>
<setting name="SelectedROFst" serializeAs="String">
<value>-1</value>
</setting>
<setting name="AnnotateWhenConvertingToText" serializeAs="String">
<value>False</value>
</setting>
<setting name="AnnotateWhenShowingMissingRO" serializeAs="String">
<value>False</value>
</setting>
<setting name="AnnotateWhenShowingDifferentRO" serializeAs="String">
<value>False</value>
</setting>
</DataLoader.Properties.Settings> </DataLoader.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>

View File

@ -284,6 +284,53 @@ namespace DataLoader
set { _RedPDFs = value; } set { _RedPDFs = value; }
} }
#endregion #endregion
#region RO Update
private ROUpdateMode _WhatROsToConvert = 0;
[Category("RO Update")]
[DisplayName("What ROs To Convert")]
[Description("Select which ROs should be converted.")]
public ROUpdateMode WhatROsToConvert
{
get { return _WhatROsToConvert; }
set { _WhatROsToConvert = value; }
}
private int _SelectedROFst = -1;
[Category("RO Update")]
[DisplayName("Selected ROFst")]
[Description("Enter which ROFstID is the basis for the original text (-1 = None).")]
public int SelectedROFst
{
get { return _SelectedROFst; }
set { _SelectedROFst = value; }
}
private bool _AnnotateWhenConvertingToText;
[Category("RO Update")]
[DisplayName("Annotate When Converting To Text")]
[Description("Should the step have annotation when the ro data has been converted to text.")]
public bool AnnotateWhenConvertingToText
{
get { return _AnnotateWhenConvertingToText; }
set { _AnnotateWhenConvertingToText = value; }
}
private bool _AnnotateWhenShowingMissingRO;
[Category("RO Update")]
[DisplayName("Annotate When Showing Missing RO")]
[Description("Should the step have annotation when the ro data is missing and is being displayed as a question mark.")]
public bool AnnotateWhenShowingMissingRO
{
get { return _AnnotateWhenShowingMissingRO; }
set { _AnnotateWhenShowingMissingRO = value; }
}
private bool _AnnotateWhenShowingDifferentRO;
[Category("RO Update")]
[DisplayName("Annotate When Showing Different RO")]
[Description("Should the step have annotation when the ro data is different.")]
public bool AnnotateWhenShowingDifferentRO
{
get { return _AnnotateWhenShowingDifferentRO; }
set { _AnnotateWhenShowingDifferentRO = value; }
}
#endregion
[Browsable(false)] [Browsable(false)]
public string ValidityCheck public string ValidityCheck
{ {
@ -475,6 +522,15 @@ namespace DataLoader
[Description("Debug")] Debug = 0, [Description("Debug")] Debug = 0,
[Description("Production")] Production = 1, [Description("Production")] Production = 1,
} }
public enum ROUpdateMode : int
{
[Description("None")]
None = 0,
[Description("Missing")]
Missing = 1,
[Description("All")]
All = 2,
}
public class EnumDescConverter : System.ComponentModel.EnumConverter public class EnumDescConverter : System.ComponentModel.EnumConverter
{ {

View File

@ -121,6 +121,7 @@ namespace DataLoader
List<Folder> lfldr = vlnDataPathFolders(); List<Folder> lfldr = vlnDataPathFolders();
List<vlnObject> dp2 = new List<vlnObject>(); List<vlnObject> dp2 = new List<vlnObject>();
if (frmMain.createEmptyPROMS) return true;
foreach (Folder fldr in lfldr) foreach (Folder fldr in lfldr)
{ {
TreeNode tn = frmMain.TV.Nodes.Add(fldr.Name); TreeNode tn = frmMain.TV.Nodes.Add(fldr.Name);
@ -156,6 +157,8 @@ namespace DataLoader
frmMain.Status = "Getting AnnotationTypes"; frmMain.Status = "Getting AnnotationTypes";
CommentType = AnnotationType.GetByName("Comment"); // .MakeAnnotationType("Comment", null); CommentType = AnnotationType.GetByName("Comment"); // .MakeAnnotationType("Comment", null);
MigrationErrorType = AnnotationType.GetByName("Migration Error"); MigrationErrorType = AnnotationType.GetByName("Migration Error");
if(MigrationErrorType == null)
MigrationErrorType = AnnotationType.MakeAnnotationType("Migration Error", null);
VerificationRequiredType = AnnotationType.GetByName("Verification Required"); VerificationRequiredType = AnnotationType.GetByName("Verification Required");
List<Folder> lfldr = vlnDataPathFolders(); // get plant level list. List<Folder> lfldr = vlnDataPathFolders(); // get plant level list.

View File

@ -57,8 +57,9 @@ namespace DataLoader
default: default:
break; break;
} }
tbErrors.SelectionStart = tbErrors.TextLength; //tbErrors.SelectionStart = tbErrors.TextLength;
tbErrors.SelectedText = sep + err; //tbErrors.SelectedText = sep + err;
tbErrors.AppendText(sep + err);
sep = "\r\n"; sep = "\r\n";
Show(); Show();
Application.DoEvents(); Application.DoEvents();

View File

@ -49,6 +49,7 @@ namespace DataLoader
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadTreeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.processToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.processToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.completeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.completeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
@ -60,6 +61,8 @@ namespace DataLoader
this.convertToApprovalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.convertToApprovalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.load16BitApprovalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.load16BitApprovalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fixesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fixesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fixROValuesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createEmptyPROMSDatabaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.oldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.oldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.convertSecurityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.convertSecurityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -74,7 +77,8 @@ namespace DataLoader
this.fixAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fixAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.approvalDatabasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.approvalDatabasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.updateFormatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.updateFormatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fixROValuesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fixROsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fixROsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.sc.Panel1.SuspendLayout(); this.sc.Panel1.SuspendLayout();
this.sc.Panel2.SuspendLayout(); this.sc.Panel2.SuspendLayout();
this.sc.SuspendLayout(); this.sc.SuspendLayout();
@ -85,8 +89,8 @@ namespace DataLoader
// sc // sc
// //
this.sc.Dock = System.Windows.Forms.DockStyle.Fill; this.sc.Dock = System.Windows.Forms.DockStyle.Fill;
this.sc.Location = new System.Drawing.Point(0, 28); this.sc.Location = new System.Drawing.Point(0, 24);
this.sc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.sc.Margin = new System.Windows.Forms.Padding(2);
this.sc.Name = "sc"; this.sc.Name = "sc";
this.sc.Orientation = System.Windows.Forms.Orientation.Horizontal; this.sc.Orientation = System.Windows.Forms.Orientation.Horizontal;
// //
@ -106,17 +110,19 @@ namespace DataLoader
// //
this.sc.Panel2.BackColor = System.Drawing.SystemColors.Control; this.sc.Panel2.BackColor = System.Drawing.SystemColors.Control;
this.sc.Panel2.Controls.Add(this.tv); this.sc.Panel2.Controls.Add(this.tv);
this.sc.Size = new System.Drawing.Size(885, 457); this.sc.Size = new System.Drawing.Size(664, 370);
this.sc.SplitterDistance = 166; this.sc.SplitterDistance = 134;
this.sc.SplitterWidth = 3;
this.sc.TabIndex = 46; this.sc.TabIndex = 46;
// //
// lblCurSetFolder // lblCurSetFolder
// //
this.lblCurSetFolder.AutoSize = true; this.lblCurSetFolder.AutoSize = true;
this.lblCurSetFolder.ForeColor = System.Drawing.Color.Blue; this.lblCurSetFolder.ForeColor = System.Drawing.Color.Blue;
this.lblCurSetFolder.Location = new System.Drawing.Point(236, 119); this.lblCurSetFolder.Location = new System.Drawing.Point(177, 97);
this.lblCurSetFolder.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblCurSetFolder.Name = "lblCurSetFolder"; this.lblCurSetFolder.Name = "lblCurSetFolder";
this.lblCurSetFolder.Size = new System.Drawing.Size(20, 17); this.lblCurSetFolder.Size = new System.Drawing.Size(16, 13);
this.lblCurSetFolder.TabIndex = 75; this.lblCurSetFolder.TabIndex = 75;
this.lblCurSetFolder.Text = "..."; this.lblCurSetFolder.Text = "...";
this.lblCurSetFolder.Visible = false; this.lblCurSetFolder.Visible = false;
@ -124,9 +130,10 @@ namespace DataLoader
// lblProcessing // lblProcessing
// //
this.lblProcessing.AutoSize = true; this.lblProcessing.AutoSize = true;
this.lblProcessing.Location = new System.Drawing.Point(9, 119); this.lblProcessing.Location = new System.Drawing.Point(7, 97);
this.lblProcessing.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblProcessing.Name = "lblProcessing"; this.lblProcessing.Name = "lblProcessing";
this.lblProcessing.Size = new System.Drawing.Size(221, 17); this.lblProcessing.Size = new System.Drawing.Size(165, 13);
this.lblProcessing.TabIndex = 74; this.lblProcessing.TabIndex = 74;
this.lblProcessing.Text = "Processing Procedure Set Folder:"; this.lblProcessing.Text = "Processing Procedure Set Folder:";
this.lblProcessing.Visible = false; this.lblProcessing.Visible = false;
@ -134,57 +141,61 @@ namespace DataLoader
// lblTime // lblTime
// //
this.lblTime.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblTime.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblTime.Location = new System.Drawing.Point(9, 82); this.lblTime.Location = new System.Drawing.Point(7, 67);
this.lblTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblTime.Name = "lblTime"; this.lblTime.Name = "lblTime";
this.lblTime.Size = new System.Drawing.Size(142, 20); this.lblTime.Size = new System.Drawing.Size(106, 16);
this.lblTime.TabIndex = 58; this.lblTime.TabIndex = 58;
// //
// pbStep // pbStep
// //
this.pbStep.Location = new System.Drawing.Point(153, 50); this.pbStep.Location = new System.Drawing.Point(115, 41);
this.pbStep.Margin = new System.Windows.Forms.Padding(2); this.pbStep.Margin = new System.Windows.Forms.Padding(2);
this.pbStep.Name = "pbStep"; this.pbStep.Name = "pbStep";
this.pbStep.Size = new System.Drawing.Size(500, 15); this.pbStep.Size = new System.Drawing.Size(375, 12);
this.pbStep.TabIndex = 57; this.pbStep.TabIndex = 57;
// //
// pbSect // pbSect
// //
this.pbSect.Location = new System.Drawing.Point(153, 30); this.pbSect.Location = new System.Drawing.Point(115, 24);
this.pbSect.Margin = new System.Windows.Forms.Padding(2); this.pbSect.Margin = new System.Windows.Forms.Padding(2);
this.pbSect.Name = "pbSect"; this.pbSect.Name = "pbSect";
this.pbSect.Size = new System.Drawing.Size(500, 15); this.pbSect.Size = new System.Drawing.Size(375, 12);
this.pbSect.TabIndex = 56; this.pbSect.TabIndex = 56;
// //
// pbProc // pbProc
// //
this.pbProc.Location = new System.Drawing.Point(153, 11); this.pbProc.Location = new System.Drawing.Point(115, 9);
this.pbProc.Margin = new System.Windows.Forms.Padding(2); this.pbProc.Margin = new System.Windows.Forms.Padding(2);
this.pbProc.Name = "pbProc"; this.pbProc.Name = "pbProc";
this.pbProc.Size = new System.Drawing.Size(500, 15); this.pbProc.Size = new System.Drawing.Size(375, 12);
this.pbProc.TabIndex = 55; this.pbProc.TabIndex = 55;
// //
// lblStep // lblStep
// //
this.lblStep.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblStep.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblStep.Location = new System.Drawing.Point(9, 58); this.lblStep.Location = new System.Drawing.Point(7, 47);
this.lblStep.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStep.Name = "lblStep"; this.lblStep.Name = "lblStep";
this.lblStep.Size = new System.Drawing.Size(142, 20); this.lblStep.Size = new System.Drawing.Size(106, 16);
this.lblStep.TabIndex = 49; this.lblStep.TabIndex = 49;
// //
// lblSection // lblSection
// //
this.lblSection.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblSection.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblSection.Location = new System.Drawing.Point(9, 34); this.lblSection.Location = new System.Drawing.Point(7, 28);
this.lblSection.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblSection.Name = "lblSection"; this.lblSection.Name = "lblSection";
this.lblSection.Size = new System.Drawing.Size(142, 19); this.lblSection.Size = new System.Drawing.Size(106, 15);
this.lblSection.TabIndex = 48; this.lblSection.TabIndex = 48;
// //
// lblProc // lblProc
// //
this.lblProc.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblProc.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblProc.Location = new System.Drawing.Point(9, 11); this.lblProc.Location = new System.Drawing.Point(7, 9);
this.lblProc.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblProc.Name = "lblProc"; this.lblProc.Name = "lblProc";
this.lblProc.Size = new System.Drawing.Size(142, 19); this.lblProc.Size = new System.Drawing.Size(106, 15);
this.lblProc.TabIndex = 47; this.lblProc.TabIndex = 47;
// //
// tv // tv
@ -192,9 +203,9 @@ namespace DataLoader
this.tv.CheckBoxes = true; this.tv.CheckBoxes = true;
this.tv.Dock = System.Windows.Forms.DockStyle.Fill; this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
this.tv.Location = new System.Drawing.Point(0, 0); this.tv.Location = new System.Drawing.Point(0, 0);
this.tv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tv.Margin = new System.Windows.Forms.Padding(2);
this.tv.Name = "tv"; this.tv.Name = "tv";
this.tv.Size = new System.Drawing.Size(885, 287); this.tv.Size = new System.Drawing.Size(664, 233);
this.tv.TabIndex = 24; this.tv.TabIndex = 24;
this.tv.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tv_BeforeExpand); this.tv.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tv_BeforeExpand);
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
@ -204,10 +215,9 @@ namespace DataLoader
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1, this.toolStripStatusLabel1,
this.tsslError}); this.tsslError});
this.statusStrip1.Location = new System.Drawing.Point(0, 440); this.statusStrip1.Location = new System.Drawing.Point(0, 349);
this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0); this.statusStrip1.Size = new System.Drawing.Size(664, 45);
this.statusStrip1.Size = new System.Drawing.Size(885, 45);
this.statusStrip1.TabIndex = 47; this.statusStrip1.TabIndex = 47;
this.statusStrip1.Text = "statusStrip1"; this.statusStrip1.Text = "statusStrip1";
// //
@ -235,29 +245,37 @@ namespace DataLoader
this.processToolStripMenuItem, this.processToolStripMenuItem,
this.settingsToolStripMenuItem, this.settingsToolStripMenuItem,
this.oldToolStripMenuItem, this.oldToolStripMenuItem,
this.fixAllToolStripMenuItem}); this.fixAllToolStripMenuItem,
this.fixROsToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2); this.menuStrip1.Size = new System.Drawing.Size(664, 24);
this.menuStrip1.Size = new System.Drawing.Size(885, 28);
this.menuStrip1.TabIndex = 48; this.menuStrip1.TabIndex = 48;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
// fileToolStripMenuItem // fileToolStripMenuItem
// //
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem}); this.exitToolStripMenuItem,
this.loadTreeToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 24); this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "&File"; this.fileToolStripMenuItem.Text = "&File";
// //
// exitToolStripMenuItem // exitToolStripMenuItem
// //
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(102, 24); this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "E&xit"; this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
// //
// loadTreeToolStripMenuItem
//
this.loadTreeToolStripMenuItem.Name = "loadTreeToolStripMenuItem";
this.loadTreeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.loadTreeToolStripMenuItem.Text = "Load Tree";
this.loadTreeToolStripMenuItem.Click += new System.EventHandler(this.loadTreeToolStripMenuItem_Click);
//
// processToolStripMenuItem // processToolStripMenuItem
// //
this.processToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.processToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -271,81 +289,96 @@ namespace DataLoader
this.convertToApprovalToolStripMenuItem, this.convertToApprovalToolStripMenuItem,
this.load16BitApprovalToolStripMenuItem, this.load16BitApprovalToolStripMenuItem,
this.fixesToolStripMenuItem, this.fixesToolStripMenuItem,
this.fixROValuesToolStripMenuItem}); this.fixROValuesToolStripMenuItem,
this.createEmptyPROMSDatabaseToolStripMenuItem});
this.processToolStripMenuItem.Name = "processToolStripMenuItem"; this.processToolStripMenuItem.Name = "processToolStripMenuItem";
this.processToolStripMenuItem.Size = new System.Drawing.Size(70, 24); this.processToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
this.processToolStripMenuItem.Text = "&Process"; this.processToolStripMenuItem.Text = "&Process";
// //
// completeToolStripMenuItem // completeToolStripMenuItem
// //
this.completeToolStripMenuItem.Name = "completeToolStripMenuItem"; this.completeToolStripMenuItem.Name = "completeToolStripMenuItem";
this.completeToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.completeToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.completeToolStripMenuItem.Text = "Complete"; this.completeToolStripMenuItem.Text = "Complete";
this.completeToolStripMenuItem.Click += new System.EventHandler(this.completeToolStripMenuItem_Click); this.completeToolStripMenuItem.Click += new System.EventHandler(this.completeToolStripMenuItem_Click);
// //
// toolStripMenuItem1 // toolStripMenuItem1
// //
this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(261, 6); this.toolStripMenuItem1.Size = new System.Drawing.Size(236, 6);
// //
// formatOnlyToolStripMenuItem // formatOnlyToolStripMenuItem
// //
this.formatOnlyToolStripMenuItem.Name = "formatOnlyToolStripMenuItem"; this.formatOnlyToolStripMenuItem.Name = "formatOnlyToolStripMenuItem";
this.formatOnlyToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.formatOnlyToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.formatOnlyToolStripMenuItem.Text = "Format Only"; this.formatOnlyToolStripMenuItem.Text = "Format Only";
this.formatOnlyToolStripMenuItem.Click += new System.EventHandler(this.formatOnlyToolStripMenuItem_Click); this.formatOnlyToolStripMenuItem.Click += new System.EventHandler(this.formatOnlyToolStripMenuItem_Click);
// //
// toolStripMenuItem2 // toolStripMenuItem2
// //
this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(261, 6); this.toolStripMenuItem2.Size = new System.Drawing.Size(236, 6);
// //
// convertDBToolStripMenuItem // convertDBToolStripMenuItem
// //
this.convertDBToolStripMenuItem.Name = "convertDBToolStripMenuItem"; this.convertDBToolStripMenuItem.Name = "convertDBToolStripMenuItem";
this.convertDBToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.convertDBToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.convertDBToolStripMenuItem.Text = "Convert DB"; this.convertDBToolStripMenuItem.Text = "Convert DB";
this.convertDBToolStripMenuItem.Click += new System.EventHandler(this.convertDBToolStripMenuItem_Click); this.convertDBToolStripMenuItem.Click += new System.EventHandler(this.convertDBToolStripMenuItem_Click);
// //
// fixTransitionsToolStripMenuItem // fixTransitionsToolStripMenuItem
// //
this.fixTransitionsToolStripMenuItem.Name = "fixTransitionsToolStripMenuItem"; this.fixTransitionsToolStripMenuItem.Name = "fixTransitionsToolStripMenuItem";
this.fixTransitionsToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.fixTransitionsToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.fixTransitionsToolStripMenuItem.Text = "Fix Transitions"; this.fixTransitionsToolStripMenuItem.Text = "Fix Transitions";
this.fixTransitionsToolStripMenuItem.Click += new System.EventHandler(this.fixTransitionsToolStripMenuItem_Click); this.fixTransitionsToolStripMenuItem.Click += new System.EventHandler(this.fixTransitionsToolStripMenuItem_Click);
// //
// convertToChangeManagerToolStripMenuItem // convertToChangeManagerToolStripMenuItem
// //
this.convertToChangeManagerToolStripMenuItem.Name = "convertToChangeManagerToolStripMenuItem"; this.convertToChangeManagerToolStripMenuItem.Name = "convertToChangeManagerToolStripMenuItem";
this.convertToChangeManagerToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.convertToChangeManagerToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.convertToChangeManagerToolStripMenuItem.Text = "Convert to Change Manager"; this.convertToChangeManagerToolStripMenuItem.Text = "Convert to Change Manager";
this.convertToChangeManagerToolStripMenuItem.Click += new System.EventHandler(this.convertToChangeManagerToolStripMenuItem_Click); this.convertToChangeManagerToolStripMenuItem.Click += new System.EventHandler(this.convertToChangeManagerToolStripMenuItem_Click);
// //
// convertToApprovalToolStripMenuItem // convertToApprovalToolStripMenuItem
// //
this.convertToApprovalToolStripMenuItem.Name = "convertToApprovalToolStripMenuItem"; this.convertToApprovalToolStripMenuItem.Name = "convertToApprovalToolStripMenuItem";
this.convertToApprovalToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.convertToApprovalToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.convertToApprovalToolStripMenuItem.Text = "Convert to Approval"; this.convertToApprovalToolStripMenuItem.Text = "Convert to Approval";
this.convertToApprovalToolStripMenuItem.Click += new System.EventHandler(this.convertToApprovalToolStripMenuItem_Click); this.convertToApprovalToolStripMenuItem.Click += new System.EventHandler(this.convertToApprovalToolStripMenuItem_Click);
// //
// load16BitApprovalToolStripMenuItem // load16BitApprovalToolStripMenuItem
// //
this.load16BitApprovalToolStripMenuItem.Name = "load16BitApprovalToolStripMenuItem"; this.load16BitApprovalToolStripMenuItem.Name = "load16BitApprovalToolStripMenuItem";
this.load16BitApprovalToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.load16BitApprovalToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.load16BitApprovalToolStripMenuItem.Text = "Load 16-Bit Approval"; this.load16BitApprovalToolStripMenuItem.Text = "Load 16-Bit Approval";
this.load16BitApprovalToolStripMenuItem.Click += new System.EventHandler(this.load16BitApprovalToolStripMenuItem_Click); this.load16BitApprovalToolStripMenuItem.Click += new System.EventHandler(this.load16BitApprovalToolStripMenuItem_Click);
// //
// fixesToolStripMenuItem // fixesToolStripMenuItem
// //
this.fixesToolStripMenuItem.Name = "fixesToolStripMenuItem"; this.fixesToolStripMenuItem.Name = "fixesToolStripMenuItem";
this.fixesToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.fixesToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.fixesToolStripMenuItem.Text = "Fixes"; this.fixesToolStripMenuItem.Text = "Fixes";
this.fixesToolStripMenuItem.Click += new System.EventHandler(this.fixesToolStripMenuItem_Click); this.fixesToolStripMenuItem.Click += new System.EventHandler(this.fixesToolStripMenuItem_Click);
// //
// fixROValuesToolStripMenuItem
//
this.fixROValuesToolStripMenuItem.Name = "fixROValuesToolStripMenuItem";
this.fixROValuesToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.fixROValuesToolStripMenuItem.Text = "Fix RO Values";
this.fixROValuesToolStripMenuItem.Click += new System.EventHandler(this.fixROValuesToolStripMenuItem_Click);
//
// createEmptyPROMSDatabaseToolStripMenuItem
//
this.createEmptyPROMSDatabaseToolStripMenuItem.Name = "createEmptyPROMSDatabaseToolStripMenuItem";
this.createEmptyPROMSDatabaseToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.createEmptyPROMSDatabaseToolStripMenuItem.Text = "Create Empty PROMS Database";
this.createEmptyPROMSDatabaseToolStripMenuItem.Click += new System.EventHandler(this.createEmptyPROMSDatabaseToolStripMenuItem_Click);
//
// settingsToolStripMenuItem // settingsToolStripMenuItem
// //
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(74, 24); this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.settingsToolStripMenuItem.Text = "&Settings"; this.settingsToolStripMenuItem.Text = "&Settings";
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click); this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
// //
@ -362,65 +395,65 @@ namespace DataLoader
this.toolStripMenuItem3, this.toolStripMenuItem3,
this.convertDbfSelectedInTreeToolStripMenuItem}); this.convertDbfSelectedInTreeToolStripMenuItem});
this.oldToolStripMenuItem.Name = "oldToolStripMenuItem"; this.oldToolStripMenuItem.Name = "oldToolStripMenuItem";
this.oldToolStripMenuItem.Size = new System.Drawing.Size(45, 24); this.oldToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
this.oldToolStripMenuItem.Text = "Old"; this.oldToolStripMenuItem.Text = "Old";
// //
// convertSecurityToolStripMenuItem // convertSecurityToolStripMenuItem
// //
this.convertSecurityToolStripMenuItem.Name = "convertSecurityToolStripMenuItem"; this.convertSecurityToolStripMenuItem.Name = "convertSecurityToolStripMenuItem";
this.convertSecurityToolStripMenuItem.Size = new System.Drawing.Size(268, 24); this.convertSecurityToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.convertSecurityToolStripMenuItem.Text = "Convert Security"; this.convertSecurityToolStripMenuItem.Text = "Convert Security";
this.convertSecurityToolStripMenuItem.Click += new System.EventHandler(this.convertSecurityToolStripMenuItem_Click); this.convertSecurityToolStripMenuItem.Click += new System.EventHandler(this.convertSecurityToolStripMenuItem_Click);
// //
// toolStripMenuItem4 // toolStripMenuItem4
// //
this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(265, 6); this.toolStripMenuItem4.Size = new System.Drawing.Size(221, 6);
// //
// convertTopFoldersToolStripMenuItem // convertTopFoldersToolStripMenuItem
// //
this.convertTopFoldersToolStripMenuItem.Name = "convertTopFoldersToolStripMenuItem"; this.convertTopFoldersToolStripMenuItem.Name = "convertTopFoldersToolStripMenuItem";
this.convertTopFoldersToolStripMenuItem.Size = new System.Drawing.Size(268, 24); this.convertTopFoldersToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.convertTopFoldersToolStripMenuItem.Text = "Convert Top Folders"; this.convertTopFoldersToolStripMenuItem.Text = "Convert Top Folders";
this.convertTopFoldersToolStripMenuItem.Click += new System.EventHandler(this.convertTopFoldersToolStripMenuItem_Click); this.convertTopFoldersToolStripMenuItem.Click += new System.EventHandler(this.convertTopFoldersToolStripMenuItem_Click);
// //
// loadTreeFromCSLAToolStripMenuItem // loadTreeFromCSLAToolStripMenuItem
// //
this.loadTreeFromCSLAToolStripMenuItem.Name = "loadTreeFromCSLAToolStripMenuItem"; this.loadTreeFromCSLAToolStripMenuItem.Name = "loadTreeFromCSLAToolStripMenuItem";
this.loadTreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(268, 24); this.loadTreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.loadTreeFromCSLAToolStripMenuItem.Text = "Load Tree From CSLA"; this.loadTreeFromCSLAToolStripMenuItem.Text = "Load Tree From CSLA";
this.loadTreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadTreeFromCSLAToolStripMenuItem_Click); this.loadTreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadTreeFromCSLAToolStripMenuItem_Click);
// //
// loadVETreeFromCSLAToolStripMenuItem // loadVETreeFromCSLAToolStripMenuItem
// //
this.loadVETreeFromCSLAToolStripMenuItem.Name = "loadVETreeFromCSLAToolStripMenuItem"; this.loadVETreeFromCSLAToolStripMenuItem.Name = "loadVETreeFromCSLAToolStripMenuItem";
this.loadVETreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(268, 24); this.loadVETreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.loadVETreeFromCSLAToolStripMenuItem.Text = "Load VETree From CSLA"; this.loadVETreeFromCSLAToolStripMenuItem.Text = "Load VETree From CSLA";
this.loadVETreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadVETreeFromCSLAToolStripMenuItem_Click); this.loadVETreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadVETreeFromCSLAToolStripMenuItem_Click);
// //
// groupSecurityToolStripMenuItem // groupSecurityToolStripMenuItem
// //
this.groupSecurityToolStripMenuItem.Name = "groupSecurityToolStripMenuItem"; this.groupSecurityToolStripMenuItem.Name = "groupSecurityToolStripMenuItem";
this.groupSecurityToolStripMenuItem.Size = new System.Drawing.Size(268, 24); this.groupSecurityToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.groupSecurityToolStripMenuItem.Text = "Group/Security"; this.groupSecurityToolStripMenuItem.Text = "Group/Security";
this.groupSecurityToolStripMenuItem.Click += new System.EventHandler(this.groupSecurityToolStripMenuItem_Click); this.groupSecurityToolStripMenuItem.Click += new System.EventHandler(this.groupSecurityToolStripMenuItem_Click);
// //
// countTokensToolStripMenuItem // countTokensToolStripMenuItem
// //
this.countTokensToolStripMenuItem.Name = "countTokensToolStripMenuItem"; this.countTokensToolStripMenuItem.Name = "countTokensToolStripMenuItem";
this.countTokensToolStripMenuItem.Size = new System.Drawing.Size(268, 24); this.countTokensToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.countTokensToolStripMenuItem.Text = "Count Tokens"; this.countTokensToolStripMenuItem.Text = "Count Tokens";
this.countTokensToolStripMenuItem.Click += new System.EventHandler(this.countTokensToolStripMenuItem_Click); this.countTokensToolStripMenuItem.Click += new System.EventHandler(this.countTokensToolStripMenuItem_Click);
// //
// toolStripMenuItem3 // toolStripMenuItem3
// //
this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(265, 6); this.toolStripMenuItem3.Size = new System.Drawing.Size(221, 6);
// //
// convertDbfSelectedInTreeToolStripMenuItem // convertDbfSelectedInTreeToolStripMenuItem
// //
this.convertDbfSelectedInTreeToolStripMenuItem.Name = "convertDbfSelectedInTreeToolStripMenuItem"; this.convertDbfSelectedInTreeToolStripMenuItem.Name = "convertDbfSelectedInTreeToolStripMenuItem";
this.convertDbfSelectedInTreeToolStripMenuItem.Size = new System.Drawing.Size(268, 24); this.convertDbfSelectedInTreeToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.convertDbfSelectedInTreeToolStripMenuItem.Text = "Convert Dbf Selected In Tree"; this.convertDbfSelectedInTreeToolStripMenuItem.Text = "Convert Dbf Selected In Tree";
this.convertDbfSelectedInTreeToolStripMenuItem.Click += new System.EventHandler(this.convertDbfSelectedInTreeToolStripMenuItem_Click); this.convertDbfSelectedInTreeToolStripMenuItem.Click += new System.EventHandler(this.convertDbfSelectedInTreeToolStripMenuItem_Click);
// //
@ -430,39 +463,47 @@ namespace DataLoader
this.approvalDatabasesToolStripMenuItem, this.approvalDatabasesToolStripMenuItem,
this.updateFormatsToolStripMenuItem}); this.updateFormatsToolStripMenuItem});
this.fixAllToolStripMenuItem.Name = "fixAllToolStripMenuItem"; this.fixAllToolStripMenuItem.Name = "fixAllToolStripMenuItem";
this.fixAllToolStripMenuItem.Size = new System.Drawing.Size(61, 24); this.fixAllToolStripMenuItem.Size = new System.Drawing.Size(50, 20);
this.fixAllToolStripMenuItem.Text = "Fix All"; this.fixAllToolStripMenuItem.Text = "Fix All";
// //
// approvalDatabasesToolStripMenuItem // approvalDatabasesToolStripMenuItem
// //
this.approvalDatabasesToolStripMenuItem.Name = "approvalDatabasesToolStripMenuItem"; this.approvalDatabasesToolStripMenuItem.Name = "approvalDatabasesToolStripMenuItem";
this.approvalDatabasesToolStripMenuItem.Size = new System.Drawing.Size(212, 24); this.approvalDatabasesToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.approvalDatabasesToolStripMenuItem.Text = "Approval Databases"; this.approvalDatabasesToolStripMenuItem.Text = "Approval Databases";
this.approvalDatabasesToolStripMenuItem.Click += new System.EventHandler(this.approvalDatabasesToolStripMenuItem_Click); this.approvalDatabasesToolStripMenuItem.Click += new System.EventHandler(this.approvalDatabasesToolStripMenuItem_Click);
// //
// updateFormatsToolStripMenuItem // updateFormatsToolStripMenuItem
// //
this.updateFormatsToolStripMenuItem.Name = "updateFormatsToolStripMenuItem"; this.updateFormatsToolStripMenuItem.Name = "updateFormatsToolStripMenuItem";
this.updateFormatsToolStripMenuItem.Size = new System.Drawing.Size(212, 24); this.updateFormatsToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.updateFormatsToolStripMenuItem.Text = "Update Formats"; this.updateFormatsToolStripMenuItem.Text = "Update Formats";
this.updateFormatsToolStripMenuItem.Click += new System.EventHandler(this.updateFormatsToolStripMenuItem_Click); this.updateFormatsToolStripMenuItem.Click += new System.EventHandler(this.updateFormatsToolStripMenuItem_Click);
// //
// fixROValuesToolStripMenuItem // fixROsToolStripMenuItem
// //
this.fixROValuesToolStripMenuItem.Name = "fixROValuesToolStripMenuItem"; this.fixROsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fixROValuesToolStripMenuItem.Size = new System.Drawing.Size(264, 24); this.fixROsToolStripMenuItem1});
this.fixROValuesToolStripMenuItem.Text = "Fix RO Values"; this.fixROsToolStripMenuItem.Name = "fixROsToolStripMenuItem";
this.fixROValuesToolStripMenuItem.Click += new System.EventHandler(this.fixROValuesToolStripMenuItem_Click); this.fixROsToolStripMenuItem.Size = new System.Drawing.Size(67, 20);
this.fixROsToolStripMenuItem.Text = "Selection";
//
// fixROsToolStripMenuItem1
//
this.fixROsToolStripMenuItem1.Name = "fixROsToolStripMenuItem1";
this.fixROsToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
this.fixROsToolStripMenuItem1.Text = "Fix ROs";
this.fixROsToolStripMenuItem1.Click += new System.EventHandler(this.fixROsToolStripMenuItem1_Click);
// //
// frmLoader // frmLoader
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(885, 485); this.ClientSize = new System.Drawing.Size(664, 394);
this.Controls.Add(this.statusStrip1); this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.sc); this.Controls.Add(this.sc);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "frmLoader"; this.Name = "frmLoader";
this.Text = "PROMS-2010 Data Loader"; this.Text = "PROMS-2010 Data Loader";
this.Load += new System.EventHandler(this.frmLoader_Load); this.Load += new System.EventHandler(this.frmLoader_Load);
@ -526,5 +567,9 @@ namespace DataLoader
private System.Windows.Forms.ToolStripMenuItem approvalDatabasesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem approvalDatabasesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateFormatsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem updateFormatsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fixROValuesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem fixROValuesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem createEmptyPROMSDatabaseToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fixROsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fixROsToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem loadTreeToolStripMenuItem;
} }
} }

View File

@ -335,6 +335,7 @@ namespace DataLoader
ROImageInfo.ZipImages(); ROImageInfo.ZipImages();
success = ldr.LoadFoldersIntoExisting(MySettings.VEPromsPath); success = ldr.LoadFoldersIntoExisting(MySettings.VEPromsPath);
} }
if (createEmptyPROMS) return;
if (success) if (success)
{ {
TimeSpan ts = new TimeSpan(); TimeSpan ts = new TimeSpan();
@ -618,6 +619,11 @@ namespace DataLoader
MySettings.LoadApproved = Properties.Settings.Default.LoadApproved; MySettings.LoadApproved = Properties.Settings.Default.LoadApproved;
MySettings.Phase4Suffix = Properties.Settings.Default.Phase4; MySettings.Phase4Suffix = Properties.Settings.Default.Phase4;
MySettings.RedPDFs = (Properties.Settings.Default.RedPDFs == CheckState.Checked); MySettings.RedPDFs = (Properties.Settings.Default.RedPDFs == CheckState.Checked);
MySettings.AnnotateWhenConvertingToText = Properties.Settings.Default.AnnotateWhenConvertingToText;
MySettings.AnnotateWhenShowingDifferentRO = Properties.Settings.Default.AnnotateWhenShowingDifferentRO;
MySettings.AnnotateWhenShowingMissingRO = Properties.Settings.Default.AnnotateWhenShowingMissingRO;
MySettings.SelectedROFst = Properties.Settings.Default.SelectedROFst;
MySettings.WhatROsToConvert = (ROUpdateMode)Properties.Settings.Default.WhatROsToConvert;
string validity = MySettings.ValidityCheck; string validity = MySettings.ValidityCheck;
if (validity != "") if (validity != "")
{ {
@ -674,6 +680,11 @@ namespace DataLoader
Properties.Settings.Default.LoadApproved = MySettings.LoadApproved; Properties.Settings.Default.LoadApproved = MySettings.LoadApproved;
Properties.Settings.Default.Phase4 = MySettings.Phase4Suffix; Properties.Settings.Default.Phase4 = MySettings.Phase4Suffix;
Properties.Settings.Default.RedPDFs = MySettings.RedPDFs ? CheckState.Checked : CheckState.Unchecked; Properties.Settings.Default.RedPDFs = MySettings.RedPDFs ? CheckState.Checked : CheckState.Unchecked;
Properties.Settings.Default.AnnotateWhenConvertingToText = MySettings.AnnotateWhenConvertingToText;
Properties.Settings.Default.AnnotateWhenShowingDifferentRO = MySettings.AnnotateWhenShowingDifferentRO;
Properties.Settings.Default.AnnotateWhenShowingMissingRO = MySettings.AnnotateWhenShowingMissingRO;
Properties.Settings.Default.SelectedROFst = MySettings.SelectedROFst;
Properties.Settings.Default.WhatROsToConvert = (int)MySettings.WhatROsToConvert;
Properties.Settings.Default.Save(); Properties.Settings.Default.Save();
} }
private void frmLoader_Load(object sender, EventArgs e) private void frmLoader_Load(object sender, EventArgs e)
@ -705,7 +716,7 @@ namespace DataLoader
//if (!CheckLogPath()) return; //if (!CheckLogPath()) return;
using (StepRTB rtb = new StepRTB()) using (StepRTB rtb = new StepRTB())
{ {
TransitionFixer myFixer = new TransitionFixer(rtb, MySettings.LogFilePath); TransitionFixer myFixer = new TransitionFixer(rtb, MySettings.LogFilePath, this);
myFixer.StatusChanged += new TransitionFixerEvent(myFixer_StatusChanged); myFixer.StatusChanged += new TransitionFixerEvent(myFixer_StatusChanged);
TimeSpan howlong = myFixer.Process(MySettings.CheckRTF); TimeSpan howlong = myFixer.Process(MySettings.CheckRTF);
string TransFixTime = string.Format("Fix Transitions completion time: {0:D2}:{1:D2}:{2:D2}.{3}", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds); string TransFixTime = string.Format("Fix Transitions completion time: {0:D2}:{1:D2}:{2:D2}.{3}", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds);
@ -831,7 +842,7 @@ namespace DataLoader
// Phase 1 - Convert dBase to SQL // Phase 1 - Convert dBase to SQL
btnConvert_Click(this, new System.EventArgs()); btnConvert_Click(this, new System.EventArgs());
if (ProcessFailed) return; if (ProcessFailed) return;
if (ChildrenProcessed == 0) if (ChildrenProcessed == 0 && !createEmptyPROMS)
{ {
MessageBox.Show("No children found to convert. Check vlnControl.xml file. Process complete"); MessageBox.Show("No children found to convert. Check vlnControl.xml file. Process complete");
return; return;
@ -841,8 +852,11 @@ namespace DataLoader
Backup("_" + MySettings.Phase1Suffix); Backup("_" + MySettings.Phase1Suffix);
mb.Append("Phase 1 Backup Complete"); mb.Append("Phase 1 Backup Complete");
// Phase 2 - Fix Transitions // Phase 2 - Fix Transitions
btnFixTransitions_Click(this, new System.EventArgs()); if (!createEmptyPROMS)
mb.Append("Fix Transtions Complete"); {
btnFixTransitions_Click(this, new System.EventArgs());
mb.Append("Fix Transtions Complete");
}
Status = "Backing up Phase 2 Data"; Status = "Backing up Phase 2 Data";
Backup("_" + MySettings.Phase2Suffix); Backup("_" + MySettings.Phase2Suffix);
mb.Append("Phase 2 Backup Complete"); mb.Append("Phase 2 Backup Complete");
@ -861,7 +875,7 @@ namespace DataLoader
} }
if(!FixProceduresAndFunctions()) return; if(!FixProceduresAndFunctions()) return;
mb.Append("FixProceduresAndFunctions Complete"); mb.Append("FixProceduresAndFunctions Complete");
if (MySettings.LoadApproved) if (MySettings.LoadApproved && !createEmptyPROMS)
{ {
Status = "Backing up Phase 4 Data"; Status = "Backing up Phase 4 Data";
Backup("_" + MySettings.Phase4Suffix); Backup("_" + MySettings.Phase4Suffix);
@ -1144,7 +1158,6 @@ namespace DataLoader
//} //}
} }
private void fixROValuesToolStripMenuItem_Click(object sender, EventArgs e) private void fixROValuesToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", MySettings.DBName); Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", MySettings.DBName);
@ -1159,6 +1172,91 @@ namespace DataLoader
{ {
Status = args.MyStatus; Status = args.MyStatus;
} }
public bool createEmptyPROMS = false;
private void createEmptyPROMSDatabaseToolStripMenuItem_Click(object sender, EventArgs e)
{
createEmptyPROMS = true;
completeToolStripMenuItem_Click(sender, e);
createEmptyPROMS = false;
}
private void loadTreeToolStripMenuItem_Click(object sender, EventArgs e)
{
tv.CheckBoxes = false;
tv.Nodes.Clear();
Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", MySettings.DBName);
FolderInfo fi = FolderInfo.GetTop();
TreeNode tn = tv.Nodes.Add(fi.Name);
tn.Tag = fi;
if (fi.ChildFolderCount > 0)
LoadChildFolders(fi, tn);
//if (myTV.SelectedNode != null)
// myTV.SelectedNode.Expand();
}
private void LoadChildFolders(FolderInfo fi, TreeNode tn)
{
foreach (FolderInfo fic in fi.ChildFolders)
{
TreeNode tnc = tn.Nodes.Add(fic.Name);
tnc.Tag = fic;
if (fic.ChildFolderCount > 0)
LoadChildFolders(fic, tnc);
if (fic.FolderDocVersionCount > 0)
LoadDocVersions(fic, tnc);
}
}
private void LoadDocVersions(FolderInfo fic, TreeNode tnc)
{
foreach (DocVersionInfo dvi in fic.FolderDocVersions)
{
TreeNode tn = tnc.Nodes.Add(dvi.Name);
tn.Tag = dvi;
if (dvi.Procedures.Count > 0)
LoadProcedures(dvi, tn);
}
}
private void LoadProcedures(DocVersionInfo dvi, TreeNode tnc)
{
foreach (ProcedureInfo pi in dvi.Procedures)
{
TreeNode tn = tnc.Nodes.Add(pi.DisplayNumber);
tn.Tag = pi;
}
}
private void fixROsToolStripMenuItem1_Click(object sender, EventArgs e)
{
TreeNode tn = tv.SelectedNode;
if (tn.Tag is ProcedureInfo)
{
ProcedureInfo pi = tn.Tag as ProcedureInfo;
Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", MySettings.DBName);
ROFixer myRoFixer = new ROFixer(MySettings.LogFilePath, this);
myRoFixer.StatusChanged += new ROFixerEvent(myRoFixer_StatusChanged);
TimeSpan howlong = myRoFixer.Process(pi);
string RoFixTime = string.Format("Fix RO Values completion time: {0:D2}:{1:D2}:{2:D2}.{3}", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds);
MyInfo = RoFixTime;
}
else if (tn.Tag is DocVersionInfo)
{
DocVersionInfo dvi = tn.Tag as DocVersionInfo;
Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", MySettings.DBName);
ROFixer myRoFixer = new ROFixer(MySettings.LogFilePath, this);
myRoFixer.StatusChanged += new ROFixerEvent(myRoFixer_StatusChanged);
TimeSpan howlong = myRoFixer.Process(dvi);
string RoFixTime = string.Format("Fix RO Values completion time: {0:D2}:{1:D2}:{2:D2}.{3}", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds);
MyInfo = RoFixTime;
}
//else if (tn.Tag is FolderInfo)
//{
// FolderInfo fi = tn.Tag as FolderInfo;
//}
}
} }
public class MessageBuilder public class MessageBuilder
{ {