diff --git a/PROMS/Volian.Controls.Library/DisplayRO.Designer.cs b/PROMS/Volian.Controls.Library/DisplayRO.Designer.cs
new file mode 100644
index 00000000..c7e0c2d2
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayRO.Designer.cs
@@ -0,0 +1,129 @@
+namespace Volian.Controls.Library
+{
+ partial class DisplayRO
+ {
+ ///
+ /// 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 Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.tvROFST = new System.Windows.Forms.TreeView();
+ this.panelValue = new System.Windows.Forms.Panel();
+ this.panelRoValue = new System.Windows.Forms.Panel();
+ this.tbROValue = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.lblROValue = new DevComponents.DotNetBar.LabelX();
+ this.btnInsertRO = new DevComponents.DotNetBar.ButtonX();
+ this.panelValue.SuspendLayout();
+ this.panelRoValue.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tvROFST
+ //
+ this.tvROFST.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tvROFST.Location = new System.Drawing.Point(0, 52);
+ this.tvROFST.Name = "tvROFST";
+ this.tvROFST.Size = new System.Drawing.Size(226, 455);
+ this.tvROFST.TabIndex = 5;
+ this.tvROFST.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tvROFST_BeforeExpand);
+ this.tvROFST.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvROFST_AfterSelect);
+ //
+ // panelValue
+ //
+ this.panelValue.Controls.Add(this.panelRoValue);
+ this.panelValue.Controls.Add(this.btnInsertRO);
+ this.panelValue.Dock = System.Windows.Forms.DockStyle.Top;
+ this.panelValue.Location = new System.Drawing.Point(0, 0);
+ this.panelValue.Name = "panelValue";
+ this.panelValue.Size = new System.Drawing.Size(226, 53);
+ this.panelValue.TabIndex = 7;
+ //
+ // panelRoValue
+ //
+ this.panelRoValue.Controls.Add(this.tbROValue);
+ this.panelRoValue.Controls.Add(this.lblROValue);
+ this.panelRoValue.Dock = System.Windows.Forms.DockStyle.Top;
+ this.panelRoValue.Location = new System.Drawing.Point(0, 0);
+ this.panelRoValue.Name = "panelRoValue";
+ this.panelRoValue.Size = new System.Drawing.Size(226, 25);
+ this.panelRoValue.TabIndex = 8;
+ //
+ // tbROValue
+ //
+ this.tbROValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ //
+ //
+ //
+ this.tbROValue.Border.Class = "TextBoxBorder";
+ this.tbROValue.Location = new System.Drawing.Point(54, 0);
+ this.tbROValue.Name = "tbROValue";
+ this.tbROValue.Size = new System.Drawing.Size(167, 25);
+ this.tbROValue.TabIndex = 7;
+ //
+ // lblROValue
+ //
+ this.lblROValue.Dock = System.Windows.Forms.DockStyle.Left;
+ this.lblROValue.Location = new System.Drawing.Point(0, 0);
+ this.lblROValue.Name = "lblROValue";
+ this.lblROValue.Size = new System.Drawing.Size(59, 25);
+ this.lblROValue.TabIndex = 6;
+ this.lblROValue.Text = "RO Value:";
+ //
+ // btnInsertRO
+ //
+ this.btnInsertRO.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnInsertRO.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnInsertRO.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.btnInsertRO.Location = new System.Drawing.Point(0, 27);
+ this.btnInsertRO.Name = "btnInsertRO";
+ this.btnInsertRO.Size = new System.Drawing.Size(226, 26);
+ this.btnInsertRO.TabIndex = 7;
+ this.btnInsertRO.Text = "Select RO";
+ //
+ // DisplayRO
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.panelValue);
+ this.Controls.Add(this.tvROFST);
+ this.Name = "DisplayRO";
+ this.Size = new System.Drawing.Size(226, 507);
+ this.panelValue.ResumeLayout(false);
+ this.panelRoValue.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TreeView tvROFST;
+ private System.Windows.Forms.Panel panelValue;
+ private DevComponents.DotNetBar.ButtonX btnInsertRO;
+ private System.Windows.Forms.Panel panelRoValue;
+ private DevComponents.DotNetBar.Controls.TextBoxX tbROValue;
+ private DevComponents.DotNetBar.LabelX lblROValue;
+ }
+}
diff --git a/PROMS/Volian.Controls.Library/DisplayRO.cs b/PROMS/Volian.Controls.Library/DisplayRO.cs
new file mode 100644
index 00000000..ace5a4cb
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayRO.cs
@@ -0,0 +1,161 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using VEPROMS.CSLA.Library;
+
+namespace Volian.Controls.Library
+{
+ public partial class DisplayRO : UserControl
+ {
+ #region Properties
+ private ROFST _MyROFST;
+ public ROFST MyROFST
+ {
+ get { return _MyROFST; }
+ set
+ {
+ _MyROFST = value;
+ LoadTree();
+ }
+ }
+ private bool _Modify = false;
+ public bool Modify
+ {
+ get { return _Modify; }
+ set { _Modify = value; }
+ }
+ private ItemInfo _CurItem;
+ public ItemInfo CurItem
+ {
+ get { return _CurItem; }
+ set { _CurItem = value; }
+ }
+ private DisplayRTB _MyRTB;
+
+ public DisplayRTB MyRTB
+ {
+ get { return _MyRTB; }
+ set { _MyRTB = value; }
+ }
+ #endregion
+ #region Constructors
+ public DisplayRO()
+ {
+ InitializeComponent();
+ }
+ public DisplayRO(ROFST rofst, ItemInfo curitm, bool modify, DisplayRTB rtb)
+ {
+ _MyROFST = rofst;
+ _CurItem = curitm;
+ _Modify = modify;
+ _MyRTB = rtb;
+ InitializeComponent();
+ LoadTree();
+ }
+ #endregion
+ #region Events
+ private void tvROFST_AfterSelect(object sender, TreeViewEventArgs e)
+ {
+ if (e.Node.Tag is ROFST.rochild)
+ {
+ ROFST.rochild chld = (ROFST.rochild)e.Node.Tag;
+ if (chld.type == 1 && chld.value != null) tbROValue.Text = chld.value;
+ else tbROValue.Text = null;
+ }
+ else
+ tbROValue.Text = null;
+ }
+
+ private void tvROFST_BeforeExpand(object sender, TreeViewCancelEventArgs e)
+ {
+ LoadChildren(e.Node);
+ }
+ private void LoadChildren(TreeNode tn)
+ {
+ object tag = tn.Tag;
+ if (tn.FirstNode != null && tn.FirstNode.Text == "VLN_DUMMY_FOR_TREE") tn.FirstNode.Remove();
+ ROFST.rochild[] chld = null;
+
+ if (tn.Tag is ROFST.rodbi)
+ {
+ ROFST.rodbi db = (ROFST.rodbi)tn.Tag;
+ chld = db.children;
+ }
+ else if (tn.Tag is ROFST.rochild)
+ {
+ ROFST.rochild ch = (ROFST.rochild)tn.Tag;
+ chld = ch.children;
+ }
+ else
+ {
+ Console.WriteLine("error - no type");
+ return;
+ }
+ // if children, add dummy node
+ if (chld != null && chld.Length > 0)
+ {
+ for (int i = 0; i < chld.Length; i++)
+ {
+ TreeNode tmp = null;
+ // if this is a group, i.e. type 0, add a dummy node
+ if (chld[i].type == 0 && chld[i].children == null)
+ //skip it.
+ Console.WriteLine("ro junk");
+ else if (chld[i].type == 1 && chld[i].value == null)
+ {
+ tmp = new TreeNode(chld[i].title);
+ tmp.Tag = chld[i];
+ tn.Nodes.Add(tmp);
+ TreeNode sub = new TreeNode("VLN_DUMMY_FOR_TREE");
+ tmp.Nodes.Add(sub);
+ }
+ else
+ {
+ tmp = new TreeNode(chld[i].title);
+ tmp.Tag = chld[i];
+ tn.Nodes.Add(tmp);
+ }
+ }
+ }
+ }
+ private void LoadTree()
+ {
+ if (_MyROFST == null) return;
+ for (int i = 0; i < _MyROFST.myHdr.myDbs.Length; i++)
+ {
+ TreeNode tn = new TreeNode(_MyROFST.myHdr.myDbs[i].dbiTitle);
+ tn.Tag = _MyROFST.myHdr.myDbs[i];
+ tvROFST.Nodes.Add(tn);
+ AddDummyGroup(_MyROFST.myHdr.myDbs[i], tn);
+ }
+ }
+ private void AddDummyGroup(ROFST.rodbi rodbi, TreeNode tn)
+ {
+ if (rodbi.children != null && rodbi.children.Length > 0)
+ {
+ TreeNode tmp = new TreeNode("VLN_DUMMY_FOR_TREE");
+ tn.Nodes.Add(tmp);
+ }
+ }
+ private void btnInsertRO_Click(object sender, EventArgs e)
+ {
+ if (tbROValue.Text == null || tbROValue.Text == "")
+ {
+ MessageBox.Show("Must select an RO Value from the tree.");
+ return;
+ }
+ Object obj = tvROFST.SelectedNode.Tag;
+ if (obj is ROFST.rochild)
+ {
+ ROFST.rochild roch = (ROFST.rochild) obj;
+ string linktxt = string.Format("#Link:ReferencedObject: #xx {0}", roch.roid);
+ _MyRTB.InsertRO(tbROValue.Text, linktxt);
+ }
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/Volian.Controls.Library/DisplayRO.resx b/PROMS/Volian.Controls.Library/DisplayRO.resx
new file mode 100644
index 00000000..19dc0dd8
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayRO.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
\ No newline at end of file
diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.Designer.cs b/PROMS/Volian.Controls.Library/DisplayTransition.Designer.cs
new file mode 100644
index 00000000..9913a134
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayTransition.Designer.cs
@@ -0,0 +1,343 @@
+namespace Volian.Controls.Library
+{
+ partial class DisplayTransition
+ {
+ ///
+ /// 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 Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupPanelTranstionSteps = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.btnUp1 = new DevComponents.DotNetBar.ButtonX();
+ this.tvTran = new Volian.Controls.Library.vlnTreeView3();
+ this.groupPanelBtns = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.cbCurProcSet = new System.Windows.Forms.CheckBox();
+ this.panelTranSelStepBtns = new System.Windows.Forms.Panel();
+ this.btnTranInsert = new DevComponents.DotNetBar.ButtonX();
+ this.groupPanelTranFmt = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.listBoxTranFmt = new System.Windows.Forms.ListBox();
+ this.groupPanelTransitionProcs = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.listBoxTranProcs = new System.Windows.Forms.ListBox();
+ this.groupPanelTransitionSect = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.listBoxTranSects = new System.Windows.Forms.ListBox();
+ this.groupPanelTranstionSteps.SuspendLayout();
+ this.groupPanelBtns.SuspendLayout();
+ this.panelTranSelStepBtns.SuspendLayout();
+ this.groupPanelTranFmt.SuspendLayout();
+ this.groupPanelTransitionProcs.SuspendLayout();
+ this.groupPanelTransitionSect.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupPanelTranstionSteps
+ //
+ this.groupPanelTranstionSteps.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanelTranstionSteps.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanelTranstionSteps.Controls.Add(this.btnUp1);
+ this.groupPanelTranstionSteps.Controls.Add(this.tvTran);
+ this.groupPanelTranstionSteps.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanelTranstionSteps.Location = new System.Drawing.Point(0, 401);
+ this.groupPanelTranstionSteps.Name = "groupPanelTranstionSteps";
+ this.groupPanelTranstionSteps.Size = new System.Drawing.Size(290, 273);
+ //
+ //
+ //
+ this.groupPanelTranstionSteps.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanelTranstionSteps.Style.BackColorGradientAngle = 90;
+ this.groupPanelTranstionSteps.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanelTranstionSteps.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranstionSteps.Style.BorderBottomWidth = 1;
+ this.groupPanelTranstionSteps.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanelTranstionSteps.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranstionSteps.Style.BorderLeftWidth = 1;
+ this.groupPanelTranstionSteps.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranstionSteps.Style.BorderRightWidth = 1;
+ this.groupPanelTranstionSteps.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranstionSteps.Style.BorderTopWidth = 1;
+ this.groupPanelTranstionSteps.Style.CornerDiameter = 4;
+ this.groupPanelTranstionSteps.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanelTranstionSteps.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanelTranstionSteps.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanelTranstionSteps.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ this.groupPanelTranstionSteps.TabIndex = 24;
+ this.groupPanelTranstionSteps.Text = "Select Step";
+ //
+ // btnUp1
+ //
+ this.btnUp1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnUp1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnUp1.Dock = System.Windows.Forms.DockStyle.Left;
+ this.btnUp1.Image = global::Volian.Controls.Library.Properties.Resources.GoToParentFolderHS;
+ this.btnUp1.Location = new System.Drawing.Point(0, 0);
+ this.btnUp1.Name = "btnUp1";
+ this.btnUp1.Size = new System.Drawing.Size(38, 32);
+ this.btnUp1.TabIndex = 24;
+ this.btnUp1.Click += new System.EventHandler(this.btnUp1_Click);
+ //
+ // tvTran
+ //
+ this.tvTran.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.tvTran.Location = new System.Drawing.Point(0, 32);
+ this.tvTran.Name = "tvTran";
+ this.tvTran.Size = new System.Drawing.Size(284, 220);
+ this.tvTran.TabIndex = 20;
+ this.tvTran.NodeSelectionChange += new Volian.Controls.Library.vlnTreeViewEvent(this.tvTran_NodeSelectionChange);
+ this.tvTran.MouseClick += new System.Windows.Forms.MouseEventHandler(this.tvTran_MouseClick);
+ this.tvTran.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvTran_AfterSelect);
+ //
+ // groupPanelBtns
+ //
+ this.groupPanelBtns.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanelBtns.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanelBtns.Controls.Add(this.cbCurProcSet);
+ this.groupPanelBtns.Controls.Add(this.panelTranSelStepBtns);
+ this.groupPanelBtns.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanelBtns.Location = new System.Drawing.Point(0, 0);
+ this.groupPanelBtns.Name = "groupPanelBtns";
+ this.groupPanelBtns.Size = new System.Drawing.Size(290, 66);
+ //
+ //
+ //
+ this.groupPanelBtns.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanelBtns.Style.BackColorGradientAngle = 90;
+ this.groupPanelBtns.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanelBtns.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelBtns.Style.BorderBottomWidth = 1;
+ this.groupPanelBtns.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanelBtns.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelBtns.Style.BorderLeftWidth = 1;
+ this.groupPanelBtns.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelBtns.Style.BorderRightWidth = 1;
+ this.groupPanelBtns.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelBtns.Style.BorderTopWidth = 1;
+ this.groupPanelBtns.Style.CornerDiameter = 4;
+ this.groupPanelBtns.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanelBtns.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanelBtns.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanelBtns.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ this.groupPanelBtns.TabIndex = 25;
+ //
+ // cbCurProcSet
+ //
+ this.cbCurProcSet.AutoSize = true;
+ this.cbCurProcSet.Checked = true;
+ this.cbCurProcSet.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.cbCurProcSet.Dock = System.Windows.Forms.DockStyle.Top;
+ this.cbCurProcSet.Location = new System.Drawing.Point(0, 0);
+ this.cbCurProcSet.Name = "cbCurProcSet";
+ this.cbCurProcSet.Size = new System.Drawing.Size(284, 17);
+ this.cbCurProcSet.TabIndex = 24;
+ this.cbCurProcSet.Text = "Current Procedure Set";
+ this.cbCurProcSet.UseVisualStyleBackColor = true;
+ //
+ // panelTranSelStepBtns
+ //
+ this.panelTranSelStepBtns.Controls.Add(this.btnTranInsert);
+ this.panelTranSelStepBtns.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panelTranSelStepBtns.Location = new System.Drawing.Point(0, 23);
+ this.panelTranSelStepBtns.Name = "panelTranSelStepBtns";
+ this.panelTranSelStepBtns.Size = new System.Drawing.Size(284, 37);
+ this.panelTranSelStepBtns.TabIndex = 23;
+ //
+ // btnTranInsert
+ //
+ this.btnTranInsert.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnTranInsert.AutoSize = true;
+ this.btnTranInsert.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnTranInsert.Dock = System.Windows.Forms.DockStyle.Left;
+ this.btnTranInsert.Location = new System.Drawing.Point(0, 0);
+ this.btnTranInsert.Name = "btnTranInsert";
+ this.btnTranInsert.Size = new System.Drawing.Size(88, 36);
+ this.btnTranInsert.TabIndex = 22;
+ this.btnTranInsert.Text = "Select Transition";
+ this.btnTranInsert.Click += new System.EventHandler(this.btnTranInsert_Click);
+ //
+ // groupPanelTranFmt
+ //
+ this.groupPanelTranFmt.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanelTranFmt.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanelTranFmt.Controls.Add(this.listBoxTranFmt);
+ this.groupPanelTranFmt.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanelTranFmt.Location = new System.Drawing.Point(0, 66);
+ this.groupPanelTranFmt.Name = "groupPanelTranFmt";
+ this.groupPanelTranFmt.Size = new System.Drawing.Size(290, 112);
+ //
+ //
+ //
+ this.groupPanelTranFmt.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanelTranFmt.Style.BackColorGradientAngle = 90;
+ this.groupPanelTranFmt.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanelTranFmt.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranFmt.Style.BorderBottomWidth = 1;
+ this.groupPanelTranFmt.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanelTranFmt.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranFmt.Style.BorderLeftWidth = 1;
+ this.groupPanelTranFmt.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranFmt.Style.BorderRightWidth = 1;
+ this.groupPanelTranFmt.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTranFmt.Style.BorderTopWidth = 1;
+ this.groupPanelTranFmt.Style.CornerDiameter = 4;
+ this.groupPanelTranFmt.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanelTranFmt.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanelTranFmt.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanelTranFmt.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ this.groupPanelTranFmt.TabIndex = 27;
+ this.groupPanelTranFmt.Text = "Select Format";
+ //
+ // listBoxTranFmt
+ //
+ this.listBoxTranFmt.Dock = System.Windows.Forms.DockStyle.Top;
+ this.listBoxTranFmt.FormattingEnabled = true;
+ this.listBoxTranFmt.HorizontalScrollbar = true;
+ this.listBoxTranFmt.Location = new System.Drawing.Point(0, 0);
+ this.listBoxTranFmt.Name = "listBoxTranFmt";
+ this.listBoxTranFmt.Size = new System.Drawing.Size(284, 82);
+ this.listBoxTranFmt.TabIndex = 13;
+ this.listBoxTranFmt.SelectedIndexChanged += new System.EventHandler(this.listBoxTranFmt_Click);
+ //
+ // groupPanelTransitionProcs
+ //
+ this.groupPanelTransitionProcs.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanelTransitionProcs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanelTransitionProcs.Controls.Add(this.listBoxTranProcs);
+ this.groupPanelTransitionProcs.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanelTransitionProcs.Location = new System.Drawing.Point(0, 178);
+ this.groupPanelTransitionProcs.Name = "groupPanelTransitionProcs";
+ this.groupPanelTransitionProcs.Size = new System.Drawing.Size(290, 106);
+ //
+ //
+ //
+ this.groupPanelTransitionProcs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanelTransitionProcs.Style.BackColorGradientAngle = 90;
+ this.groupPanelTransitionProcs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanelTransitionProcs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionProcs.Style.BorderBottomWidth = 1;
+ this.groupPanelTransitionProcs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanelTransitionProcs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionProcs.Style.BorderLeftWidth = 1;
+ this.groupPanelTransitionProcs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionProcs.Style.BorderRightWidth = 1;
+ this.groupPanelTransitionProcs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionProcs.Style.BorderTopWidth = 1;
+ this.groupPanelTransitionProcs.Style.CornerDiameter = 4;
+ this.groupPanelTransitionProcs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanelTransitionProcs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanelTransitionProcs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanelTransitionProcs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ this.groupPanelTransitionProcs.TabIndex = 29;
+ this.groupPanelTransitionProcs.Text = "Select Procedure";
+ //
+ // listBoxTranProcs
+ //
+ this.listBoxTranProcs.Dock = System.Windows.Forms.DockStyle.Top;
+ this.listBoxTranProcs.FormattingEnabled = true;
+ this.listBoxTranProcs.HorizontalScrollbar = true;
+ this.listBoxTranProcs.Location = new System.Drawing.Point(0, 0);
+ this.listBoxTranProcs.Name = "listBoxTranProcs";
+ this.listBoxTranProcs.Size = new System.Drawing.Size(284, 82);
+ this.listBoxTranProcs.TabIndex = 12;
+ this.listBoxTranProcs.SelectedIndexChanged += new System.EventHandler(this.listBoxTranProcs_SelectedIndexChanged);
+ //
+ // groupPanelTransitionSect
+ //
+ this.groupPanelTransitionSect.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupPanelTransitionSect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupPanelTransitionSect.Controls.Add(this.listBoxTranSects);
+ this.groupPanelTransitionSect.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupPanelTransitionSect.Location = new System.Drawing.Point(0, 284);
+ this.groupPanelTransitionSect.Name = "groupPanelTransitionSect";
+ this.groupPanelTransitionSect.Size = new System.Drawing.Size(290, 117);
+ //
+ //
+ //
+ this.groupPanelTransitionSect.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupPanelTransitionSect.Style.BackColorGradientAngle = 90;
+ this.groupPanelTransitionSect.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupPanelTransitionSect.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionSect.Style.BorderBottomWidth = 1;
+ this.groupPanelTransitionSect.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupPanelTransitionSect.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionSect.Style.BorderLeftWidth = 1;
+ this.groupPanelTransitionSect.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionSect.Style.BorderRightWidth = 1;
+ this.groupPanelTransitionSect.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupPanelTransitionSect.Style.BorderTopWidth = 1;
+ this.groupPanelTransitionSect.Style.CornerDiameter = 4;
+ this.groupPanelTransitionSect.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupPanelTransitionSect.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupPanelTransitionSect.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupPanelTransitionSect.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ this.groupPanelTransitionSect.TabIndex = 30;
+ this.groupPanelTransitionSect.Text = "Select Section";
+ //
+ // listBoxTranSects
+ //
+ this.listBoxTranSects.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBoxTranSects.FormattingEnabled = true;
+ this.listBoxTranSects.HorizontalScrollbar = true;
+ this.listBoxTranSects.Location = new System.Drawing.Point(0, 0);
+ this.listBoxTranSects.Name = "listBoxTranSects";
+ this.listBoxTranSects.Size = new System.Drawing.Size(284, 95);
+ this.listBoxTranSects.TabIndex = 19;
+ this.listBoxTranSects.SelectedIndexChanged += new System.EventHandler(this.listBoxTranSects_SelectedIndexChanged);
+ //
+ // DisplayTransition
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupPanelTranstionSteps);
+ this.Controls.Add(this.groupPanelTransitionSect);
+ this.Controls.Add(this.groupPanelTransitionProcs);
+ this.Controls.Add(this.groupPanelTranFmt);
+ this.Controls.Add(this.groupPanelBtns);
+ this.Name = "DisplayTransition";
+ this.Size = new System.Drawing.Size(290, 676);
+ this.groupPanelTranstionSteps.ResumeLayout(false);
+ this.groupPanelBtns.ResumeLayout(false);
+ this.groupPanelBtns.PerformLayout();
+ this.panelTranSelStepBtns.ResumeLayout(false);
+ this.panelTranSelStepBtns.PerformLayout();
+ this.groupPanelTranFmt.ResumeLayout(false);
+ this.groupPanelTransitionProcs.ResumeLayout(false);
+ this.groupPanelTransitionSect.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanelTranstionSteps;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanelBtns;
+ private System.Windows.Forms.Panel panelTranSelStepBtns;
+ private DevComponents.DotNetBar.ButtonX btnTranInsert;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanelTranFmt;
+ private System.Windows.Forms.ListBox listBoxTranFmt;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanelTransitionProcs;
+ private System.Windows.Forms.ListBox listBoxTranProcs;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupPanelTransitionSect;
+ private System.Windows.Forms.ListBox listBoxTranSects;
+ private vlnTreeView3 tvTran;
+ private System.Windows.Forms.CheckBox cbCurProcSet;
+ private DevComponents.DotNetBar.ButtonX btnUp1;
+ }
+}
diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs
new file mode 100644
index 00000000..69aef16e
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs
@@ -0,0 +1,436 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using System.Text.RegularExpressions;
+using VEPROMS.CSLA.Library;
+
+namespace Volian.Controls.Library
+{
+ public partial class DisplayTransition : UserControl
+ {
+ #region Properties
+ private bool _CurProcSet = true;
+ public bool CurProcSet
+ {
+ get { return _CurProcSet; }
+ set { _CurProcSet = value; }
+ }
+ private bool _Modify = false;
+ public bool Modify
+ {
+ get { return _Modify; }
+ set { _Modify = value; }
+ }
+ private int _TranFmtIndx = -1;
+ private ItemInfo _CurItem;
+ public ItemInfo CurItem
+ {
+ get { return _CurItem; }
+ set
+ {
+ _CurItem = value;
+ infotabTransitionFillIn();
+ }
+ }
+ private VETreeNode _RangeNode1;
+ private ItemInfo _tranitem1;
+ private ItemInfo _tranitem2;
+ private DisplayRTB _MyRTB;
+ public DisplayRTB MyRTB
+ {
+ get { return _MyRTB; }
+ set { _MyRTB = value; }
+ }
+ private ItemInfo _CurrentProcedure;
+ private int _CurrentProcIndex;
+ #endregion
+ #region Constructors
+ public DisplayTransition(ItemInfo curitm, bool modify, DisplayRTB rtb)
+ {
+ _Modify = modify;
+ _CurItem = curitm;
+ _MyRTB = rtb;
+ InitializeComponent();
+ infotabTransitionFillIn();
+ }
+ public DisplayTransition()
+ {
+ InitializeComponent();
+ }
+ public DisplayTransition(ItemInfo curitm, string curtran, bool modify, DisplayRTB rtb)
+ {
+ _Modify = modify;
+ _CurItem = curitm;
+ ParseModifyLink(curtran);
+ _MyRTB = rtb;
+ InitializeComponent();
+ infotabTransitionFillIn();
+ }
+ private void ParseModifyLink(string linktext)
+ {
+ Match m = Regex.Match(linktext, ".*[#]Link:([A-Za-z]*):(.*)");
+ _TranFmtIndx = Convert.ToInt32(m.Groups[2].Value.Split(" ".ToCharArray())[0]);
+ int transitionID = Convert.ToInt32(m.Groups[2].Value.Split(" ".ToCharArray())[1]);
+ Transition mytran = Transition.Get(transitionID);
+ int itm1 = Convert.ToInt32(m.Groups[2].Value.Split(" ".ToCharArray())[2]);
+ _tranitem1 = ItemInfo.Get(itm1);
+ if (m.Groups[1].Value == "TransitionRange")
+ {
+ int itm2 = Convert.ToInt32(m.Groups[2].Value.Split(" ".ToCharArray())[3]);
+ _tranitem2 = ItemInfo.Get(itm2);
+ }
+ // determine if current item & the transition point item are in the same set.
+ // if different sets, different controls are displayed.
+ DocVersion dv = CurItem.MyProcedure.ActiveParent as DocVersion;
+ if (dv == null) return; // what to do if null?
+ DocVersion dvto = _tranitem1.MyProcedure.ActiveParent as DocVersion;
+ if (dvto == null) return; // what to do if null?
+ if (dv.VersionID != dvto.VersionID) CurProcSet = false;
+ else CurProcSet = true;
+ cbCurProcSet.Checked = CurProcSet;
+ }
+ #endregion
+ #region LoadControlData
+ // infotabTransitionFillIn uses other methods to fill in all controls on the
+ // insert/modify transition tab.
+ private bool _InitializingTrans;
+ private void infotabTransitionFillIn()
+ {
+ if (_CurItem == null) return;
+ btnTranInsert.Text = "Select Transition";
+ _InitializingTrans = true;
+ if (_RangeNode1!= null) _RangeNode1.BackColor = tvTran.BackColor;
+ // first see if transition is within same set, i.e. if modify then check
+ // if current item is in same set as transition to item. If not modify,
+ // initialize is always setting to within current set. This is important
+ // because different controls are used for same (list view) versus different
+ // set (tree view).
+ if (!CurProcSet)
+ {
+ return;
+ }
+ listBoxTranFmtFillIn();
+
+ // if new, use CurItem to find the section level & procedure level,
+ // if modify, use the first transition to, _tranitem1
+ ItemInfo tmpitm = Modify?_tranitem1:CurItem;
+ ItemInfo selstpitm = tmpitm;
+ while (tmpitm.MyContent.Type >= 20000)
+ {
+ tmpitm = tmpitm.MyParent;
+ }
+ ItemInfo secitm = tmpitm;
+ listBoxTranSectsFillIn(secitm, secitm.ItemID);
+ ItemInfo prcitm = secitm.MyParent;
+ _CurrentProcedure = prcitm;
+ listBoxTranProcsFillIn(prcitm);
+
+ tvTranFillIn(selstpitm);
+ _InitializingTrans = false;
+ }
+ private void listBoxTranFmtFillIn()
+ {
+ TransTypeList ttl = _CurItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
+ listBoxTranFmt.Items.Clear();
+ for (int i = 0; i < ttl.Count; i++)
+ listBoxTranFmt.Items.Add(ttl[i].TransFormat);
+ if (!_Modify)
+ listBoxTranFmt.SelectedIndex = 0;
+ else
+ listBoxTranFmt.SelectedIndex = _TranFmtIndx;
+ }
+ private void tvTranFillIn(ItemInfo startitm)
+ {
+ tvTran.Nodes.Clear();
+ // if the transition to point is a section or procedure, just return
+ if (startitm.MyContent.Type < 20000) return;
+
+ // For the tree view, use parent, unless already at HLS. If at HLS, use this level.
+ ItemInfo selitm = startitm;
+ if (!startitm.IsHigh)
+ {
+ startitm = startitm.MyParent;
+ selitm = startitm;
+ }
+ startitm = startitm.FirstSibling;
+ while (startitm != null)
+ {
+ VETreeNode tvn = new VETreeNode(startitm);
+ tvn.Tag = startitm;
+ int active = this.tvTran.Nodes.Add(tvn); //new VETreeNode(curitm));
+ if (startitm.ItemID == selitm.ItemID) tvTran.SelectedNode = tvTran.Nodes[active];
+ startitm = (startitm.NextItemCount > 0 ? startitm.NextItems[0] : null);
+ }
+ tvTran.BeforeExpand += new TreeViewCancelEventHandler(tvTran_BeforeExpand);
+ }
+ private void listBoxTranSectsFillIn(ItemInfo secitm, int sectstart)
+ {
+ listBoxTranSects.Items.Clear();
+ // if the transition point 'to' is a procedure, don't list sections yet.
+ if (secitm.MyContent.Type < 10000) return;
+ // if sectstart is not -1, then use this as the section to select, otherwise
+ // use the id for the item passed in.
+ int startitm = sectstart;
+ if (sectstart < 0) sectstart = secitm.ItemID;
+ ItemInfo selitm = secitm; // this is the selected 'section'
+ secitm = secitm.FirstSibling;
+ while (secitm != null)
+ {
+ int active = listBoxTranSects.Items.Add(secitm);
+ if (secitm.ItemID == sectstart) listBoxTranSects.SelectedIndex = active;
+ secitm = (secitm.NextItemCount > 0 ? secitm.NextItems[0] : null);
+ }
+ }
+ private void listBoxTranProcsFillIn(ItemInfo prcitm)
+ {
+ listBoxTranProcs.Items.Clear();
+ ItemInfo selitm = prcitm; // this is the selected 'section'
+ prcitm = prcitm.FirstSibling;
+ while (prcitm != null)
+ {
+ int active = listBoxTranProcs.Items.Add(prcitm);
+ if (_CurrentProcedure.ContentID == prcitm.MyContent.ContentID) _CurrentProcIndex = active;
+ if (prcitm.MyContent.ContentID == selitm.MyContent.ContentID) listBoxTranProcs.SelectedIndex = active;
+ prcitm = (prcitm.NextItemCount > 0 ? prcitm.NextItems[0] : null);
+ }
+ }
+ #endregion
+ #region Events
+ private void listBoxTranFmt_Click(object sender, EventArgs e)
+ {
+ if (_InitializingTrans) return;
+ if (listBoxTranFmt.SelectedIndex == _TranFmtIndx) return;
+ // if resetting format selection, null out the selected transitions.
+ _tranitem1 = null;
+ _tranitem2 = null;
+ if (_RangeNode1 != null)
+ {
+ _RangeNode1.BackColor = tvTran.BackColor;
+ _RangeNode1 = null;
+ }
+ _TranFmtIndx = listBoxTranFmt.SelectedIndex;
+
+ // Determine, based on selection, i.e. select proc/section and disable associated list boxes if
+ // enum representing the transition restricts the selection.
+ E_TransUI etm = (E_TransUI)_CurItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
+ // do the procedure list box. (in 16-bit system it was types 0, 3, 5
+ if ((etm & E_TransUI.ProcMenu) == E_TransUI.ProcMenu)
+ listBoxTranProcs.Enabled = true;
+ else
+ {
+ listBoxTranProcs.SelectedIndex = _CurrentProcIndex > 0 ? _CurrentProcIndex : 0;
+ listBoxTranProcs.Enabled = false;
+ }
+
+ // in 16-bit system it was types 0, 3, 4, 5
+ if (((etm & E_TransUI.SectDefault) == E_TransUI.SectDefault) ||
+ ((etm & E_TransUI.SectMenuAny) == E_TransUI.SectMenuAny) ||
+ ((etm & E_TransUI.SectMenuStep) == E_TransUI.SectMenuStep))
+ {
+ // find default step section and make it the selected item - then disable from further selection.
+ //listBoxTranSects.SelectedIndex = 1; // TEMP until default step section found.
+ listBoxTranSects.Enabled = true;
+ }
+ else
+ listBoxTranSects.Enabled = false;
+
+ tvTran.Enabled = true;
+ }
+ private void btnUp1_Click(object sender, EventArgs e)
+ {
+ // if at HLS, don't do anything.
+ ItemInfo curitm = (ItemInfo)((VETreeNode)tvTran.Nodes[0]).VEObject;
+ if (curitm.IsHigh) return;
+ tvTranFillIn(curitm);
+ }
+ private void tvTran_BeforeExpand(object sender, TreeViewCancelEventArgs e)
+ {
+ VETreeNode tn = ((VETreeNode)e.Node);
+ tn.LoadChildren(false);
+ }
+ private void listBoxTranSects_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (_InitializingTrans) return;
+ // a different section was selected, if step section, update step list, otherwise, empty
+ // it & disable.
+ ItemInfo secitm = (ItemInfo)listBoxTranSects.SelectedItem;
+ if (!secitm.IsStepSection)
+ {
+ tvTran.Nodes.Clear();
+ tvTran.Enabled = false;
+ }
+ else
+ {
+ tvTranFillIn(secitm.Steps[0]);
+ tvTran.Enabled = true;
+ }
+ }
+ private void listBoxTranProcs_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (_InitializingTrans) return;
+ ItemInfo prcitm = (ItemInfo)listBoxTranProcs.SelectedItem;
+
+ ProcedureConfig pc = (ProcedureConfig)prcitm.MyConfig;
+ int sectstartid = -1;
+ if (pc != null) sectstartid = System.Convert.ToInt32(pc.SectionStart);
+ IList chldrn = prcitm.GetChildren();
+ listBoxTranSectsFillIn((ItemInfo)chldrn[0], sectstartid);
+ }
+ private void btnTranInsert_Click(object sender, EventArgs e)
+ {
+ string trantxt = "{Resolved Transition Text}";
+ string linktxt = null;
+ //int type = (int)(_CurItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].Type);
+ E_TransUI etm = (E_TransUI)_CurItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
+ // do the procedure list box. (in 16-bit system it was types 0, 3, 5
+ if (!((etm & E_TransUI.StepAllowNone) == E_TransUI.StepAllowNone)) // _tranitem1 is set from step tree node.
+ {
+ if (tvTran.SelectedNode==null)
+ {
+ MessageBox.Show("Must 'Select Step' for transition 'to'");
+ return;
+ }
+ VETreeNode vtn = (VETreeNode)tvTran.SelectedNode;
+ _tranitem1 = (ItemInfo) vtn.VEObject; // is this cast valid?
+ linktxt = string.Format("#Link:Transition: {0} xx {1}", listBoxTranFmt.SelectedIndex, _tranitem1.ItemID);
+ }
+ else if ((etm & E_TransUI.StepLast) == E_TransUI.StepLast) //range
+ {
+ if (_tranitem1==null)
+ {
+ MessageBox.Show("Must 'Select Step' for transition 'to'");
+ return;
+ }
+ // Get the second item in the range, based on current tree view selection.
+ if (tvTran.SelectedNode == null)
+ {
+ MessageBox.Show("Must 'Select Step' for range transition 'to'");
+ return;
+ }
+ VETreeNode vtn = (VETreeNode)tvTran.SelectedNode;
+ _tranitem2 = (ItemInfo)vtn.VEObject; // is this cast valid?
+ // Check that the two items are of the below the section type.
+ if (_tranitem1.MyContent.Type < 20000 || _tranitem2.MyContent.Type < 20000)
+ {
+ MessageBox.Show("Must select two items at the step level or below, i.e. no sections, procedures, etc.");
+ return;
+ }
+ linktxt = string.Format("#Link:Transition: {0} xx {1} {2}", listBoxTranFmt.SelectedIndex, _tranitem1.ItemID, _tranitem2.ItemID);
+
+ }
+ else if ((etm & E_TransUI.SectMenuAny) == E_TransUI.SectMenuAny)
+ {
+ if (tvTran.Enabled == false || _tranitem1.IsAccPages)
+ _tranitem1 = (ItemInfo)listBoxTranSects.SelectedItem;
+ else
+ {
+ VETreeNode vtn = (VETreeNode)tvTran.SelectedNode;
+ _tranitem1 = (ItemInfo)vtn.VEObject; // is this cast valid?
+ }
+ if (_tranitem1==null)
+ {
+ MessageBox.Show("Must 'Select Section' or 'Select Step' for transition 'to'");
+ return;
+ }
+ // check that item is a valid type based on transition type selected from format, i.e. section versus step, etc.
+ //if (type < 4 && _tranitem1.MyContent.Type < 20000)
+ //{
+ // MessageBox.Show("Must select a step type item for this transition format type");
+ // return;
+ //}
+ linktxt = string.Format("#Link:Transition: {0} xx {1}", listBoxTranFmt.SelectedIndex, _tranitem1.ItemID);
+ }
+ _MyRTB.InsertTran(trantxt, linktxt);
+ }
+ #endregion
+
+ private void tvTran_AfterSelect(object sender, TreeViewEventArgs e)
+ {
+ if (_InitializingTrans) return;
+ if (_RangeNode1 == null)
+ {
+ VETreeNode vtn = (VETreeNode)tvTran.SelectedNode;
+ _tranitem1 = (ItemInfo)vtn.VEObject; // is this cast valid?
+ E_TransUI etm = (E_TransUI)_CurItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
+
+ // if this is a range, we'll denote the first 'to' item with color on the
+ // tree view.
+ if ((etm & E_TransUI.StepLast) == E_TransUI.StepLast)
+ {
+ tvTran.SelectedNode.BackColor = Color.Aquamarine;
+ _RangeNode1 = vtn;
+ return;
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ _tranitem2 = (ItemInfo)listBoxTranSects.SelectedItem;
+ if (tvTran.Enabled == false || _tranitem2.IsAccPages)
+ _tranitem2 = (ItemInfo)listBoxTranSects.SelectedItem;
+ else
+ _tranitem2 = (ItemInfo)tvTran.SelectedNode.Tag;
+ }
+ TreeNode tn = tvTran.SelectedNode;
+ tn.BackColor = Color.Aquamarine;
+ }
+
+ private void tvTran_NodeSelectionChange(object sender, vlnTreeEventArgs args)
+ {
+ if (_InitializingTrans) return;
+ if (_RangeNode1 == null)
+ {
+ VETreeNode vtn = (VETreeNode)tvTran.SelectedNode;
+ _tranitem1 = (ItemInfo)vtn.VEObject; // is this cast valid?
+ E_TransUI etm = (E_TransUI)_CurItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
+ // if this is a range, we'll denote the first 'to' item with color on the
+ // tree view.
+ if ((etm & E_TransUI.StepLast) == E_TransUI.StepLast)
+ {
+ tvTran.SelectedNode.BackColor = Color.Aquamarine;
+ _RangeNode1 = vtn;
+ return;
+ }
+
+ else
+ {
+ return;
+ }
+ }
+ }
+
+ private void tvTran_MouseClick(object sender, MouseEventArgs e)
+ {
+ if (_InitializingTrans) return;
+ if (_RangeNode1 == null)
+ {
+ VETreeNode vtn = (VETreeNode)tvTran.SelectedNode;
+ _tranitem1 = (ItemInfo)vtn.VEObject; // is this cast valid?
+ E_TransUI etm = (E_TransUI)_CurItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
+ // if this is a range, we'll denote the first 'to' item with color on the
+ // tree view.
+ if ((etm & E_TransUI.StepLast) == E_TransUI.StepLast)
+ {
+ tvTran.SelectedNode.BackColor = Color.Aquamarine;
+ _RangeNode1 = vtn;
+ return;
+ }
+
+ else
+ {
+ return;
+ }
+ }
+ }
+
+
+ }
+}
diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.resx b/PROMS/Volian.Controls.Library/DisplayTransition.resx
new file mode 100644
index 00000000..19dc0dd8
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayTransition.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
\ No newline at end of file