diff --git a/PROMS/VEPROMS User Interface/frmRODbProperties.Designer.cs b/PROMS/VEPROMS User Interface/frmRODbProperties.Designer.cs
new file mode 100644
index 00000000..8338938c
--- /dev/null
+++ b/PROMS/VEPROMS User Interface/frmRODbProperties.Designer.cs
@@ -0,0 +1,207 @@
+namespace VEPROMS
+{
+ partial class frmRODbProperties
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmRODbProperties));
+ this.ppBtnOk = new System.Windows.Forms.Button();
+ this.ppBtnCancel = new System.Windows.Forms.Button();
+ this.ppPnlRODb = new DevComponents.DotNetBar.PanelEx();
+ this.ppTxtExt = new System.Windows.Forms.TextBox();
+ this.ppTxtPath = new System.Windows.Forms.TextBox();
+ this.ppLblGraphicFileExtLoc = new System.Windows.Forms.Label();
+ this.ppLblExt = new System.Windows.Forms.Label();
+ this.ppBtnFldrDlg = new DevComponents.DotNetBar.ButtonX();
+ this.ppLblPath = new System.Windows.Forms.Label();
+ this.ppRTxtName = new System.Windows.Forms.RichTextBox();
+ this.ppLblName = new System.Windows.Forms.Label();
+ this.ppPnlRODb.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // ppBtnOk
+ //
+ this.ppBtnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.ppBtnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.ppBtnOk.Location = new System.Drawing.Point(471, 201);
+ this.ppBtnOk.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.ppBtnOk.Name = "ppBtnOk";
+ this.ppBtnOk.Size = new System.Drawing.Size(66, 26);
+ this.ppBtnOk.TabIndex = 1;
+ this.ppBtnOk.Text = "OK";
+ this.ppBtnOk.UseVisualStyleBackColor = true;
+ this.ppBtnOk.Click += new System.EventHandler(this.ppBtnOk_Click);
+ //
+ // ppBtnCancel
+ //
+ this.ppBtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.ppBtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.ppBtnCancel.Location = new System.Drawing.Point(552, 201);
+ this.ppBtnCancel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.ppBtnCancel.Name = "ppBtnCancel";
+ this.ppBtnCancel.Size = new System.Drawing.Size(66, 26);
+ this.ppBtnCancel.TabIndex = 2;
+ this.ppBtnCancel.Text = "Cancel";
+ this.ppBtnCancel.UseVisualStyleBackColor = true;
+ //
+ // ppPnlRODb
+ //
+ this.ppPnlRODb.CanvasColor = System.Drawing.SystemColors.Control;
+ this.ppPnlRODb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.ppPnlRODb.Controls.Add(this.ppTxtExt);
+ this.ppPnlRODb.Controls.Add(this.ppTxtPath);
+ this.ppPnlRODb.Controls.Add(this.ppLblGraphicFileExtLoc);
+ this.ppPnlRODb.Controls.Add(this.ppLblExt);
+ this.ppPnlRODb.Controls.Add(this.ppBtnFldrDlg);
+ this.ppPnlRODb.Controls.Add(this.ppLblPath);
+ this.ppPnlRODb.Controls.Add(this.ppRTxtName);
+ this.ppPnlRODb.Controls.Add(this.ppLblName);
+ this.ppPnlRODb.Dock = System.Windows.Forms.DockStyle.Top;
+ this.ppPnlRODb.Location = new System.Drawing.Point(0, 0);
+ this.ppPnlRODb.Name = "ppPnlRODb";
+ this.ppPnlRODb.Size = new System.Drawing.Size(646, 192);
+ this.ppPnlRODb.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.ppPnlRODb.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.ppPnlRODb.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.ppPnlRODb.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
+ this.ppPnlRODb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.ppPnlRODb.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.ppPnlRODb.Style.GradientAngle = 90;
+ this.ppPnlRODb.TabIndex = 3;
+ //
+ // ppTxtExt
+ //
+ this.ppTxtExt.Enabled = false;
+ this.ppTxtExt.Location = new System.Drawing.Point(200, 106);
+ this.ppTxtExt.Name = "ppTxtExt";
+ this.ppTxtExt.Size = new System.Drawing.Size(275, 22);
+ this.ppTxtExt.TabIndex = 41;
+ //
+ // ppTxtPath
+ //
+ this.ppTxtPath.Location = new System.Drawing.Point(129, 68);
+ this.ppTxtPath.Name = "ppTxtPath";
+ this.ppTxtPath.Size = new System.Drawing.Size(389, 22);
+ this.ppTxtPath.TabIndex = 40;
+ //
+ // ppLblGraphicFileExtLoc
+ //
+ this.ppLblGraphicFileExtLoc.AutoSize = true;
+ this.ppLblGraphicFileExtLoc.BackColor = System.Drawing.Color.Transparent;
+ this.ppLblGraphicFileExtLoc.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.ppLblGraphicFileExtLoc.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
+ this.ppLblGraphicFileExtLoc.Location = new System.Drawing.Point(197, 131);
+ this.ppLblGraphicFileExtLoc.Name = "ppLblGraphicFileExtLoc";
+ this.ppLblGraphicFileExtLoc.Size = new System.Drawing.Size(61, 17);
+ this.ppLblGraphicFileExtLoc.TabIndex = 39;
+ this.ppLblGraphicFileExtLoc.Text = "(default)";
+ //
+ // ppLblExt
+ //
+ this.ppLblExt.AutoSize = true;
+ this.ppLblExt.BackColor = System.Drawing.Color.Transparent;
+ this.ppLblExt.Location = new System.Drawing.Point(33, 106);
+ this.ppLblExt.Name = "ppLblExt";
+ this.ppLblExt.Size = new System.Drawing.Size(149, 17);
+ this.ppLblExt.TabIndex = 38;
+ this.ppLblExt.Text = "Graphic File Extension";
+ //
+ // ppBtnFldrDlg
+ //
+ this.ppBtnFldrDlg.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.ppBtnFldrDlg.BackColor = System.Drawing.Color.Transparent;
+ this.ppBtnFldrDlg.Image = ((System.Drawing.Image)(resources.GetObject("ppBtnFldrDlg.Image")));
+ this.ppBtnFldrDlg.Location = new System.Drawing.Point(539, 62);
+ this.ppBtnFldrDlg.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.ppBtnFldrDlg.Name = "ppBtnFldrDlg";
+ this.ppBtnFldrDlg.Size = new System.Drawing.Size(21, 23);
+ this.ppBtnFldrDlg.TabIndex = 37;
+ this.ppBtnFldrDlg.Click += new System.EventHandler(this.ppBtnFldrDlg_Click);
+ //
+ // ppLblPath
+ //
+ this.ppLblPath.AutoSize = true;
+ this.ppLblPath.BackColor = System.Drawing.Color.Transparent;
+ this.ppLblPath.Location = new System.Drawing.Point(30, 68);
+ this.ppLblPath.Name = "ppLblPath";
+ this.ppLblPath.Size = new System.Drawing.Size(62, 17);
+ this.ppLblPath.TabIndex = 17;
+ this.ppLblPath.Text = "RO Path";
+ //
+ // ppRTxtName
+ //
+ this.ppRTxtName.Location = new System.Drawing.Point(129, 28);
+ this.ppRTxtName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.ppRTxtName.Multiline = false;
+ this.ppRTxtName.Name = "ppRTxtName";
+ this.ppRTxtName.Size = new System.Drawing.Size(389, 22);
+ this.ppRTxtName.TabIndex = 16;
+ this.ppRTxtName.Text = "";
+ //
+ // ppLblName
+ //
+ this.ppLblName.AutoSize = true;
+ this.ppLblName.BackColor = System.Drawing.Color.Transparent;
+ this.ppLblName.Location = new System.Drawing.Point(30, 31);
+ this.ppLblName.Name = "ppLblName";
+ this.ppLblName.Size = new System.Drawing.Size(93, 17);
+ this.ppLblName.TabIndex = 15;
+ this.ppLblName.Text = "RO Fst Name";
+ //
+ // frmRODbProperties
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(125)))), ((int)(((byte)(125)))), ((int)(((byte)(125)))));
+ this.ClientSize = new System.Drawing.Size(646, 238);
+ this.Controls.Add(this.ppPnlRODb);
+ this.Controls.Add(this.ppBtnCancel);
+ this.Controls.Add(this.ppBtnOk);
+ this.Name = "frmRODbProperties";
+ this.Text = "RO Database Properties";
+ this.Load += new System.EventHandler(this.frmRODbProperties_Load);
+ this.ppPnlRODb.ResumeLayout(false);
+ this.ppPnlRODb.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button ppBtnOk;
+ private System.Windows.Forms.Button ppBtnCancel;
+ private DevComponents.DotNetBar.PanelEx ppPnlRODb;
+ private System.Windows.Forms.Label ppLblPath;
+ private System.Windows.Forms.RichTextBox ppRTxtName;
+ private System.Windows.Forms.Label ppLblName;
+ private DevComponents.DotNetBar.ButtonX ppBtnFldrDlg;
+ private System.Windows.Forms.Label ppLblGraphicFileExtLoc;
+ private System.Windows.Forms.Label ppLblExt;
+ private System.Windows.Forms.TextBox ppTxtPath;
+ private System.Windows.Forms.TextBox ppTxtExt;
+ }
+}
\ No newline at end of file
diff --git a/PROMS/VEPROMS User Interface/frmRODbProperties.cs b/PROMS/VEPROMS User Interface/frmRODbProperties.cs
new file mode 100644
index 00000000..913f51ea
--- /dev/null
+++ b/PROMS/VEPROMS User Interface/frmRODbProperties.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using VEPROMS.CSLA.Library;
+
+namespace VEPROMS
+{
+ public partial class frmRODbProperties : Form
+ {
+ private RODbInfo _roDbInfo;
+ private string _origROName;
+ private string _origFolderPath;
+ private DocVersion _docVersion;
+ public frmRODbProperties(DocVersion docVersion, RODbInfo roDbInfo)
+ {
+ _roDbInfo = roDbInfo;
+ _docVersion = docVersion;
+ InitializeComponent();
+ _origROName = (_roDbInfo == null) ? null : _roDbInfo.ROName;
+ _origFolderPath = (_roDbInfo == null) ? null : _roDbInfo.FolderPath;
+ }
+
+ private void ppBtnFldrDlg_Click(object sender, EventArgs e)
+ {
+ FolderBrowserDialog dlgROFolder = new FolderBrowserDialog();
+ if (dlgROFolder.ShowDialog() == DialogResult.OK)
+ {
+ ppTxtPath.Text = dlgROFolder.SelectedPath;
+ }
+ }
+
+ private void ppBtnOk_Click(object sender, EventArgs e)
+ {
+ // check for modify - if modify, just save current data, close & return.
+ if (_origROName !=null && _origFolderPath !=null && (_origROName != ppRTxtName.Text || _origFolderPath != ppTxtPath.Text))
+ {
+ RODb roDb = RODb.Get(_roDbInfo.RODbID);
+ if (_origROName != ppRTxtName.Text) roDb.ROName = ppRTxtName.Text;
+ if (_origFolderPath != ppTxtPath.Text) roDb.FolderPath = ppTxtPath.Text;
+ roDb.Save().Dispose();
+ Close();
+ return;
+ }
+
+ // this is creating a new rodb. A new rofst record will be created as well & the association set
+ // check for unique name/path first
+ RODbInfoList allrodbinfo = RODbInfoList.Get();
+ foreach (RODbInfo rdi in allrodbinfo)
+ {
+ if (ppRTxtName.Text == rdi.ROName || ppTxtPath.Text == rdi.FolderPath)
+ {
+ MessageBox.Show("Name and/or folder path are not unique, create unique names.");
+ return;
+ }
+ }
+ if (ppRTxtName.Text == null || ppRTxtName.Text == "")
+ {
+ MessageBox.Show("You must enter a Name.");
+ return;
+ }
+ if (ppTxtPath.Text == null || ppTxtPath.Text == "")
+ {
+ MessageBox.Show("You must enter a Path.");
+ return;
+ }
+
+ // check for an ro.fst existing in the selected path. If it is valid, create an rodb, rofst
+ // and an association to its docversion.
+ string rofstPath = ppTxtPath.Text + @"\ro.fst";
+ if (!File.Exists(rofstPath))
+ {
+ MessageBox.Show("No existing ro.fst in path " + ppTxtPath.Text + ". Check for invalid path");
+ return;
+ }
+ RODb newroDb = RODb.MakeRODb(ppRTxtName.Text, ppTxtPath.Text, "cstring", null);
+ RODbInfo newrdi = RODbInfo.Get(newroDb.RODbID);
+ newroDb.Save().Dispose();
+ ROFst rofst = ROFstInfo.AddRoFst(newrdi, _docVersion);
+ Close();
+ }
+ private void frmRODbProperties_Load(object sender, EventArgs e)
+ {
+ ppRTxtName.Text = (_roDbInfo == null) ? null : _roDbInfo.ROName;
+ ppTxtPath.Text = (_roDbInfo == null) ? null : _roDbInfo.FolderPath;
+ RODbConfig cfg = (_roDbInfo == null) ? new RODbConfig() : new RODbConfig(_roDbInfo);
+ // Note that the Graphic Extension data is shown in a non-editable text box here because
+ // the data is either retrieved from the roapp.ini - and if there can only be editted from
+ // the file system. Otherwise it is derived from the top node - and changed from folder
+ // properties on the top node. And lastly, it is the code default.
+ ppTxtExt.Text = cfg.GetDefaultGraphicExtension();
+ ppLblGraphicFileExtLoc.Text = (cfg == null) ? null : cfg.GetDefaultGraphicExtensionLocation();
+ if (_roDbInfo == null)
+ {
+ string newFolderPath = null;
+ FolderBrowserDialog dlgROFolder = new FolderBrowserDialog();
+ if (dlgROFolder.ShowDialog() == DialogResult.OK)
+ {
+ newFolderPath = dlgROFolder.SelectedPath;
+ }
+ ppTxtPath.Text = newFolderPath;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/PROMS/VEPROMS User Interface/frmRODbProperties.resx b/PROMS/VEPROMS User Interface/frmRODbProperties.resx
new file mode 100644
index 00000000..2e56328a
--- /dev/null
+++ b/PROMS/VEPROMS User Interface/frmRODbProperties.resx
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBQAA
+ CwUByY3ISQAAAn9JREFUOE+lk2tI01EYxhf0oU8WqVEIRpaIBWJgSPUhROmippS3QkkTylsXDMW8ts3b
+ 1G06daVibuqaOq0sxbBCKBSJ0PJCialZUFSKqaGSt1//TbIsww8deOBwznl+5zkv71kHiP5rGAFrKb1Q
+ 5ypR6bmaVU6m2kCiXJv007Om2XgwJEaNT4QiyDi/GF9mKRVgsWkav+CYQkR1utwAQfypphqZ4l/JIhOL
+ jvtGKfCOyDMB6O/WMjNea9L3MT1zIxoM5QrqdWnS1SA+kUq8w1V4hhUgqq1QMj1WtcK88KmIud5oqsqy
+ qCzOQFMopSQvhRvyBApkcQLzV91E1docpr9ol29eFMz0J0Bv2Kr6C3CrVMa3jyWm2EZzc12OSQ8M2TTo
+ ZdytzMCgSUVfIqFcfY2bqiSKlQmoc+JNaUSVJRlMvsvHGHuoVUx9lZKFIQkMp63UW2FtMBH6YuBVFF01
+ /lwO9aoQadSpTAxkwXs596oVtD+ULx36/Qkvg6HDl/k2D2YeufCmwoELZ45MCIA9olKVmK+vJQy3JVOv
+ l7M4KIae8CVAV6hgPMV8uxczLYeZbDrIaN1eJBG2nHazyDN1cZEymdHueG7rcuh8KiTpixYA56AziMVn
+ J5h9coyp5kOM1TvxudqejvRNBHrY4GRnZmcCqLMT6GlJ4Y4uGwZS4IUQ97kfs62eTD12YbzBmRGDAx+0
+ u+iVmyMO24njbqvG5VbOz4yjtjyL3vuRdOSKltUuX0+LbAON0o3UJFmiibPi+pXtBLrvWHR2tHZfBuSm
+ xZIrPk9mfAiJlwKMleWsvxsnj+7H9YAD+xxssbexwnqbBVs2m7HV3GxlI631E9fa/wGRpaRpa3TTbQAA
+ AABJRU5ErkJggg==
+
+
+
\ No newline at end of file