diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldCombFrm.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldCombFrm.cs
index d3dcb25c..e7dc3a49 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldCombFrm.cs
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldCombFrm.cs
@@ -77,6 +77,7 @@ using System.Xml.Schema;
using System.Text;
using ROFields;
using RODBInterface;
+using System.Linq;
namespace ROEditor
{
@@ -280,6 +281,7 @@ namespace ROEditor
this.tbXYPlotWid.Size = new System.Drawing.Size(40, 22);
this.tbXYPlotWid.TabIndex = 11;
this.tbXYPlotWid.Text = "";
+ this.tbXYPlotWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// tbTableWid
//
@@ -288,6 +290,7 @@ namespace ROEditor
this.tbTableWid.Size = new System.Drawing.Size(40, 22);
this.tbTableWid.TabIndex = 10;
this.tbTableWid.Text = "";
+ this.tbTableWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// tbVariableTxtWid
//
@@ -296,6 +299,7 @@ namespace ROEditor
this.tbVariableTxtWid.Size = new System.Drawing.Size(40, 22);
this.tbVariableTxtWid.TabIndex = 9;
this.tbVariableTxtWid.Text = "";
+ this.tbVariableTxtWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// tbSingleTxtWid
//
@@ -304,6 +308,7 @@ namespace ROEditor
this.tbSingleTxtWid.Size = new System.Drawing.Size(40, 22);
this.tbSingleTxtWid.TabIndex = 8;
this.tbSingleTxtWid.Text = "";
+ this.tbSingleTxtWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// lblW4
//
@@ -586,5 +591,18 @@ namespace ROEditor
this.Close();
}
+ private void txtBox_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ string clpBrd = Clipboard.GetText();
+ if (clpBrd.Any(c => c > 166))
+ {
+ MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
+ Clipboard.Clear();
+ }
+ }
+ }
}
}
+
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTextFrm.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTextFrm.cs
index 30e33bd9..3d4c9770 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTextFrm.cs
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTextFrm.cs
@@ -77,6 +77,7 @@ using System.Xml.Schema;
using System.Text;
using ROFields;
using RODBInterface;
+using System.Linq;
namespace ROEditor
{
@@ -316,6 +317,22 @@ namespace ROEditor
}
base.Dispose( disposing );
}
+ private void txtBox_KeyDown(object sender, KeyEventArgs e)
+ {
+ bool symFlg = false;
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ string clpBrd = Clipboard.GetText();
+ if (clpBrd.Any(c => c > 166))
+ {
+ MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
+ Clipboard.Clear();
+ }
+ }
+ }
+ }
#region Windows Form Designer generated code
///
@@ -357,6 +374,7 @@ namespace ROEditor
this.tbFieldName.Size = new System.Drawing.Size(320, 22);
this.tbFieldName.TabIndex = 2;
this.tbFieldName.Text = "";
+ this.tbFieldName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// tbWidth
//
@@ -365,6 +383,7 @@ namespace ROEditor
this.tbWidth.Size = new System.Drawing.Size(32, 22);
this.tbWidth.TabIndex = 3;
this.tbWidth.Text = "";
+ this.tbWidth.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// btnOK
//
@@ -402,6 +421,7 @@ namespace ROEditor
this.tbPattern.TabIndex = 7;
this.tbPattern.Text = "";
this.tbPattern.Visible = false;
+ this.tbPattern.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// FieldTextFrm
//
@@ -425,3 +445,4 @@ namespace ROEditor
#endregion
}
}
+
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTypeDefFrm.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTypeDefFrm.cs
index b79ac3ba..f66cef98 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTypeDefFrm.cs
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/FieldTypeDefFrm.cs
@@ -72,6 +72,7 @@ using System.Xml;
using System.Text;
using RODBInterface;
using ROFields;
+using System.Linq;
namespace ROEditor
{
@@ -277,6 +278,22 @@ namespace ROEditor
this.Close();
}
+ private void txtBox_KeyDown(object sender, KeyEventArgs e)
+ {
+ bool symFlg = false;
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ string clpBrd = Clipboard.GetText();
+ if (clpBrd.Any(c => c > 166))
+ {
+ MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
+ Clipboard.Clear();
+ }
+ }
+ }
+ }
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
@@ -315,6 +332,7 @@ namespace ROEditor
this.tbFieldName.Size = new System.Drawing.Size(368, 22);
this.tbFieldName.TabIndex = 1;
this.tbFieldName.Text = "";
+ this.tbFieldName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// gbFldType
//
@@ -437,3 +455,4 @@ namespace ROEditor
#endregion
}
}
+
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/GroupNewFrm.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/GroupNewFrm.cs
index eb4a300a..2bda460d 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/GroupNewFrm.cs
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/GroupNewFrm.cs
@@ -52,6 +52,7 @@ using System.Xml;
using System.Text;
using ROFields;
using RODBInterface;
+using System.Linq;
namespace ROEditor
{
@@ -155,6 +156,7 @@ namespace ROEditor
this.tbGroup.Size = new System.Drawing.Size(248, 22);
this.tbGroup.TabIndex = 8;
this.tbGroup.Text = "";
+ this.tbGroup.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// lblGroup
//
@@ -421,5 +423,21 @@ namespace ROEditor
GroupDefFrm grdef = new GroupDefFrm(nelem,myrodb,nelem.InnerText,dbtype);
grdef.ShowDialog();
}
+ private void txtBox_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ string clpBrd = Clipboard.GetText();
+ if (clpBrd.Any(c => c > 166))
+ {
+ MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
+ Clipboard.Clear();
+ }
+ }
+ }
+ }
}
}
+
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs
index e60a329c..34406f94 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RODefFrm.cs
@@ -106,6 +106,7 @@ using ROFields;
using RODBInterface;
using VlnStatus;
using System.Collections.Generic;
+using System.Linq;
namespace ROEditor
@@ -1311,6 +1312,22 @@ namespace ROEditor
}
}
}
+ private void txtBox_KeyDown(object sender, KeyEventArgs e)
+ {
+ bool symFlg = false;
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ string clpBrd = Clipboard.GetText();
+ if (clpBrd.Any(c => c > 166))
+ {
+ MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
+ Clipboard.Clear();
+ }
+ }
+ }
+ }
#region Windows Form Designer generated code
///
@@ -1375,6 +1392,7 @@ namespace ROEditor
this.tbRetVal.Size = new System.Drawing.Size(464, 22);
this.tbRetVal.TabIndex = 4;
this.tbRetVal.Text = "textBox1";
+ this.tbRetVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// tbMenuVal
//
@@ -1383,6 +1401,7 @@ namespace ROEditor
this.tbMenuVal.Size = new System.Drawing.Size(464, 22);
this.tbMenuVal.TabIndex = 5;
this.tbMenuVal.Text = "textBox1";
+ this.tbMenuVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// lblGroupText
//
@@ -1608,3 +1627,4 @@ namespace ROEditor
#endregion
}
}
+
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs
index 806ee734..3c5a5e99 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs
@@ -302,9 +302,10 @@ using Org.Mentalis.Files;
using System.Runtime.InteropServices;
using System.Linq;
using System.Collections.Generic;
-//using IniFileIO;
-
-
+using System.Xml;
+using System.Drawing.Text;
+using System.Drawing.Drawing2D;
+using System.Text.RegularExpressions;
namespace ROEditor
{
@@ -312,7 +313,6 @@ namespace ROEditor
/// Summary description for Form1.
///
///
-
public class Form1 : System.Windows.Forms.Form
{
private ctlXMLEditLib.ctlXMLEdit ctlXMLEdit2;
@@ -343,7 +343,6 @@ namespace ROEditor
private System.Windows.Forms.MenuItem menuROProperties;
private System.Windows.Forms.MenuItem menuROExit;
private System.Windows.Forms.MenuItem menuItem1;
-
private XmlDocument myroXmlDoc;
private VlnXmlElement newone;
private TreeNode TreeNewparent;
@@ -353,25 +352,39 @@ namespace ROEditor
private System.Windows.Forms.MenuItem menuEditDelete;
private System.Windows.Forms.MenuItem menuEditSelAll;
private TreeNode LastSelectedNode;
- private TextBox _CurrentTextBox; // currently selected TextBox field
+ private roRichTextBox _CurrentTextBox; // currently selected TextBox field
public static string[] PCChildren; //C2021-026 list of Parent/Child Children
- public TextBox CurrentTextBox
+ public roRichTextBox CurrentTextBox
{
get { return _CurrentTextBox; }
set { _CurrentTextBox = value; }
}
+ public static string _RO_IDEN;
+ public static string RO_IDEN
+ {
+ get
+ {
+ return _RO_IDEN;
+ }
+ set
+ {
+ _RO_IDEN = value;
+ }
+ }
+
public List ROsSelectedforMultiMove { get; set; } //to allow multiple RO nodes to be selected
public bool ROCutWasSelected { get; set; } = false;
private VlnXmlElement rootXml;
private TreeNode rootNode;
-
+
private System.Windows.Forms.ImageList imageListRoTree;
private System.Windows.Forms.TreeView roTreeView;
private System.Windows.Forms.ListView roListView;
private System.Windows.Forms.ToolBar tbar;
+
private bool _duplicate_active;
private bool duplicate_active
{
@@ -389,15 +402,9 @@ namespace ROEditor
private const int ROIMAGE = 1;
private Color MULTISELECTCOLOR = Color.LightGreen; //back color that multiselected ROs will show
- private ToolBarButton tbtnSave;
- private ToolBarButton tbtnRestore;
- private ToolBarButton tbtnCancel;
- private ToolBarButton tbtnSaveAs;
- private ToolBarButton tbtnDuplicate;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.ImageList imageListToolBar;
private Label lblDuplicateRO;
- private ToolBarButton tbtnZoom;
public Form1(string PassedInPath, string specificro)
{
@@ -405,6 +412,7 @@ namespace ROEditor
// Required for Windows Form Designer support
//
InitializeComponent();
+ getSymbols(); // RO Editor add symbols C2022 - 003
// B2019-082 set the date format on the VEPROMS.exe thread to U.S. for i/o of a date string
// this is to correct an issue for a UAE customer who could not open some procedures due to the desktop date setting using the "DD/MM/YYYY" instead of the "MM/DD/YYYY" format
// NOTE: not doing the "Using System.Threading;" statement at beginning of file because it conflicts with the declaration of the "Timer" variable
@@ -412,10 +420,10 @@ namespace ROEditor
// The data path the was passed in.
DbConnectPath = PassedInPath;
-
+
// Setup the context menu
MenuItem[] ContextMenuItemList = new MenuItem[8];
- ContextMenuItemList[0] = new MenuItem("Expand/Collaspe",new EventHandler(roTreeView_ToggleExpandCollapse));
+ ContextMenuItemList[0] = new MenuItem("Expand/Collaspe", new EventHandler(roTreeView_ToggleExpandCollapse));
ContextMenuItemList[1] = menuRONew.CloneMenu();
ContextMenuItemList[2] = menuROEdit.CloneMenu();
ContextMenuItemList[3] = menuROCut.CloneMenu();
@@ -463,12 +471,12 @@ namespace ROEditor
}
}
myroXmlDoc = myrodb.RODB_GetRoot();
- rootXml = (VlnXmlElement) myroXmlDoc.FirstChild;
+ rootXml = (VlnXmlElement)myroXmlDoc.FirstChild;
rootNode = new TreeNode("Referenced Objects",ROGROUPIMAGE,ROGROUPIMAGE);
rootNode.Tag = rootXml;
roTreeView.Nodes.Add(rootNode);
roTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.roTreeView_AfterSelect);
- roTreeView.DoubleClick += new System.EventHandler(this.roTreeView_OnDoubleClick);
+ roTreeView.DoubleClick += new System.EventHandler(this.roTreeView_OnDoubleClick);
roTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.roTreeView_BeforeExpand);
roTreeView.Sorted = true;
roTreeView.ContextMenu = treePopupMenu;
@@ -477,7 +485,7 @@ namespace ROEditor
// For each group, get its subgroup.
bool success = myrodb.RODB_GetRootGroups((VlnXmlElement)myroXmlDoc.FirstChild);
if (success == false) this.Close();
- VlnXmlElement group = (VlnXmlElement) myroXmlDoc.FirstChild.FirstChild;
+ VlnXmlElement group = (VlnXmlElement)myroXmlDoc.FirstChild.FirstChild;
while (group != null)
{
// Add the top groups to tree control as a node.
@@ -492,13 +500,14 @@ namespace ROEditor
subch.Tag = group;
grnode.Nodes.Add(subch);
}
- group = (VlnXmlElement) group.NextSibling;
+ group = (VlnXmlElement)group.NextSibling;
}
newone = null;
rootNode.Expand();
duplicate_active = false;
if (specificro != null) DoSpecificRO(specificro);
}
+
private void DoSpecificRO(string specificro)
{
// if a specific RO was passed in. Load the xml tree from it to the root & then
@@ -543,18 +552,18 @@ namespace ROEditor
else
parentid = null;
}
-
+
// Now hook this into the top part of tree by loading data into
// xml & hooking it into the tree control.
string attrele;
string attrspro;
TreeNode trnd = rootNode.FirstNode;
VlnXmlElement ele;
- for (int i=levelRecids.Count-1; i>=0; i--)
+ for (int i = levelRecids.Count-1;i>=0;i--)
{
ele = (VlnXmlElement) trnd.Tag;
attrele = ele.GetAttribute((i==levelRecids.Count-1)?"Table":"RecID");
- if (i==levelRecids.Count-1)
+ if (i == levelRecids.Count-1)
attrspro = spro.GetAttribute("Table");
else
attrspro = (string) levelRecids[i];
@@ -562,8 +571,8 @@ namespace ROEditor
{
// get next one.
trnd = trnd.NextNode;
- ele = (VlnXmlElement) trnd.Tag;
- attrele = ele.GetAttribute((i==levelRecids.Count-1)?"Table":"RecID");
+ ele = (VlnXmlElement)trnd.Tag;
+ attrele = ele.GetAttribute((i==levelRecids.Count - 1)?"Table":"RecID");
}
if (trnd == null)
{
@@ -574,7 +583,7 @@ namespace ROEditor
trnd = trnd.FirstNode;
}
// lastly select the active node, this will load up everything we need.
- if (trnd == null)
+ if (trnd == null)
{
MessageBox.Show("Error editting RO");
return;
@@ -587,7 +596,7 @@ namespace ROEditor
ele = (VlnXmlElement) trnd.Tag;
attrele = ele.GetAttribute("RecID");
}
- if (trnd == null)
+ if (trnd == null)
{
MessageBox.Show("Error editting RO");
return;
@@ -602,7 +611,7 @@ namespace ROEditor
// if the same node was selected, don't do anything.
if (LastSelectedNode != null && LastSelectedNode.Equals(roTreeView.SelectedNode)) return;
-
+
TreeNode CurrentNode = roTreeView.SelectedNode;
if (LastSelectedNode == null)
LastSelectedNode = CurrentNode;
@@ -614,7 +623,7 @@ namespace ROEditor
if (retval == -1) // cancel
{
roTreeView.SelectedNode = LastSelectedNode;
-
+
return;
}
LastSelectedNode = CurrentNode;
@@ -625,15 +634,15 @@ namespace ROEditor
{
XmlNode parent = newone.ParentNode;
parent.RemoveChild(newone);
- newone=null;
+ newone = null;
}
/* enable/disable menu items */
// Enable the Save item if changes were made
// Just copy the state of the Save Button
- menuROSave.Enabled = tbtnSave.Enabled;
- roTreeView.ContextMenu.MenuItems[6].Enabled = tbtnSave.Enabled;
+ menuROSave.Enabled = rbtnSave.Enabled; //RO Editor add symbols C2022-003
+ roTreeView.ContextMenu.MenuItems[6].Enabled = rbtnSave.Enabled;
// Should the properties menu item be available?
VlnXmlElement curelem = (VlnXmlElement) CurrentNode.Tag;
@@ -690,7 +699,7 @@ namespace ROEditor
{
VlnXmlElement curelemforNodeIter = (VlnXmlElement)nodeIter.Tag;
if (curelemforNodeIter.Name != "RO_Root" && curelemforNodeIter.Name != "vlnGroup")
- {
+{
nodeIter.BackColor = MULTISELECTCOLOR;
ROsSelectedforMultiMove.Add(nodeIter);
}
@@ -765,7 +774,7 @@ namespace ROEditor
while (cnt < len)
{
char tmpchr = tmpstr[cnt];
- if(!char.IsLetterOrDigit(tmpchr)&& (OKpunch.IndexOf(tmpchr) == -1) )
+ if (!char.IsLetterOrDigit(tmpchr) && (OKpunch.IndexOf(tmpchr) == -1))
{
decval = tmpchr;
outstr += OKpunch + decval.ToString("D3");
@@ -802,7 +811,7 @@ namespace ROEditor
if (tmpstr.Length <6)
indx = -1;
else
- indx=tmpstr.IndexOf(OKpunch,cur);
+ indx=tmpstr.IndexOf(OKpunch, cur);
string asc_spchar;
while (indx>=0)
{
@@ -814,9 +823,9 @@ namespace ROEditor
if (cur+6 > len)
indx = -1;
else
- indx = tmpstr.IndexOf(OKpunch,cur);
+ indx = tmpstr.IndexOf(OKpunch, cur);
}
- if (cur 0);
}
- tbtnSave.Enabled = true;
- tbtnRestore.Enabled = true;
+ rbtnSave.Enabled = true;
+ rbtnRestore.Enabled = true;
if (newone == null)
- { tbtnSaveAs.Enabled = true; }
+ { rbtnSaveAs.Enabled = true; }
else
- { tbtnSaveAs.Enabled = false; }
- tbtnCancel.Enabled = true;
- menuROSave.Enabled = tbtnSave.Enabled;
+ { rbtnSaveAs.Enabled = false; }
+ rbtnCancel.Enabled = true;
+
+ menuROSave.Enabled = rbtnSave.Enabled;
//B2021-080 set the mysavexml flag to true to ensure the text change will be saved
- if (this.CurrentTextBox != null && this.CurrentTextBox.Parent !=null)
+ if (this.CurrentTextBox != null && this.CurrentTextBox.Parent != null)
(this.CurrentTextBox.Parent as ctlXMLEdit).mysavexml = true;
}
@@ -1221,10 +1251,10 @@ namespace ROEditor
haskids1 = echild.GetAttribute("HasChild");
if (echild.HasAttribute("ChildLoaded")==true)
kidsloaded1 = echild.GetAttribute("ChildLoaded");
- if (haskids1=="True" && kidsloaded1=="False")
+ if (haskids1 == "True" && kidsloaded1=="False")
{
TreeNode subch = new TreeNode("VLN_DUMMY_FOR_TREE");
- chldnd.Nodes.Add(subch);
+ chldnd.Nodes.Add(subch);
}
}
else
@@ -1260,7 +1290,7 @@ namespace ROEditor
///
protected override void Dispose( bool disposing )
{
- if( disposing )
+ if ( disposing )
{
if (components != null)
{
@@ -1277,124 +1307,310 @@ namespace ROEditor
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
- this.imageListRoTree = new System.Windows.Forms.ImageList(this.components);
- this.splitter1 = new System.Windows.Forms.Splitter();
- this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
- this.menuRO = new System.Windows.Forms.MenuItem();
- this.menuRONew = new System.Windows.Forms.MenuItem();
- this.menuNewGroup = new System.Windows.Forms.MenuItem();
- this.menuNewRefObj = new System.Windows.Forms.MenuItem();
- this.menuItem1 = new System.Windows.Forms.MenuItem();
- this.menuROEdit = new System.Windows.Forms.MenuItem();
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
+ this.imageListRoTree = new System.Windows.Forms.ImageList(this.components);
+ this.splitter1 = new System.Windows.Forms.Splitter();
+ this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
+ this.ribbonPanel1 = new DevComponents.DotNetBar.RibbonPanel(); // RO Editor add symbols C2022 - 003
+ this.ribbonBar1 = new DevComponents.DotNetBar.RibbonBar(); // RO Editor add symbols C2022 - 003
+ this.rbtnSave = new DevComponents.DotNetBar.ButtonItem();
+ this.rbtnCancel = new DevComponents.DotNetBar.ButtonItem();
+ this.rbtnRestore = new DevComponents.DotNetBar.ButtonItem();
+ this.rbtnSaveAs = new DevComponents.DotNetBar.ButtonItem();
+ this.rbtnDuplicate = new DevComponents.DotNetBar.ButtonItem();
+ this.rbtnZoom = new DevComponents.DotNetBar.ButtonItem();
+ this.rbtnSymbols = new DevComponents.DotNetBar.ButtonItem();
+ this.galleryContainerSymbols = new DevComponents.DotNetBar.GalleryContainer();
+ this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
+ this.menuRO = new System.Windows.Forms.MenuItem();
+ this.menuRONew = new System.Windows.Forms.MenuItem();
+ this.menuNewGroup = new System.Windows.Forms.MenuItem();
+ this.menuNewRefObj = new System.Windows.Forms.MenuItem();
+ this.menuItem1 = new System.Windows.Forms.MenuItem();
+ this.menuROEdit = new System.Windows.Forms.MenuItem();
this.menuROCut = new System.Windows.Forms.MenuItem();
this.menuROPaste = new System.Windows.Forms.MenuItem();
this.menuRODelete = new System.Windows.Forms.MenuItem();
- this.menuROSave = new System.Windows.Forms.MenuItem();
- this.menuROProperties = new System.Windows.Forms.MenuItem();
- this.menuItem10 = new System.Windows.Forms.MenuItem();
- this.menuROExit = new System.Windows.Forms.MenuItem();
- this.menuEdit = new System.Windows.Forms.MenuItem();
- this.menuEditUndo = new System.Windows.Forms.MenuItem();
- this.menuItem3 = new System.Windows.Forms.MenuItem();
- this.menuEditCut = new System.Windows.Forms.MenuItem();
- this.menuEditCopy = new System.Windows.Forms.MenuItem();
- this.menuEditPaste = new System.Windows.Forms.MenuItem();
- this.menuEditDelete = new System.Windows.Forms.MenuItem();
- this.menuItem5 = new System.Windows.Forms.MenuItem();
- this.menuEditSelAll = new System.Windows.Forms.MenuItem();
- this.menuTools = new System.Windows.Forms.MenuItem();
- this.menuToolsROFST = new System.Windows.Forms.MenuItem();
- this.menuHelp = new System.Windows.Forms.MenuItem();
- this.menuHelpAbout = new System.Windows.Forms.MenuItem();
- this.menuItem2 = new System.Windows.Forms.MenuItem();
- this.panel1 = new System.Windows.Forms.Panel();
- this.panel2 = new System.Windows.Forms.Panel();
- this.roTreeView = new System.Windows.Forms.TreeView();
- this.tbar = new System.Windows.Forms.ToolBar();
- this.tbtnSave = new System.Windows.Forms.ToolBarButton();
- this.tbtnCancel = new System.Windows.Forms.ToolBarButton();
- this.tbtnRestore = new System.Windows.Forms.ToolBarButton();
- this.tbtnSaveAs = new System.Windows.Forms.ToolBarButton();
- this.tbtnDuplicate = new System.Windows.Forms.ToolBarButton();
- this.tbtnZoom = new System.Windows.Forms.ToolBarButton();
- this.imageListToolBar = new System.Windows.Forms.ImageList(this.components);
- this.lblDuplicateRO = new System.Windows.Forms.Label();
- this.panel1.SuspendLayout();
- this.SuspendLayout();
- //
- // imageListRoTree
- //
- this.imageListRoTree.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListRoTree.ImageStream")));
- this.imageListRoTree.TransparentColor = System.Drawing.Color.Transparent;
- this.imageListRoTree.Images.SetKeyName(0, "");
- this.imageListRoTree.Images.SetKeyName(1, "");
- //
- // splitter1
- //
- this.splitter1.Location = new System.Drawing.Point(220, 28);
- this.splitter1.Name = "splitter1";
- this.splitter1.Size = new System.Drawing.Size(8, 591);
- this.splitter1.TabIndex = 4;
- this.splitter1.TabStop = false;
- //
- // mainMenu1
- //
- this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+ this.menuROSave = new System.Windows.Forms.MenuItem();
+ this.menuROProperties = new System.Windows.Forms.MenuItem();
+ this.menuItem10 = new System.Windows.Forms.MenuItem();
+ this.menuROExit = new System.Windows.Forms.MenuItem();
+ this.menuEdit = new System.Windows.Forms.MenuItem();
+ this.menuEditUndo = new System.Windows.Forms.MenuItem();
+ this.menuItem3 = new System.Windows.Forms.MenuItem();
+ this.menuEditCut = new System.Windows.Forms.MenuItem();
+ this.menuEditCopy = new System.Windows.Forms.MenuItem();
+ this.menuEditPaste = new System.Windows.Forms.MenuItem();
+ this.menuEditDelete = new System.Windows.Forms.MenuItem();
+ this.menuItem5 = new System.Windows.Forms.MenuItem();
+ this.menuEditSelAll = new System.Windows.Forms.MenuItem();
+ this.menuTools = new System.Windows.Forms.MenuItem();
+ this.menuToolsROFST = new System.Windows.Forms.MenuItem();
+ this.menuHelp = new System.Windows.Forms.MenuItem();
+ this.menuHelpAbout = new System.Windows.Forms.MenuItem();
+ this.menuItem2 = new System.Windows.Forms.MenuItem();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.roTreeView = new System.Windows.Forms.TreeView();
+ this.tbar = new System.Windows.Forms.ToolBar();
+ this.imageListToolBar = new System.Windows.Forms.ImageList(this.components);
+ this.lblDuplicateRO = new System.Windows.Forms.Label();
+ this.ribbonControl1.SuspendLayout();
+ this.ribbonPanel1.SuspendLayout();
+ this.panel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // imageListRoTree
+ //
+ this.imageListRoTree.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListRoTree.ImageStream")));
+ this.imageListRoTree.TransparentColor = System.Drawing.Color.Transparent;
+ this.imageListRoTree.Images.SetKeyName(0, "");
+ this.imageListRoTree.Images.SetKeyName(1, "");
+ //
+ // splitter1
+ //
+ this.splitter1.Location = new System.Drawing.Point(220, 50);
+ this.splitter1.Name = "splitter1";
+ this.splitter1.Size = new System.Drawing.Size(8, 569);
+ this.splitter1.TabIndex = 4;
+ this.splitter1.TabStop = false;
+ //
+ // ribbonControl1
+ //
+ this.ribbonControl1.BackColor = System.Drawing.Color.White;
+ //
+ //
+ //
+ this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; // RO Editor add symbols C2022 - 003
+ this.ribbonControl1.CaptionVisible = true;
+ this.ribbonControl1.Controls.Add(this.ribbonPanel1);
+ this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top;
+ this.ribbonControl1.ForeColor = System.Drawing.Color.Black;
+ this.ribbonControl1.KeyTipsFont = new System.Drawing.Font("Tahoma", 7F);
+ this.ribbonControl1.Location = new System.Drawing.Point(0, 0);
+ this.ribbonControl1.Name = "ribbonControl1";
+ this.ribbonControl1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 3);
+ this.ribbonControl1.QuickToolbarItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.rbtnSave,
+ this.rbtnCancel,
+ this.rbtnRestore,
+ this.rbtnSaveAs,
+ this.rbtnDuplicate,
+ this.rbtnZoom,
+ this.rbtnSymbols});
+ this.ribbonControl1.Size = new System.Drawing.Size(980, 50);
+ this.ribbonControl1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonControl1.SystemText.MaximizeRibbonText = "&Maximize the Ribbon";
+ this.ribbonControl1.SystemText.MinimizeRibbonText = "Mi&nimize the Ribbon";
+ this.ribbonControl1.SystemText.QatAddItemText = "&Add to Quick Access Toolbar";
+ this.ribbonControl1.SystemText.QatCustomizeMenuLabel = "Customize Quick Access Toolbar";
+ this.ribbonControl1.SystemText.QatCustomizeText = "&Customize Quick Access Toolbar...";
+ this.ribbonControl1.SystemText.QatDialogAddButton = "&Add >>";
+ this.ribbonControl1.SystemText.QatDialogCancelButton = "Cancel";
+ this.ribbonControl1.SystemText.QatDialogCaption = "Customize Quick Access Toolbar";
+ this.ribbonControl1.SystemText.QatDialogCategoriesLabel = "&Choose commands from:";
+ this.ribbonControl1.SystemText.QatDialogOkButton = "OK";
+ this.ribbonControl1.SystemText.QatDialogPlacementCheckbox = "&Place Quick Access Toolbar below the Ribbon";
+ this.ribbonControl1.SystemText.QatDialogRemoveButton = "&Remove";
+ this.ribbonControl1.SystemText.QatPlaceAboveRibbonText = "&Place Quick Access Toolbar above the Ribbon";
+ this.ribbonControl1.SystemText.QatPlaceBelowRibbonText = "&Place Quick Access Toolbar below the Ribbon";
+ this.ribbonControl1.SystemText.QatRemoveItemText = "&Remove from Quick Access Toolbar";
+ this.ribbonControl1.TabGroupHeight = 14;
+ this.ribbonControl1.TabIndex = 0;
+ this.ribbonControl1.Text = "ribbonControl1";
+ //
+ // ribbonPanel1
+ //
+ this.ribbonPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; // RO Editor add symbols C2022 - 003
+ this.ribbonPanel1.Controls.Add(this.ribbonBar1);
+ this.ribbonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ribbonPanel1.Location = new System.Drawing.Point(0, 0);
+ this.ribbonPanel1.Name = "ribbonPanel1";
+ this.ribbonPanel1.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
+ this.ribbonPanel1.Size = new System.Drawing.Size(980, 47);
+ //
+ //
+ //
+ this.ribbonPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel1.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonPanel1.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonPanel1.TabIndex = 1;
+ //
+ // ribbonBar1
+ //
+ this.ribbonBar1.AutoOverflowEnabled = true;
+ //
+ //
+ //
+ this.ribbonBar1.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.ribbonBar1.ContainerControlProcessDialogKey = true;
+ this.ribbonBar1.Dock = System.Windows.Forms.DockStyle.Left;
+ this.ribbonBar1.DragDropSupport = true;
+ this.ribbonBar1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
+ this.ribbonBar1.Location = new System.Drawing.Point(3, 0);
+ this.ribbonBar1.Name = "ribbonBar1";
+ this.ribbonBar1.Size = new System.Drawing.Size(794, 44);
+ this.ribbonBar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.ribbonBar1.TabIndex = 0;
+ this.ribbonBar1.Text = "ribbonBar1";
+ //
+ //
+ //
+ this.ribbonBar1.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.ribbonBar1.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ // rbtnSave
+ //
+ this.rbtnSave.Enabled = false;
+ this.rbtnSave.Name = "rbtnSave";
+ this.rbtnSave.Text = "Save";
+ this.rbtnSave.Click += new System.EventHandler(this.rbtnSave_Click);
+ //
+ // rbtnCancel
+ //
+ this.rbtnCancel.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+ this.rbtnCancel.Enabled = false;
+ this.rbtnCancel.Name = "rbtnCancel";
+ this.rbtnCancel.SubItemsExpandWidth = 24;
+ this.rbtnCancel.Text = "Cancel";
+ this.rbtnCancel.Click += new System.EventHandler(this.rbtnCancel_Click);
+ //
+ // rbtnRestore
+ //
+ this.rbtnRestore.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+ this.rbtnRestore.Enabled = false;
+ this.rbtnRestore.Name = "rbtnRestore";
+ this.rbtnRestore.SubItemsExpandWidth = 24;
+ this.rbtnRestore.Text = "Restore";
+ this.rbtnRestore.Click += new System.EventHandler(this.rbtnRestore_Click);
+ //
+ // rbtnSaveAs
+ //
+ this.rbtnSaveAs.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+ this.rbtnSaveAs.Enabled = false;
+ this.rbtnSaveAs.Name = "rbtnSaveAs";
+ this.rbtnSaveAs.SubItemsExpandWidth = 24;
+ this.rbtnSaveAs.Text = "Save As";
+ this.rbtnSaveAs.Click += new System.EventHandler(this.rbtnSaveAs_Click);
+ //
+ // rbtnDuplicate
+ //
+ this.rbtnDuplicate.BeginGroup = true;
+ this.rbtnDuplicate.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+ this.rbtnDuplicate.Enabled = false;
+ this.rbtnDuplicate.Name = "rbtnDuplicate";
+ this.rbtnDuplicate.SubItemsExpandWidth = 24;
+ this.rbtnDuplicate.Text = "Duplicate";
+ this.rbtnDuplicate.Click += new System.EventHandler(this.rbtnDuplicate_Click);
+ //
+ // rbtnZoom
+ //
+ this.rbtnZoom.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+ this.rbtnZoom.Enabled = false;
+ this.rbtnZoom.Name = "rbtnZoom";
+ this.rbtnZoom.SubItemsExpandWidth = 24;
+ this.rbtnZoom.Text = "Zoom";
+ this.rbtnZoom.Click += new System.EventHandler(this.rbtnZoom_Click);
+ //
+ // rbtnSymbols
+ //
+ this.rbtnSymbols.AutoExpandOnClick = true;
+ this.rbtnSymbols.Enabled = false;
+ this.rbtnSymbols.KeyTips = "CS";
+ this.rbtnSymbols.Name = "rbtnSymbols";
+ this.rbtnSymbols.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+ this.galleryContainerSymbols});
+ this.rbtnSymbols.SubItemsExpandWidth = 14;
+ this.rbtnSymbols.Text = "Symbols";
+ //
+ // galleryContainerSymbols
+ //
+ //
+ //
+ //
+ this.galleryContainerSymbols.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.galleryContainerSymbols.DefaultSize = new System.Drawing.Size(205, 150);
+ this.galleryContainerSymbols.MinimumSize = new System.Drawing.Size(58, 58);
+ this.galleryContainerSymbols.Name = "galleryContainerSymbols";
+ //
+ //
+ //
+ this.galleryContainerSymbols.TitleMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.galleryContainerSymbols.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ // mainMenu1
+ //
+ this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuRO,
this.menuEdit,
this.menuTools,
this.menuHelp,
this.menuItem2});
- //
- // menuRO
- //
- this.menuRO.Index = 0;
- this.menuRO.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+ //
+ // menuRO
+ //
+ this.menuRO.Index = 0;
+ this.menuRO.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuRONew,
this.menuItem1,
this.menuROEdit,
- this.menuROCut,
- this.menuROPaste,
+ this.menuROCut,
+ this.menuROPaste,
this.menuRODelete,
this.menuROSave,
this.menuROProperties,
this.menuItem10,
this.menuROExit});
- this.menuRO.Text = "RO";
- //
- // menuRONew
- //
- this.menuRONew.Index = 0;
- this.menuRONew.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+ this.menuRO.Text = "RO";
+ //
+ // menuRONew
+ //
+ this.menuRONew.Index = 0;
+ this.menuRONew.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuNewGroup,
this.menuNewRefObj});
- this.menuRONew.Text = "New ...";
- //
- // menuNewGroup
- //
- this.menuNewGroup.Index = 0;
- this.menuNewGroup.Text = "Group";
- this.menuNewGroup.Click += new System.EventHandler(this.menuNewGroup_Click);
- //
- // menuNewRefObj
- //
- this.menuNewRefObj.Index = 1;
- this.menuNewRefObj.Text = "Referenced Object";
- this.menuNewRefObj.Click += new System.EventHandler(this.menuNewRefObj_Click);
- //
- // menuItem1
- //
- this.menuItem1.Index = 1;
- this.menuItem1.Text = "-";
- //
- // menuROEdit
- //
- this.menuROEdit.Enabled = false;
- this.menuROEdit.Index = 2;
- this.menuROEdit.Text = "Edit";
- this.menuROEdit.Click += new System.EventHandler(this.menuROEdit_Click);
+ this.menuRONew.Text = "New ...";
+ //
+ // menuNewGroup
+ //
+ this.menuNewGroup.Index = 0;
+ this.menuNewGroup.Text = "Group";
+ this.menuNewGroup.Click += new System.EventHandler(this.menuNewGroup_Click);
+ //
+ // menuNewRefObj
+ //
+ this.menuNewRefObj.Index = 1;
+ this.menuNewRefObj.Text = "Referenced Object";
+ this.menuNewRefObj.Click += new System.EventHandler(this.menuNewRefObj_Click);
+ //
+ // menuItem1
+ //
+ this.menuItem1.Index = 1;
+ this.menuItem1.Text = "-";
+ //
+ // menuROEdit
+ //
+ this.menuROEdit.Enabled = false;
+ this.menuROEdit.Index = 2;
+ this.menuROEdit.Text = "Edit";
+ this.menuROEdit.Click += new System.EventHandler(this.menuROEdit_Click);
//
// menuROCut
//
@@ -1413,37 +1629,37 @@ namespace ROEditor
// menuRODelete
//
this.menuRODelete.Index = 5;
- this.menuRODelete.Text = "Delete";
- this.menuRODelete.Click += new System.EventHandler(this.menuRODelete_Click);
- //
- // menuROSave
- //
- this.menuROSave.Enabled = false;
- this.menuROSave.Index = 6;
- this.menuROSave.Text = "Save";
- this.menuROSave.Click += new System.EventHandler(this.menuROSave_Click);
- //
- // menuROProperties
- //
- this.menuROProperties.Index = 7;
- this.menuROProperties.Text = "Properties";
- this.menuROProperties.Click += new System.EventHandler(this.menuROProperties_Click);
- //
- // menuItem10
- //
- this.menuItem10.Index = 8;
- this.menuItem10.Text = "-";
- //
- // menuROExit
- //
- this.menuROExit.Index = 9;
- this.menuROExit.Text = "Exit RO Editor";
- this.menuROExit.Click += new System.EventHandler(this.menuROExit_Click);
- //
- // menuEdit
- //
- this.menuEdit.Index = 1;
- this.menuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+ this.menuRODelete.Text = "Delete";
+ this.menuRODelete.Click += new System.EventHandler(this.menuRODelete_Click);
+ //
+ // menuROSave
+ //
+ this.menuROSave.Enabled = false;
+ this.menuROSave.Index = 6;
+ this.menuROSave.Text = "Save";
+ this.menuROSave.Click += new System.EventHandler(this.menuROSave_Click);
+ //
+ // menuROProperties
+ //
+ this.menuROProperties.Index = 7;
+ this.menuROProperties.Text = "Properties";
+ this.menuROProperties.Click += new System.EventHandler(this.menuROProperties_Click);
+ //
+ // menuItem10
+ //
+ this.menuItem10.Index = 8;
+ this.menuItem10.Text = "-";
+ //
+ // menuROExit
+ //
+ this.menuROExit.Index = 9;
+ this.menuROExit.Text = "Exit RO Editor";
+ this.menuROExit.Click += new System.EventHandler(this.menuROExit_Click);
+ //
+ // menuEdit
+ //
+ this.menuEdit.Index = 1;
+ this.menuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuEditUndo,
this.menuItem3,
this.menuEditCut,
@@ -1452,231 +1668,188 @@ namespace ROEditor
this.menuEditDelete,
this.menuItem5,
this.menuEditSelAll});
- this.menuEdit.Text = "Edit";
- //
- // menuEditUndo
- //
- this.menuEditUndo.Enabled = false;
- this.menuEditUndo.Index = 0;
- this.menuEditUndo.Text = "&Undo";
- this.menuEditUndo.Click += new System.EventHandler(this.menuEditUndo_Click);
- //
- // menuItem3
- //
- this.menuItem3.Index = 1;
- this.menuItem3.Text = "-";
- //
- // menuEditCut
- //
- this.menuEditCut.Enabled = false;
- this.menuEditCut.Index = 2;
- this.menuEditCut.Text = "Cu&t";
- this.menuEditCut.Click += new System.EventHandler(this.menuEditCut_Click);
- //
- // menuEditCopy
- //
- this.menuEditCopy.Enabled = false;
- this.menuEditCopy.Index = 3;
- this.menuEditCopy.Text = "&Copy";
- this.menuEditCopy.Click += new System.EventHandler(this.menuEditCopy_Click);
- //
- // menuEditPaste
- //
- this.menuEditPaste.Enabled = false;
- this.menuEditPaste.Index = 4;
- this.menuEditPaste.Text = "&Paste";
- this.menuEditPaste.Click += new System.EventHandler(this.menuEditPaste_Click);
- //
- // menuEditDelete
- //
- this.menuEditDelete.Enabled = false;
- this.menuEditDelete.Index = 5;
- this.menuEditDelete.Text = "&Delete";
- this.menuEditDelete.Click += new System.EventHandler(this.menuEditDelete_Click);
- //
- // menuItem5
- //
- this.menuItem5.Index = 6;
- this.menuItem5.Text = "-";
- //
- // menuEditSelAll
- //
- this.menuEditSelAll.Enabled = false;
- this.menuEditSelAll.Index = 7;
- this.menuEditSelAll.Text = "Select &All";
- this.menuEditSelAll.Click += new System.EventHandler(this.menuEditSelAll_Click);
- //
- // menuTools
- //
- this.menuTools.Index = 2;
- this.menuTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+ this.menuEdit.Text = "Edit";
+ //
+ // menuEditUndo
+ //
+ this.menuEditUndo.Enabled = false;
+ this.menuEditUndo.Index = 0;
+ this.menuEditUndo.Text = "&Undo";
+ this.menuEditUndo.Click += new System.EventHandler(this.menuEditUndo_Click);
+ //
+ // menuItem3
+ //
+ this.menuItem3.Index = 1;
+ this.menuItem3.Text = "-";
+ //
+ // menuEditCut
+ //
+ this.menuEditCut.Enabled = false;
+ this.menuEditCut.Index = 2;
+ this.menuEditCut.Text = "Cu&t";
+ this.menuEditCut.Click += new System.EventHandler(this.menuEditCut_Click);
+ //
+ // menuEditCopy
+ //
+ this.menuEditCopy.Enabled = false;
+ this.menuEditCopy.Index = 3;
+ this.menuEditCopy.Text = "&Copy";
+ this.menuEditCopy.Click += new System.EventHandler(this.menuEditCopy_Click);
+ //
+ // menuEditPaste
+ //
+ this.menuEditPaste.Enabled = false;
+ this.menuEditPaste.Index = 4;
+ this.menuEditPaste.Text = "&Paste";
+ this.menuEditPaste.Click += new System.EventHandler(this.menuEditPaste_Click);
+ //
+ // menuEditDelete
+ //
+ this.menuEditDelete.Enabled = false;
+ this.menuEditDelete.Index = 5;
+ this.menuEditDelete.Text = "&Delete";
+ this.menuEditDelete.Click += new System.EventHandler(this.menuEditDelete_Click);
+ //
+ // menuItem5
+ //
+ this.menuItem5.Index = 6;
+ this.menuItem5.Text = "-";
+ //
+ // menuEditSelAll
+ //
+ this.menuEditSelAll.Enabled = false;
+ this.menuEditSelAll.Index = 7;
+ this.menuEditSelAll.Text = "Select &All";
+ this.menuEditSelAll.Click += new System.EventHandler(this.menuEditSelAll_Click);
+ //
+ // menuTools
+ //
+ this.menuTools.Index = 2;
+ this.menuTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuToolsROFST});
- this.menuTools.Text = "Tools";
- //
- // menuToolsROFST
- //
- this.menuToolsROFST.Index = 0;
- this.menuToolsROFST.Text = "Create RO.FST";
- this.menuToolsROFST.Click += new System.EventHandler(this.menuToolsROFST_Click);
- //
- // menuHelp
- //
- this.menuHelp.Index = 3;
- this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+ this.menuTools.Text = "Tools";
+ //
+ // menuToolsROFST
+ //
+ this.menuToolsROFST.Index = 0;
+ this.menuToolsROFST.Text = "Create RO.FST";
+ this.menuToolsROFST.Click += new System.EventHandler(this.menuToolsROFST_Click);
+ //
+ // menuHelp
+ //
+ this.menuHelp.Index = 3;
+ this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuHelpAbout});
- this.menuHelp.Text = "Help";
- //
- // menuHelpAbout
- //
- this.menuHelpAbout.Index = 0;
- this.menuHelpAbout.Text = "About";
- this.menuHelpAbout.Click += new System.EventHandler(this.menuHelpAbout_Click);
- //
- // menuItem2
- //
- this.menuItem2.Index = 4;
- this.menuItem2.Text = "";
- //
- // panel1
- //
- this.panel1.AutoScroll = true;
- this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
- this.panel1.Controls.Add(this.panel2);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel1.Location = new System.Drawing.Point(228, 28);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(752, 591);
- this.panel1.TabIndex = 5;
- //
- // panel2
- //
- this.panel2.AutoScroll = true;
- this.panel2.Location = new System.Drawing.Point(0, 0);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(235, 118);
- this.panel2.TabIndex = 0;
- this.panel2.Visible = false;
- //
- // roTreeView
- //
- this.roTreeView.Dock = System.Windows.Forms.DockStyle.Left;
- this.roTreeView.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.roTreeView.ImageIndex = 0;
- this.roTreeView.ImageList = this.imageListRoTree;
- this.roTreeView.ItemHeight = 18;
- this.roTreeView.Location = new System.Drawing.Point(0, 28);
- this.roTreeView.Name = "roTreeView";
- this.roTreeView.SelectedImageIndex = 0;
- this.roTreeView.Size = new System.Drawing.Size(220, 591);
- this.roTreeView.TabIndex = 3;
- this.roTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.roTreeView_AfterSelect_1);
- //
- // tbar
- //
- this.tbar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
- this.tbtnSave,
- this.tbtnCancel,
- this.tbtnRestore,
- this.tbtnSaveAs,
- this.tbtnDuplicate,
- this.tbtnZoom});
- this.tbar.DropDownArrows = true;
- this.tbar.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tbar.ImageList = this.imageListToolBar;
- this.tbar.Location = new System.Drawing.Point(0, 0);
- this.tbar.Name = "tbar";
- this.tbar.ShowToolTips = true;
- this.tbar.Size = new System.Drawing.Size(980, 28);
- this.tbar.TabIndex = 0;
- this.tbar.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right;
- this.tbar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tbar_OnClick);
- //
- // tbtnSave
- //
- this.tbtnSave.Enabled = false;
- this.tbtnSave.ImageIndex = 0;
- this.tbtnSave.Name = "tbtnSave";
- this.tbtnSave.Text = "Save";
- //
- // tbtnCancel
- //
- this.tbtnCancel.Enabled = false;
- this.tbtnCancel.ImageIndex = 1;
- this.tbtnCancel.Name = "tbtnCancel";
- this.tbtnCancel.Text = "Cancel";
- //
- // tbtnRestore
- //
- this.tbtnRestore.Enabled = false;
- this.tbtnRestore.ImageIndex = 2;
- this.tbtnRestore.Name = "tbtnRestore";
- this.tbtnRestore.Text = "Restore";
- //
- // tbtnSaveAs
- //
- this.tbtnSaveAs.Enabled = false;
- this.tbtnSaveAs.ImageIndex = 3;
- this.tbtnSaveAs.Name = "tbtnSaveAs";
- this.tbtnSaveAs.Text = "Save As";
- //
- // tbtnDuplicate
- //
- this.tbtnDuplicate.Enabled = false;
- this.tbtnDuplicate.ImageIndex = 4;
- this.tbtnDuplicate.Name = "tbtnDuplicate";
- this.tbtnDuplicate.Text = "Duplicate";
- //
- // tbtnZoom
- //
- this.tbtnZoom.Enabled = false;
- this.tbtnZoom.ImageIndex = 5;
- this.tbtnZoom.Name = "tbtnZoom";
- this.tbtnZoom.Text = "Zoom";
- //
- // imageListToolBar
- //
- this.imageListToolBar.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListToolBar.ImageStream")));
- this.imageListToolBar.TransparentColor = System.Drawing.Color.Transparent;
- this.imageListToolBar.Images.SetKeyName(0, "");
- this.imageListToolBar.Images.SetKeyName(1, "");
- this.imageListToolBar.Images.SetKeyName(2, "");
- this.imageListToolBar.Images.SetKeyName(3, "");
- this.imageListToolBar.Images.SetKeyName(4, "");
- this.imageListToolBar.Images.SetKeyName(5, "");
- //
- // lblDuplicateRO
- //
- this.lblDuplicateRO.AutoSize = true;
- this.lblDuplicateRO.ForeColor = System.Drawing.Color.Red;
- this.lblDuplicateRO.Location = new System.Drawing.Point(570, 9);
- this.lblDuplicateRO.Name = "lblDuplicateRO";
- this.lblDuplicateRO.Size = new System.Drawing.Size(139, 13);
- this.lblDuplicateRO.TabIndex = 6;
- this.lblDuplicateRO.Text = "Working With Duplicate RO";
- this.lblDuplicateRO.Visible = false;
- //
- // Form1
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(980, 619);
- this.Controls.Add(this.lblDuplicateRO);
- this.Controls.Add(this.panel1);
- this.Controls.Add(this.splitter1);
- this.Controls.Add(this.roTreeView);
- this.Controls.Add(this.tbar);
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.Menu = this.mainMenu1;
- this.Name = "Form1";
- this.Text = "RO Edit";
- this.panel1.ResumeLayout(false);
- this.ResumeLayout(false);
- this.PerformLayout();
+ this.menuHelp.Text = "Help";
+ //
+ // menuHelpAbout
+ //
+ this.menuHelpAbout.Index = 0;
+ this.menuHelpAbout.Text = "About";
+ this.menuHelpAbout.Click += new System.EventHandler(this.menuHelpAbout_Click);
+ //
+ // menuItem2
+ //
+ this.menuItem2.Index = 4;
+ this.menuItem2.Text = "";
+ //
+ // panel1
+ //
+ this.panel1.AutoScroll = true;
+ this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+ this.panel1.Controls.Add(this.panel2);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(228, 50);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(752, 569);
+ this.panel1.TabIndex = 5;
+ //
+ // panel2
+ //
+ this.panel2.AutoScroll = true;
+ this.panel2.Location = new System.Drawing.Point(0, 0);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(235, 118);
+ this.panel2.TabIndex = 0;
+ this.panel2.Visible = false;
+ //
+ // roTreeView
+ //
+ this.roTreeView.Dock = System.Windows.Forms.DockStyle.Left;
+ this.roTreeView.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.roTreeView.ImageIndex = 0;
+ this.roTreeView.ImageList = this.imageListRoTree;
+ this.roTreeView.ItemHeight = 18;
+ this.roTreeView.Location = new System.Drawing.Point(0, 50);
+ this.roTreeView.Name = "roTreeView";
+ this.roTreeView.SelectedImageIndex = 0;
+ this.roTreeView.Size = new System.Drawing.Size(220, 569);
+ this.roTreeView.TabIndex = 3;
+
+ //
+ // imageListToolBar
+ //
+ this.imageListToolBar.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListToolBar.ImageStream")));
+ this.imageListToolBar.TransparentColor = System.Drawing.Color.Transparent;
+ this.imageListToolBar.Images.SetKeyName(0, "");
+ this.imageListToolBar.Images.SetKeyName(1, "");
+ this.imageListToolBar.Images.SetKeyName(2, "");
+ this.imageListToolBar.Images.SetKeyName(3, "");
+ this.imageListToolBar.Images.SetKeyName(4, "");
+ this.imageListToolBar.Images.SetKeyName(5, "");
+ //
+ // lblDuplicateRO
+ //
+ this.lblDuplicateRO.AutoSize = true;
+ this.lblDuplicateRO.ForeColor = System.Drawing.Color.Red;
+ this.lblDuplicateRO.Location = new System.Drawing.Point(570, 9);
+ this.lblDuplicateRO.Name = "lblDuplicateRO";
+ this.lblDuplicateRO.Size = new System.Drawing.Size(139, 13);
+ this.lblDuplicateRO.TabIndex = 6;
+ this.lblDuplicateRO.Text = "Working With Duplicate RO";
+ this.lblDuplicateRO.Visible = false;
+ //
+ //
+ // Form1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(980, 619);
+ this.Controls.Add(this.lblDuplicateRO);
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.splitter1);
+ this.Controls.Add(this.roTreeView);
+ //this.Controls.Add(this.tbar);
+ this.Controls.Add(this.ribbonControl1);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Menu = this.mainMenu1;
+ this.Name = "Form1";
+ this.Text = "RO Edit";
+ this.ribbonControl1.ResumeLayout(false);
+ this.ribbonControl1.PerformLayout();
+ this.ribbonPanel1.ResumeLayout(false);
+ this.panel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
+ private DevComponents.DotNetBar.RibbonControl ribbonControl1;
+ private DevComponents.DotNetBar.RibbonPanel ribbonPanel1;
+ private DevComponents.DotNetBar.RibbonBar ribbonBar1;
+ private DevComponents.DotNetBar.ButtonItem rbtnCancel;
+ private DevComponents.DotNetBar.ButtonItem rbtnRestore;
+ private DevComponents.DotNetBar.ButtonItem rbtnSaveAs;
+ private DevComponents.DotNetBar.ButtonItem rbtnDuplicate;
+ private DevComponents.DotNetBar.ButtonItem rbtnZoom;
+ private DevComponents.DotNetBar.ButtonItem rbtnSymbols;
+ private DevComponents.DotNetBar.ButtonItem rbtnSave;
+ private DevComponents.DotNetBar.GalleryContainer galleryContainerSymbols;
+ private DevComponents.DotNetBar.GalleryContainer galSymbols;
+
+
//Cut/Paste (Move ROs) added as part of CSM-C2024-027 / Part of 2024 PROMS Upgrades
private void menuROCut_Click(object sender, EventArgs e)
- {
+ {
ROCutWasSelected = true;
string msgstr = "It is recommended that after moving ROs, you create a FST and use it to update RO Values in PROMS to ensure RO Links properly move to the new location as well.\n\n Are you sure you wish to move the RO(s)?";
@@ -1687,6 +1860,8 @@ namespace ROEditor
}
+
+
//part of CSM-C2024-027 / Part of 2024 PROMS Upgrades
//Paste Selected - will move individual ROs
private void menuROPaste_Click(object sender, EventArgs e)
@@ -1699,7 +1874,7 @@ namespace ROEditor
foreach (TreeNode tnToCut in ROsSelectedforMultiMove)
{
- VlnXmlElement ROtoCut = ((VlnXmlElement) tnToCut.Tag);
+ VlnXmlElement ROtoCut = ((VlnXmlElement)tnToCut.Tag);
if (((VlnXmlElement)roTreeView.SelectedNode.Tag).GetAttribute("Table") != ROtoCut.GetAttribute("Table"))
{
MessageBox.Show("You can only move a RO within the same table.");
@@ -1727,11 +1902,13 @@ namespace ROEditor
}
roTreeView_ClearAllMultiSelect();
- tbtnRestore.Enabled = false;
- tbtnSave.Enabled = false;
- tbtnCancel.Enabled = true;
- tbtnSaveAs.Enabled = false;
- tbtnDuplicate.Enabled = true;
+
+ rbtnRestore.Enabled = false; // RO Editor add symbols C2022 - 003
+ rbtnSave.Enabled = false;
+ rbtnCancel.Enabled = true;
+ rbtnSaveAs.Enabled = false;
+ rbtnDuplicate.Enabled = true;
+
duplicate_active = false;
ROCutWasSelected = false;
menuROCut.Enabled = false;
@@ -1739,7 +1916,7 @@ namespace ROEditor
menuROPaste.Enabled = false;
roTreeView.ContextMenu.MenuItems[4].Enabled = menuROPaste.Enabled;
roTreeView.Refresh();
-
+
}
//part of CSM-C2024-027 / Part of 2024 PROMS Upgrades
@@ -1810,7 +1987,7 @@ namespace ROEditor
{
string fname_inxml = fldname.Split(new string[] { "\t" }, StringSplitOptions.None)[0];
string fname = CvtFldToUserFld(fname_inxml);
- if (!InUseList_ROtoMove.Any(x=> x.GetFieldname == CvtFldToUserFld(fldname.Split(new string[] { "\t" }, StringSplitOptions.None)[0])) || newro.ChildNodes.Cast().Any(x => x.Name == fname_inxml && x.InnerText.Length == 0))
+ if (!InUseList_ROtoMove.Any(x => x.GetFieldname == CvtFldToUserFld(fldname.Split(new string[] { "\t" }, StringSplitOptions.None)[0])) || newro.ChildNodes.Cast().Any(x => x.Name == fname_inxml && x.InnerText.Length == 0))
{
MessageBox.Show($"RO: {orig_title}. Required field \"{fname}\" is missing a value that is required. Please be sure RO has a value for this field before moving the RO.", "Problem saving data");
placetomoveroto.RemoveChild(newro);
@@ -1958,7 +2135,7 @@ namespace ROEditor
// Try to delete the owner file. If another process has the file open, this delete will fail.
// If the file is closed, it will be deleted, and the user will be placed in the editor. The users
// name and the time when this session began will be placed in the owner file.
- fiown.Delete();
+ fiown.Delete();
}
catch(Exception ex)
{
@@ -1977,7 +2154,7 @@ namespace ROEditor
return;
}
}
- catch(Exception e)
+ catch (Exception e)
{
MessageBox.Show(e.Message,"fileinfo");
}
@@ -1988,27 +2165,16 @@ namespace ROEditor
TextWriter tw = new StreamWriter(fsown);
tw.WriteLine("Current User: {0}, Date and Time Started: {1}", Environment.UserName.ToUpper(), DateTime.Now.ToString("MM/dd/yyyy @ hh:mm"));
tw.Flush();
- }
+ }
catch (IOException ex)
{
fsown = fiown.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
TextReader tr = new StreamReader(fsown);
string who = tr.ReadToEnd();
tr.Close();
- if(who.Contains(Environment.UserName.ToUpper()))
+ if (who.Contains(Environment.UserName.ToUpper()))
{
BringWindowToFront();
-
- //Process[] p = Process.GetProcessesByName("ROEditor");
- //Process cp = Process.GetCurrentProcess();
- //for (int i = 0; i < p.Length; i++)
- //{
- // if (p[i].SessionId != cp.SessionId)
- // {
- // SetForegroundWindow(p[i].MainWindowHandle);
- // break;
- // }
- //}
}
else
MessageBox.Show(who, "Another user is executing the RoEditor");
@@ -2032,15 +2198,15 @@ namespace ROEditor
}
}
- if (StartupROEditor)
+ if (StartupROEditor)
{
Application.Run(new Form1(ConnectionPath,specificro));
-
+
if (fsown != null)
{
fsown.Close();
fiown.Delete();
- }
+ }
Application.Exit();
}
}
@@ -2070,7 +2236,7 @@ namespace ROEditor
{
InProcdureDir = true;
IniReader ini = new IniReader("PROC.INI");
- RtnStr = ini.ReadString("RO Defaults","ROPATH","");
+ RtnStr = ini.ReadString("RO Defaults", "ROPATH", "");
}
if (RtnStr.Equals("")) // no ROPATH specified
{
@@ -2091,9 +2257,9 @@ namespace ROEditor
// Instruct the user to create one.
DialogResult AnswerYN;
int idx = CurDir.LastIndexOf("\\");
- RtnStr = CurDir.Substring(0,idx+1) + "RO"; // default location
+ RtnStr = CurDir.Substring(0, idx + 1) + "RO"; // default location
string msgstr = "A RO directory (folder) does not exist.\n\n Create a RO directory in the default location (" + RtnStr + ")?";
- AnswerYN = MessageBox.Show(msgstr,"RO Editor",MessageBoxButtons.YesNo);
+ AnswerYN = MessageBox.Show(msgstr, "RO Editor", MessageBoxButtons.YesNo);
if (AnswerYN == DialogResult.Yes)
{
Directory.CreateDirectory(RtnStr);
@@ -2114,7 +2280,7 @@ namespace ROEditor
// using sql if there is a connection string or if defined in roapp.ini
if (SqlConnectionStr != null && SqlConnectionStr != "") return true;
bool Rtn = false;
-
+
string ROiniPath = ROdir + "\\ROAPP.INI";
IniReader ini = new IniReader(ROiniPath);
SqlConnectionStr = ini.ReadString("Database Server", "Path", "");
@@ -2136,10 +2302,9 @@ namespace ROEditor
testParadoxFile += "\\";
testAccessFile += "\\";
}
-
+
testParadoxFile += "ROMASTER.DB"; // Paradox file
testAccessFile += "ROMaster.mdb"; // Access file
-// if (File.Exists(testParadoxFile))
if (File.Exists(testParadoxFile) && !(File.Exists(testAccessFile) || UsingSQLServer(ROdir)))
{
// Display a message to the user that the data needs converted
@@ -2152,15 +2317,15 @@ namespace ROEditor
if (ROdir.Equals(""))
argstr = Directory.GetCurrentDirectory();
string ConversionExePath = Application.StartupPath + "\\ParadoxConversion.exe ";
-
+
// Need to move out of RO directory to convert it
Directory.SetCurrentDirectory("..\\");
-
+
// create a process & wait until it exits.
Process myProcess = new Process();
myProcess.StartInfo.FileName = ConversionExePath;
myProcess.StartInfo.Arguments=argstr;
-
+
myProcess.Start();
myProcess.WaitForExit();
@@ -2216,7 +2381,7 @@ namespace ROEditor
if (ndkid is VlnXmlElement)
{
kid = (VlnXmlElement) ndkid;
- if (kid.HasAttribute("RecID"))delkid = kid;
+ if (kid.HasAttribute("RecID")) delkid = kid;
}
ndkid = ndkid.NextSibling;
if (delkid != null) curelem.RemoveChild(delkid);
@@ -2236,7 +2401,7 @@ namespace ROEditor
roListView_ClearListDisplay();
bool didcleanup=false; // flags whether we needed to remove elements from trees
// to match xml data to tree.
- VlnXmlElement curelem = (VlnXmlElement) roTreeView.SelectedNode.Tag;
+ VlnXmlElement curelem = (VlnXmlElement)roTreeView.SelectedNode.Tag;
LoadKids(roTreeView.SelectedNode);
if (curelem.Name == "vlnGroup")
{
@@ -2245,7 +2410,7 @@ namespace ROEditor
// if the group text was modified, update the tree. If it was a subgroup,
// tree nodes are deleted and reread in.
- if (curelem.ParentNode != null && curelem.ParentNode.Name == "RO_Root")
+ if (curelem.ParentNode != null && curelem.ParentNode.Name == "RO_Root")
roTreeView.SelectedNode.Text = CvtFldToUserFld(curelem.FirstChild.Value);
// menu, field or accpageid changes may have had to load data which
// makes the xmltree not be in sync with the tree control. if so clear it.
@@ -2255,31 +2420,31 @@ namespace ROEditor
CleanUpTree(curelem, roTreeView.SelectedNode);
curelem.RemoveAttribute("TreeNotData");
}
- VlnXmlElement topele = (VlnXmlElement) rootXml.FirstChild;
+ VlnXmlElement topele = (VlnXmlElement)rootXml.FirstChild;
while (topele != null)
{
if (topele.HasAttribute("TreeNotData"))
{
topele.RemoveAttribute("TreeNotData");
int cnt = rootNode.GetNodeCount(false);
- for(int i=0;i Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
TreeNewparent.Nodes.Add(newt);
}
}
@@ -2722,12 +2873,14 @@ namespace ROEditor
}
else
roTreeView.Refresh();
-
- tbtnCancel.Enabled = true;
- tbtnDuplicate.Enabled = true;
- tbtnRestore.Enabled=false;
- tbtnSave.Enabled = false;
- tbtnSaveAs.Enabled = false;
+
+ menuROSave.Enabled = false;
+
+ rbtnCancel.Enabled = true;
+ rbtnDuplicate.Enabled = true;
+ rbtnRestore.Enabled = false;
+ rbtnSave.Enabled = false;
+ rbtnSaveAs.Enabled = false;
menuROSave.Enabled = false;
}
@@ -2742,10 +2895,10 @@ namespace ROEditor
success = ctlXMLEdit2.SaveData();
if (!success)
{
- tbtnRestore.Enabled = false; // old data may not be around
+ rbtnRestore.Enabled = false; // old data may not be around
return;
}
-
+
string mnutmp;
// set attributes for access id, retval (if RRO) and menu value for
// rro and group.
@@ -2757,7 +2910,7 @@ namespace ROEditor
// check for duplicates on accessory page id, if it changed.
acctmpl = newro.GetAccPageIDTemplate();
string newacc = newro.GetAccPageIDString(acctmpl);
-
+
//isduplicateaccpageid needs no recid attribute for any new
// ros (which is what we have hear for saveas or duplicate)
newro.RemoveAttribute("RecID");
@@ -2767,7 +2920,7 @@ namespace ROEditor
{
MessageBox.Show("The fields used for the \"Accessory Pages Access\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.", "Problem saving data");
ctlXMLEdit2.SetNotSaved();
- tbtnRestore.Enabled = false; // can't restore data, may have saved
+ rbtnRestore.Enabled = false; // can't restore data, may have saved
ctlXMLEdit2.RestoreInnerXml(savedInnerXML); //B2017-089 - restore the inner xml so orignial does not get new changes
return;
}
@@ -2779,14 +2932,14 @@ namespace ROEditor
dup = newro.IsDuplicateMenuTitle(mnutitle);
if (dup==true)
{
- MessageBox.Show( "The fields used for the \"Menu\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.","Problem saving data");
+ MessageBox.Show("The fields used for the \"Menu\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.","Problem saving data");
parent.RemoveChild(origro);
- tbtnRestore.Enabled = false;
+ rbtnRestore.Enabled = false;
ctlXMLEdit2.SetNotSaved();
ctlXMLEdit2.RestoreInnerXml(savedInnerXML); //B2017-089 - restore the inner xml so orignial does not get new changes
return;
}
- if (acctmpl!=null)newro.SetAttribute("AccPageID", newro.GetAccPageIDString(acctmpl));
+ if (acctmpl!=null)newro.SetAttribute("AccPageID", newro.GetAccPageIDString(acctmpl));
newro.SetAttribute("MenuTitle",mnutitle);
newro.RemoveAttribute("RecID"); // get a new one.
@@ -2802,27 +2955,30 @@ namespace ROEditor
LastSelectedNode = newt; //do this so that no prompt for data save on node select
newt.TreeView.SelectedNode = newt;
roTreeView.Refresh();
- tbtnRestore.Enabled = false;
- tbtnSave.Enabled = false;
- tbtnCancel.Enabled = true;
- tbtnSaveAs.Enabled = false;
- tbtnDuplicate.Enabled = true;
+
+ duplicate_active = false;
+
+ rbtnRestore.Enabled = false;
+ rbtnSave.Enabled = false;
+ rbtnCancel.Enabled = true;
+ rbtnSaveAs.Enabled = false;
+ rbtnDuplicate.Enabled = true;
duplicate_active = false;
}
else
newro.SetAttribute("RecID", savrec);
newone = null;
- }
+ }
private void tbar_DuplicateClick()
{
duplicate_active = true;
// disable duplicate until save or saveas.
- tbtnDuplicate.Enabled = false;
+ rbtnDuplicate.Enabled = false;
}
- protected void tbar_ZoomClick (object sender, System.EventArgs e)
+ protected void tbar_ZoomClick(object sender, System.EventArgs e)
{
ctlXMLEdit2.btnZoom_click(sender, e);
@@ -2863,8 +3019,8 @@ namespace ROEditor
break;
}
}
- if (ele.Name != "vlnGroup" && attop==false)
- EditRO(ele);
+ if (ele.Name != "vlnGroup" && attop==false)
+ EditRO(ele);
}
@@ -2885,7 +3041,7 @@ namespace ROEditor
// Put out fields and their associated data.
if (InUseList != null)
{
- for (int i=0; i< InUseList.Count; i++)
+ for (int i=0;i< InUseList.Count; i++)
{
rof = (ROField) InUseList[i];
if (rof.GetFieldname != null)
@@ -2893,7 +3049,7 @@ namespace ROEditor
uint ftype = rof.GetFieldType;
if (ftype == (uint)ROFields.FieldTypes.SingleTxt || ftype == (uint)ROFields.FieldTypes.VariableTxt ||
ftype == (uint)ROFields.FieldTypes.FrmtSingleTxt || ftype == (uint)ROFields.FieldTypes.Combination)
- roListView.Columns.Add(rof.GetFieldname, 100,HorizontalAlignment.Left);
+ roListView.Columns.Add(rof.GetFieldname, 100, HorizontalAlignment.Left);
}
}
}
@@ -2925,7 +3081,7 @@ namespace ROEditor
AllGroups = false;
ListViewItem item=null;
bool first = true;
- for (int i=0; i< InUseList.Count; i++)
+ for (int i = 0; i < InUseList.Count; i++)
{
rof = (ROField) InUseList[i];
if (rof.GetFieldname != null)
@@ -2937,22 +3093,22 @@ namespace ROEditor
string nm0 = rof.GetFieldname;
nm = rof.MakeFieldName(nm0);
nd = curele.SelectSingleNode(nm);
- if (nd==null)nd = curele.SelectSingleNode("*/"+nm);
- if (nd==null)
- nd = curele.GetCurrentOfMultiFields(curele,nm);
-// if (nd==null)nd = curele.SelectSingleNode(nm+"a");
-// if (nd==null)nd = curele.SelectSingleNode(nm+"b");
-// if (nd==null)nd = curele.SelectSingleNode(nm+"c");
-// if (nd==null)nd = curele.SelectSingleNode(nm+"d");
+ if (nd == null) nd = curele.SelectSingleNode("*/" + nm);
+ if (nd == null)
+ nd = curele.GetCurrentOfMultiFields(curele, nm); // RO Editor add symbols C2022 - 003
+
string data;
- if(nd==null)
- data=" ";
+ if (nd == null)
+ data = " ";
else
- data=nd.InnerText;
- if(first==true)
{
- item = new ListViewItem(data,ROIMAGE);
- first=false;
+ data = nd.InnerText;
+ data = Regex.Replace(data, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
+ }
+ if (first == true)
+ {
+ item = new ListViewItem(data, ROIMAGE);
+ first = false;
item.Tag = curele;
}
else
@@ -2964,17 +3120,17 @@ namespace ROEditor
}
}
}
- curnd = curnd.NextSibling;
+ curnd = curnd.NextSibling;
}
if (AllGroups == true)
{
roListView.Columns.Clear();
roListView.Columns.Add("Group",250,HorizontalAlignment.Left);
}
-
+
roListView.Visible=true;
}
-
+
private void updateRoListView(TreeNode node)
{
VlnXmlElement selele;
@@ -2984,9 +3140,9 @@ namespace ROEditor
// if we already have a list view, and we're still under the same parent,
// leave the list view, otherwise clear it.
VlnXmlElement curele = null;
- if (roListView != null && roListView.Items.Count > 0)
+ if (roListView != null && roListView.Items.Count > 0)
{
- curele = (VlnXmlElement) roListView.Items[0].Tag;
+ curele = (VlnXmlElement)roListView.Items[0].Tag;
if (selele.ParentNode != curele.ParentNode)roListView_ClearListDisplay();
}
return;
@@ -3011,7 +3167,7 @@ namespace ROEditor
this.roListView.ListViewItemSorter = LVCompare;
roListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.roListView_Column_Header_OnClick);
}
-
+
DisplayGroupElements(selele);
}
@@ -3025,49 +3181,254 @@ namespace ROEditor
roListView.Sort();
}
- private void roTreeView_AfterSelect_1(object sender, System.Windows.Forms.TreeViewEventArgs e)
+ public void getSymbols() // RO Editor add symbols C2022 - 003
{
-
+ Dictionary ROSymbols = buildsymbols();
+
+ foreach (KeyValuePair ROSymbol in ROSymbols)
+ {
+ Bitmap symCharBtmp = createTextBitmap((char)ROSymbol.Key);
+ DevComponents.DotNetBar.ButtonItem btn = new DevComponents.DotNetBar.ButtonItem();
+ btn.Image = symCharBtmp;
+
+ btn.Text = string.Format("{0}", ROSymbol.Key);
+
+ // to name button use unicode rather than desc, desc may have spaces or odd chars
+ btn.Name = "btn" + string.Format("{0}", ROSymbol.Key);
+
+ btn.Tooltip = string.Format("{0}", ROSymbol.Value);
+ btn.Tag = string.Format(@"{0}", ROSymbol.Key);
+ btn.FontBold = true;
+ btn.Click += new System.EventHandler(rbtnSymbols_Click);
+ galleryContainerSymbols.SubItems.Add(btn);
+ }
+
}
- }
-
- // This class is used to sort by the selected list view column
- public class MyListViewComparer : IComparer
- {
- int column;
-
- public int Compare (object x, object y)
+ private Dictionary buildsymbols() // RO Editor add symbols C2022 - 003
{
- ListViewItem xitm = (ListViewItem) x;
- ListViewItem yitm = (ListViewItem) y;
+ Dictionary symbols1 = new Dictionary()
+ {
+ {176,"degree" },
+ {8805,"greater than or equal" },
+ {8804,"less than or equal" },
+ {177,"plus minus" },
+ {189,"half" },
+ {9604,"accum" },
+ {9679,"bullet" },
+ {8776,"approx eq" },
+ {8773,"similar eq" },
+ {8800,"Not Equal To" },
+ {247,"division" },
+ {8730,"square root" },
+ {8733,"Proportional To" },
+ {8734,"Infinity" },
+ {8486,"Ohm Sign" },
+ {188,"quarter" },
+ {8539,"one eighth" },
+ {216,"dist zero" },
+ {274,"energy" },
+ {236,"grave" },
+ {9474,"bar" },
+ {8857,"dot in oval" },
+ {9830,"diamond" },
+ {8594,"right arrow" },
+ {8592,"left arrow" },
+ {8593,"up arrow" },
+ {8595,"down arrow" },
+ {8711,"nabla" },
+ {913,"ALPHA" },
+ {914,"BETA" },
+ {915,"GAMMA" },
+ {916,"DELTA" },
+ {917,"EPSILON" },
+ {918,"ZETA" },
+ {919,"ETA" },
+ {920,"THETA" },
+ {921,"IOTA" },
+ {922,"KAPPA" },
+ {923,"LAMDA" },
+ {924,"MU" },
+ {925,"NU" },
+ {926,"XI" },
+ {927,"OMICRON" },
+ {928,"PI" },
+ {929,"RHO" },
+ {931,"SIGMA" },
+ {932,"TAU" },
+ {933,"UPSILON" },
+ {934,"PHI" },
+ {935,"CHI" },
+ {936,"PSI" },
+ {937,"OMEGA" },
+ {945,"alpha" },
+ {946,"beta" },
+ {947,"gamma" },
+ {948,"delta" },
+ {949,"epsilon" },
+ {950,"zeta" },
+ {951,"eta" },
+ {952,"theta" },
+ {953,"iota" },
+ {954,"kappa" },
+ {955,"lamda" },
+ {956,"mu" },
+ {957,"nu" },
+ {958,"xi" },
+ {959,"omicron" },
+ {960,"pi" },
+ {961,"rho" },
+ {963,"sigma" },
+ {964,"tau" },
+ {965,"upsilon" },
+ {966,"phi" },
+ {967,"chi" },
+ {968,"psi" },
+ {969,"omega" },
+ {9650,"Solid Up Triangle" },
+ {9660,"Solid Down Triangle" },
+ {9654,"Solid Right Triangle" },
+ {9664,"Solid Left Triangle" },
+ {169,"Copyright Sign" },
+ {174,"Registered Sign" },
+ {8480,"Service Mark" },
+ {8482,"Trade Mark" },
+ {167,"Section Sign" },
+ {9745,"Box with Check" },
+ {9746,"Box with X" },
+ {9633,"Blank Checkbox" },
+ {9774,"Clock" },
+ {8643,"Check Mark" },
+ {9747,"Heavy X" },
+ {8629,"Corner Arrow Down Left" },
+ {9678,"Circle Zero" },
+ {9312,"Circle One" },
+ {9313,"Circle Two" },
+ {9314,"Circle Three" },
+ {9315,"Circle Four" },
+ {9316,"Circle Five" },
+ {9317,"Circle Six" },
+ {9318,"Circle Seven" },
+ {9319,"Circle Eight" },
+ {9320,"Circle Nine" },
+ {9321,"Circle Ten" },
+ {9655,"Triangle Right" },
+ {9665,"Triangle Left" },
+ {8856,"Universal No" },
+ };
+ return symbols1;
+ }
- string xbuff = xitm.SubItems[column].Text;
- string ybuff = yitm.SubItems[column].Text;
- int rtnval = 0;
- int xcnt=0,ycnt=0;
- int xlen,ylen;
- byte xbyte, ybyte;
- xlen = xbuff.Length;
- ylen = ybuff.Length;
- if (xbuff.Length > 0 && xbuff[0] == '<')
- rtnval = 0;
- if (ybuff.Length > 0 && ybuff[0] == '<')
- rtnval = 0;
- while ((rtnval==0) && ((xcnt < xlen) || (ycnt < ylen)))
+ private Bitmap createTextBitmap(char ch)
+ {
+ string txt = string.Format("{0}", ch);
+ Bitmap objBmpImage = new Bitmap(1, 1);
+
+ int intWidth = 0;
+ int intHeight = 0;
+
+ // Create the Font object for the image text drawing.
+ // later on, we could add logic to use either FreeMono or Arial Unicode MS based on the format being used
+ // but for now, we are going to use FreeMono to create the symbol list
+ Font objFont = new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
+
+ // Create a graphics object to measure the text's width and height.
+ Graphics objGraphics = Graphics.FromImage(objBmpImage);
+
+ // This is where the bitmap size is determined.
+ intWidth = (int)objGraphics.MeasureString(txt, objFont).Width;
+ intHeight = (int)objGraphics.MeasureString(txt, objFont).Height;
+
+ // Create the bmpImage again with the correct size for the text and font.
+ objBmpImage = new Bitmap(objBmpImage, new Size(intWidth, intHeight));
+
+ // Add the colors to the new bitmap.
+ objGraphics = Graphics.FromImage(objBmpImage);
+
+ // Set Background color
+ objGraphics.Clear(Color.Transparent); //.White);
+ objGraphics.SmoothingMode = SmoothingMode.AntiAlias;
+ objGraphics.TextContrast = 0;
+ objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
+ objGraphics.DrawString(txt, objFont, new SolidBrush(Color.Black), 0, 0);
+ objGraphics.Flush();
+ return (objBmpImage);
+ }
+
+ // This class is used to sort by the selected list view column
+ public class MyListViewComparer : IComparer
+ {
+ int column;
+
+ public int Compare(object x, object y)
{
- xbyte = (xcnt == xlen)? (byte)0 : (byte)xbuff[xcnt++];
- ybyte = (ycnt == ylen)? (byte)0 : (byte)ybuff[ycnt++];
- rtnval = xbyte - ybyte;
+ ListViewItem xitm = (ListViewItem)x;
+ ListViewItem yitm = (ListViewItem)y;
+
+ string xbuff = xitm.SubItems[column].Text;
+ string ybuff = yitm.SubItems[column].Text;
+ int rtnval = 0;
+ int xcnt = 0, ycnt = 0;
+ int xlen, ylen;
+ byte xbyte, ybyte;
+ xlen = xbuff.Length;
+ ylen = ybuff.Length;
+ if (xbuff.Length > 0 && xbuff[0] == '<')
+ rtnval = 0;
+ if (ybuff.Length > 0 && ybuff[0] == '<')
+ rtnval = 0;
+ while ((rtnval == 0) && ((xcnt < xlen) || (ycnt < ylen)))
+ {
+ xbyte = (xcnt == xlen) ? (byte)0 : (byte)xbuff[xcnt++];
+ ybyte = (ycnt == ylen) ? (byte)0 : (byte)ybuff[ycnt++];
+ rtnval = xbyte - ybyte;
+ }
+
+ return rtnval;
}
-
- return rtnval;
+
+ public void SetColumnToSortBy(int col)
+ {
+ column = col;
+ }
+
}
- public void SetColumnToSortBy(int col)
+ private void rbtnSave_Click(object sender, EventArgs e) // RO Editor add symbols C2022 - 003
{
- column = col;
+ tbar_SaveClick();
}
-
+
+ private void rbtnCancel_Click(object sender, EventArgs e)
+ {
+ rbtnSymbols.Enabled = false;
+ tbar_CancelClick();
+ }
+
+ private void rbtnSaveAs_Click(object sender, EventArgs e)
+ {
+ tbar_SaveAsClick();
+ }
+
+ private void rbtnDuplicate_Click(object sender, EventArgs e)
+ {
+ tbar_DuplicateClick();
+ }
+
+ private void rbtnRestore_Click(object sender, EventArgs e)
+ {
+ tbar_RestoreClick();
+ }
+
+ private void rbtnZoom_Click(object sender, EventArgs e)
+ {
+ ctlXMLEdit2.btnZoom_click(null, null);
+ }
+
+ private void rbtnSymbols_Click(object sender, EventArgs e) // RO Editor add symbols C2022 - 003
+ {
+ DevComponents.DotNetBar.ButtonItem b = (DevComponents.DotNetBar.ButtonItem)sender;
+ ctlXMLEdit2.TextBoxFocus.InsertSymbol(Convert.ToInt32(b.Tag));
+ }
+
}
-
}
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj
index 37501190..3c06601e 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj
@@ -109,6 +109,10 @@
false
+
+ False
+ ..\..\..\..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll
+
System
@@ -124,10 +128,6 @@
System.XML
-
- False
- ..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll
-
@@ -168,6 +168,7 @@
Code
+
Designer
AboutROEditor.cs
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.resx b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.resx
index 5c3b99ac..3c09032b 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.resx
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.resx
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
- CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CAAAAk1TRnQBSQFMAgEBAgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -175,7 +175,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
- CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CwAAAk1TRnQBSQFMAgEBBgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RO_FST.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RO_FST.cs
index 0a2451f9..44283442 100644
--- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RO_FST.cs
+++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/RO_FST.cs
@@ -101,7 +101,6 @@ using System.Runtime.InteropServices;
using VlnStatus;
using System.Collections.Specialized;
using ROFST_FILE;
-using Volian.Base.Library;
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
@@ -885,3 +884,4 @@ namespace ROEditor
}
}
+
diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs
index e90ede1e..f6ba23fe 100644
--- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs
+++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs
@@ -263,6 +263,7 @@ using System.Collections.Specialized;
using Org.Mentalis.Files;
using System.Data.SqlClient;
using System.Collections.Generic;
+using System.Text.RegularExpressions;
namespace RODBInterface
@@ -1909,6 +1910,8 @@ namespace RODBInterface
string Info = DBE.GetString(3);
//B2022-043 &pos; was missing the ;
Info = Info.Replace("'", "\'"); // B2021-071: crash when getting/saving field names
+ Info = Regex.Replace(Info, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
+
node.SetAttribute("HasChild", "True");
// Store data in the VlnXmlElement as a subgroup
@@ -2182,10 +2185,13 @@ namespace RODBInterface
parent.SetAttribute("ChildLoaded", "True");
}
string xmlstr = GenerateXmlString(ro, false);
+
string wraccid = null;
if (ro.HasAttribute("AccPageID"))
{
string accid = ro.GetAttribute("AccPageID");
+
+
int quote = accid.IndexOf("'");
if (quote >= 0)
wraccid = accid.Insert(quote, "'");
@@ -2251,7 +2257,7 @@ namespace RODBInterface
// select all of the field definition records in this table.
// strGetFields = "SELECT RecID, Info from " + elem.GetAttribute("Table");
strGetFields = "SELECT RecID, Info from " + TableName;
- strGetFields = strGetFields + " where RecType = 2"; // + rtype.ToString();
+ strGetFields = strGetFields + " where RecType = 2";
DBE.Command(strGetFields);
DBE.Reader();
diff --git a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ZoomDialog.cs b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ZoomDialog.cs
index c2f238c7..85d8bccb 100644
--- a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ZoomDialog.cs
+++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ZoomDialog.cs
@@ -39,7 +39,7 @@ namespace ctlXMLEditLib
{
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnCancel;
- private System.Windows.Forms.TextBox tbZoom;
+ private ctlXMLEditLib.roRichTextBox tbZoom; // RO Editor add symbols C2022 - 003
///
/// Required designer variable.
///
@@ -88,7 +88,7 @@ namespace ctlXMLEditLib
///
private void InitializeComponent()
{
- this.tbZoom = new System.Windows.Forms.TextBox();
+ this.tbZoom = new ctlXMLEditLib.roRichTextBox(); // RO Editor add symbols C2022 - 003
this.btnSave = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
@@ -99,7 +99,7 @@ namespace ctlXMLEditLib
this.tbZoom.Location = new System.Drawing.Point(24, 16);
this.tbZoom.Multiline = true;
this.tbZoom.Name = "tbZoom";
- this.tbZoom.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.tbZoom.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; // RO Editor add symbols C2022 - 003
this.tbZoom.Size = new System.Drawing.Size(576, 392);
this.tbZoom.TabIndex = 0;
//
@@ -149,3 +149,4 @@ namespace ctlXMLEditLib
}
}
+
diff --git a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs
index e181526c..95beb6ce 100644
--- a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs
+++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs
@@ -200,7 +200,11 @@ using System.Xml.Schema;
using System.Text;
using RODBInterface;
using Org.Mentalis.Files;
-//using IniFileIO;
+using System.Windows;
+using System.Text.RegularExpressions;
+using System.Linq;
+using Volian.Base.Library;
+
@@ -221,6 +225,7 @@ namespace ctlXMLEditLib
///
///
///
+
public class ctlXMLEdit : System.Windows.Forms.UserControl
{
///
@@ -237,12 +242,12 @@ namespace ctlXMLEditLib
private bool dosaveflag;
private VlnXmlElement editelem;
private XmlDocument editdoc;
- private TextBox zoomtextbox;
+ private roRichTextBox zoomtextbox;
// the following is used for handling images. Note that if we want to have more
// than one image defined in an ro, this should be become a list.
- private TextBox GraphicsFiletextbox;
- private TextBox GraphicsWdtextbox;
- private TextBox GraphicsHttextbox;
+ private roRichTextBox GraphicsFiletextbox;
+ private roRichTextBox GraphicsWdtextbox;
+ private roRichTextBox GraphicsHttextbox;
private System.Windows.Forms.Button btnFindFile;
private string GraphicsText;
private ToolTip zmtooltip;
@@ -265,6 +270,19 @@ namespace ctlXMLEditLib
private GroupBox pcGrpBox = null;
/** end C2021-026 **/
+ public string _RO_IDEN;
+ public string RO_IDEN
+ {
+ get
+ {
+ return _RO_IDEN;
+ }
+ set
+ {
+ _RO_IDEN = value;
+ }
+ }
+
// use this struct to define attributes for the text box fields, storing
// the pattern, radio button association, required field flag, etc.
struct TextBoxAttrTag
@@ -311,10 +329,19 @@ namespace ctlXMLEditLib
public string GetParentHTId { get { return parenthtid; } }
public void SetParentHTId(string id) { this.parenthtid = id; }
}
-
+ private roRichTextBox _TextBoxFocus; // RO Editor add symbols C2022 - 003
+ public roRichTextBox TextBoxFocus
+ {
+ get { return _TextBoxFocus; }
+ set
+ {
+ _TextBoxFocus = value;
+ }
+ }
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
{
// This call is required by the Windows.Forms Form Designer.
+
InitializeComponent();
FieldsWithApplic = fldsWithApplic;
PCChildren = pckids; //C2021-026 list of Parent/Child children
@@ -359,11 +386,12 @@ namespace ctlXMLEditLib
// Set required fields based on list. (can add message later).
SetRequiredFields(reqfields);
dosaveflag=true;
+ RO_IDEN = myelem.GetAccPageIDTemplate();
}
// set the required fields tag on those fields which are included in the passed
// in required fields list.
- private void DoSet(TextBox hwnd, string msg)
+ private void DoSet(roRichTextBox hwnd, string msg) // RO Editor add symbols C2022 - 003
{
if (hwnd == null) return;
if (hwnd.Tag != null)
@@ -378,7 +406,7 @@ namespace ctlXMLEditLib
private void SetRequiredFields(ArrayList reqfields)
{
Object o;
- TextBox hwnd;
+ roRichTextBox hwnd;
string field, msg;
int indx;
foreach (string strfld in reqfields)
@@ -397,15 +425,15 @@ namespace ctlXMLEditLib
o = myHT[field+"a"];
if (o != null) // set all combo types required, the checker
{
- DoSet((TextBox)o,msg);
- DoSet((TextBox)myHT[field+"b"],msg);
- DoSet((TextBox)myHT[field+"c"],msg);
- DoSet((TextBox)myHT[field+"d"],msg);
+ DoSet((roRichTextBox)o,msg);
+ DoSet((roRichTextBox)myHT[field+"b"],msg);
+ DoSet((roRichTextBox)myHT[field+"c"],msg);
+ DoSet((roRichTextBox)myHT[field+"d"],msg);
}
}
else if (o != null)
{
- hwnd = (TextBox) o;
+ hwnd = (roRichTextBox) o;
if (hwnd.Tag != null)
{
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
@@ -419,7 +447,7 @@ namespace ctlXMLEditLib
// C2021-026 If this is a Parent/Child field that has no value saved in the database
// then use the parent's value and display it as grey colored text.
- private void GetDefaultParentValue(TextBox tb, XmlNode node, string chldName)
+ private void GetDefaultParentValue(roRichTextBox tb, XmlNode node, string chldName)
{
XmlNode parentNode = null;
// PCChildren contains a list strings reprenting the Children setup in the current Working Draft Parent/Child property
@@ -463,21 +491,23 @@ namespace ctlXMLEditLib
private void DisplayFieldContents(XmlNode node)
{
Object o;
- TextBox hwnd;
+ roRichTextBox hwnd;
XmlNode nd;
// if we have an image, check it for validity, i.e. file exists, etc.??
foreach (string str in myHT.Keys)
{
o = myHT[str];
- hwnd = (TextBox) o;
+ hwnd = (roRichTextBox) o;
nd = node.SelectSingleNode(str);
// if not found with just the string, search the tree.
if (nd==null)nd = node.SelectSingleNode("*/"+str);
if (nd == null || nd.InnerText.Length==0) // B2024-004 use Parent value if Child text length is zero
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
else
- {
- hwnd.Text = nd.InnerText; // set the field's text from XML
+ {
+
+ hwnd.Text = Regex.Replace(nd.InnerText, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // set the field's text from XML
+ Size size = hwnd.Size;
// check if this window has a button name as part of its tag. If
// so it's a combo type & the radio button/visibility may need to
@@ -546,7 +576,7 @@ namespace ctlXMLEditLib
// height/width data of the image.
if (GraphicsFiletextbox != null && GraphicsFiletextbox.Text != "") UpdateHtWd();
}
- public TextBox GetGraphicsFiletextbox()
+ public roRichTextBox GetGraphicsFiletextbox()
{
return GraphicsFiletextbox;
}
@@ -585,13 +615,13 @@ namespace ctlXMLEditLib
{
dosaveflag=false;
mysavexml=false;
- TextBox hwnd;
+ roRichTextBox hwnd;
// first, clear out all of the text boxes.
foreach (string str in myHT.Keys)
{
object o = myHT[str];
- hwnd = (TextBox) o;
+ hwnd = (roRichTextBox) o;
hwnd.Text = "";
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
RadioButton radio;
@@ -623,7 +653,7 @@ namespace ctlXMLEditLib
// to the parent's value, then clear the child's textbox so that nothing is saved
// to the database. This allow us to know that a specific value was not set
// for this Parent/Child child
- private void RemovePCChildTextIfSameAsParent(XmlNode node, TextBox tb, string chldName)
+ private void RemovePCChildTextIfSameAsParent(XmlNode node, roRichTextBox tb, string chldName)
{
XmlNode parentNode = null;
// if this is a child node get the parent's value
@@ -660,18 +690,35 @@ namespace ctlXMLEditLib
// true if success, false if fail.
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
public bool SaveData()
+
{
if (mysavexml)
{
- TextBox hwnd;
+ roRichTextBox hwnd;
TextBoxAttrTag tag;
string imgdate;
//go thru the hash table to get textboxes. Find the ones that have text.
- foreach (string str in myHT.Keys)
+ foreach (string str in myHT.Keys) // RO Editor add symbols C2022 - 003
{
object o = myHT[str];
- hwnd = (TextBox) o;
+ hwnd = (roRichTextBox) o;
+
+ StringBuilder result1 = new StringBuilder();
+ char[] chrAry = hwnd.Text.ToCharArray();
+ foreach (int chr in chrAry)
+ {
+ if (chr > 166)
+ {
+ result1.Append($"\\u{(int)chr}?");
+ }
+ else
+ {
+ result1.Append((char)chr);
+ }
+ }
+ hwnd.Text = result1.ToString();
+
imgdate = null;
// if this is a required field and there is no text, put out an error
// message and get out of here.
@@ -788,6 +835,7 @@ namespace ctlXMLEditLib
return (false);
}
+
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
@@ -858,7 +906,7 @@ namespace ctlXMLEditLib
// 'normalizedString') or a multiline text box(type is 'string'). Also, a radio
// button is passed in if this was called to handle an element within a combo type.
// This button is saved for a given text box so that initialization of these combo types can occur.
- private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, TextBox mytextbox, RadioButton radio,
+ private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, roRichTextBox mytextbox, RadioButton radio,
bool img, string imgname)
{
// set up for text box tag, which stores whether field is required and
@@ -888,12 +936,17 @@ namespace ctlXMLEditLib
if (getannot.IndexOf("Lines")>=0)
{
GraphicsHttextbox = mytextbox;
+
+ Size size = GraphicsHttextbox.Size;
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
+
}
if (getannot.IndexOf("Character")>=0)
{
GraphicsWdtextbox = mytextbox;
+
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
+
}
}
}
@@ -904,14 +957,17 @@ namespace ctlXMLEditLib
{
// A Schema Type Restriction is used to define single or multi-line boxes.
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
- if (myRestrictions.BaseTypeName.Name == "normalizedString")
+ if (myRestrictions.BaseTypeName.Name == "normalizedString")
+ {
mytextbox.Multiline = false;
+ mytextbox.Size = new Size(300, 40);
+ }
else
{
mytextbox.Multiline = true;
- mytextbox.AcceptsReturn = true;
+ mytextbox.AcceptsTab = true;
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
- mytextbox.ScrollBars = ScrollBars.Vertical;
+ mytextbox.ScrollBars = RichTextBoxScrollBars.Vertical;
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
}
@@ -992,7 +1048,8 @@ namespace ctlXMLEditLib
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
gbox.Controls.Add(radio);
- TextBox tb = new TextBox();
+ roRichTextBox tb = new roRichTextBox();
+ Size size3 = tb.Size;
tb.Location = new Point(boxx+20, y+25);
if (!first) tb.Visible = false;
myHT.Add(element.Name,tb);
@@ -1001,7 +1058,7 @@ namespace ctlXMLEditLib
// the groupbox.
Controls.Add(tb);
tb.TextChanged += new System.EventHandler(this.textbox_change);
- tb.GotFocus += new System.EventHandler(this.textbox_zoombtn);
+ tb.GotFocus += new System.EventHandler(this.currentTextBox);
tb.KeyDown += new KeyEventHandler(MyOnKeyDown);
gbox.Contains(tb);
// the following will set attributes on the text boxes such as maxlength, multiline, etc.
@@ -1144,8 +1201,9 @@ namespace ctlXMLEditLib
}
else
{
- TextBox mytextbox;
- mytextbox = new TextBox();
+ roRichTextBox mytextbox;
+ mytextbox = new roRichTextBox();
+ Size size3 = mytextbox.Size;
mytextbox.Location = new Point(screenx+indent, screeny);
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
mytextbox.Name = tFieldName;
@@ -1155,7 +1213,7 @@ namespace ctlXMLEditLib
screeny = screeny + 10;
mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating);
- mytextbox.GotFocus += new System.EventHandler(this.textbox_zoombtn);
+ mytextbox.GotFocus += new System.EventHandler(this.currentTextBox);
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
if (pcChildIdx > 0)
{
@@ -1192,9 +1250,18 @@ namespace ctlXMLEditLib
// the following is needed to load the control.
private void ctlXMLEdit_Load(object sender, System.EventArgs e)
{
-
+
}
-
+
+
+ public delegate void ctlXMLEditEvent(object sender, ctlXMLEditEventArgs args); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID field.
+ public event ctlXMLEditEvent EnableDisableSymbolsBtn;
+ private void OnEnableDisableSymbolsBtn(ctlXMLEditEventArgs args)
+ {
+ if (EnableDisableSymbolsBtn != null)
+ EnableDisableSymbolsBtn(this, args);
+ }
+
// when data in a text box has changed, flag it (except for when this
// happens during loading of original data). This flag will be used
// later to know whether to save data.
@@ -1210,7 +1277,7 @@ namespace ctlXMLEditLib
// When leaving the textbox
private void txtBox_Leave(object sender, EventArgs e)
{
- TextBox tb = sender as TextBox;
+ roRichTextBox tb = sender as roRichTextBox;
string dfTxt = "";
try
{
@@ -1219,7 +1286,7 @@ namespace ctlXMLEditLib
{
object o = myHT[parentid];
if (o != null)
- dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
+ dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
}
else
{
@@ -1227,7 +1294,7 @@ namespace ctlXMLEditLib
string parName = pcGrpBox.Name.Substring(5);
object o = myHT[parName];
if (o != null)
- dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
+ dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
}
}
catch
@@ -1235,7 +1302,7 @@ namespace ctlXMLEditLib
string parName = pcGrpBox.Name.Substring(5);
object o = myHT[parName];
if (o != null)
- dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
+ dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
}
if (dosaveflag) mysavexml = true;
@@ -1251,7 +1318,7 @@ namespace ctlXMLEditLib
// so clear the textbox so that user can enter the value for that child
private void txtBox_Enter(object sender, EventArgs e)
{
- TextBox tb = sender as TextBox;
+ roRichTextBox tb = sender as roRichTextBox;
if (tb.ForeColor == SystemColors.GrayText) // currently no value set - using parent's value
{
tb.Text = "";
@@ -1264,7 +1331,7 @@ namespace ctlXMLEditLib
private void radiocheckchg(object sender, System.EventArgs e)
{
RadioButton btnsel = (RadioButton) sender;
- TextBox assocbox;
+ roRichTextBox assocbox;
string btntext, str;
if(dosaveflag)mysavexml = true;
@@ -1277,7 +1344,7 @@ namespace ctlXMLEditLib
str = btnsel.Name.Replace(btntext,"");
object o = myHT[str];
if (o == null) return;
- assocbox = (TextBox) o;
+ assocbox = (roRichTextBox) o;
// make the text box visible if checked, otherwise, invisible
assocbox.Visible = btnsel.Checked;
// C2021-026 show or hide the Parent/Child appicability group box
@@ -1299,7 +1366,7 @@ namespace ctlXMLEditLib
c.Visible = vsblState; // show or hide the lable inside the group box
object oo = myHT[c.Name];
if (oo != null)
- (oo as TextBox).Visible = vsblState; // show or hide the associated text box
+ (oo as roRichTextBox).Visible = vsblState; // show or hide the associated text box
}
}
}
@@ -1391,7 +1458,7 @@ namespace ctlXMLEditLib
// The following can be used to validate the text, i.e. check the text against
// the pattern. this needs written yet (5/16/02)
- private void MyValidatingCode(TextBox tb)
+ private void MyValidatingCode(roRichTextBox tb)
{
//get the text box's tag which contains a flag for whether this is required &
//if it has a pattern. If it has a pattern, validate the field against the pattern.
@@ -1420,20 +1487,33 @@ namespace ctlXMLEditLib
}
// save which box we're on, for zoom processing.
- private void textbox_zoombtn(object sender, System.EventArgs e)
+ private void currentTextBox(object sender, System.EventArgs e)
{
- TextBox textbox = (TextBox) sender;
+ roRichTextBox textbox = (roRichTextBox) sender;
if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
zoomtextbox = textbox;
else
zoomtextbox = null;
+
+ TextBoxFocus = textbox;
+
+ string RO_IDENDITY = RO_IDEN.Substring(1, RO_IDEN.Length - 2); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
+ if (textbox.Name == RO_IDENDITY)
+ {
+ OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:false));
+ }
+ else
+ {
+ OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:true));
+ }
+
}
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
{
try
{
- MyValidatingCode((TextBox) sender);
+ MyValidatingCode((roRichTextBox) sender);
}
catch(Exception ex)
@@ -1459,11 +1539,18 @@ namespace ctlXMLEditLib
}
btnZoom_click(null, null);
}
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ if (((kea.Modifiers & Keys.ControlKey) == Keys.ControlKey) && kea.KeyCode == Keys.V)
+ {
+ roRichTextBox o = (roRichTextBox)objSender;
+ o.rchtxtBox_KeyDown(objSender, RO_IDEN);
+ }
+ }
}
-
+
public void btnZoom_click(object sender, System.EventArgs e)
{
- //TextBox tb = (TextBox) sender;
TextBoxAttrTag tag;
bool doimage = false;
if (zoomtextbox.Tag != null)
@@ -1507,7 +1594,7 @@ namespace ctlXMLEditLib
// file local & keep width/height of file proportional.
private void GraphicText_lostfocus(object sender, System.EventArgs e)
{
- TextBox fnamebox = (TextBox) sender;
+ roRichTextBox fnamebox = (roRichTextBox) sender;
if (fnamebox.Text != "" && fnamebox.Modified == true)
{
FileInfo ifi = new FileInfo(fnamebox.Text);
@@ -1716,7 +1803,7 @@ namespace ctlXMLEditLib
// if changed height, calculate associated width
private void GraphicsHt_lostfocus(object sender, System.EventArgs e)
{
- TextBox ht = (TextBox) sender;
+ roRichTextBox ht = (roRichTextBox) sender;
if (ht.Modified == true)
{
try
@@ -1733,7 +1820,7 @@ namespace ctlXMLEditLib
// if changed width, calculate associated height
private void GraphicsWd_lostfocus(object sender, System.EventArgs e)
{
- TextBox wd = (TextBox) sender;
+ roRichTextBox wd = (roRichTextBox) sender;
if (wd.Modified == true)
{
try
@@ -1888,7 +1975,7 @@ namespace ctlXMLEditLib
* and overload a couple of it's functions in order to use it.
* - called in CalculatePromsDate() above.
*/
- public class ThisTimeZone : TimeZone
+ public class ThisTimeZone : TimeZone
{
private TimeZone curTZ;
public TimeSpan SpanTZ;
@@ -1929,5 +2016,31 @@ namespace ctlXMLEditLib
return curTZ.GetDaylightChanges(year);
}
}
+
+ public class ctlXMLEditEventArgs : EventArgs // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
+ {
+ public ctlXMLEditEventArgs() {; }
+ public ctlXMLEditEventArgs(bool DisplaySymBolBtn)
+ {
+ _DisplaySymBolBtn = DisplaySymBolBtn;
+ }
+ private bool _DisplaySymBolBtn;
+
+ public bool DisplaySymBolBtn
+ {
+ get { return _DisplaySymBolBtn; }
+ set { _DisplaySymBolBtn = value; }
+ }
+ }
+
+ public enum E_FontStyle : byte
+ {
+ FS_NONE = 0,
+ FS_BOLD = 0x01,
+ FS_UNDERLINE = 0x02,
+ FS_ITALIC = 0x04,
+ FS_SUPERSCRIPT = 0x08,
+ FS_SUBSCRIPT = 0x10
+ }
}
diff --git a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj
index 2c914674..da28a7ea 100644
--- a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj
+++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj
@@ -126,6 +126,9 @@
System.XML
+
+ ..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll
+
@@ -137,6 +140,12 @@
Form
+
+ Component
+
+
+ roRichTextBox.cs
+
Form
diff --git a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.Designer.cs b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.Designer.cs
new file mode 100644
index 00000000..6626c0a2
--- /dev/null
+++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.Designer.cs
@@ -0,0 +1,40 @@
+
+namespace ctlXMLEditLib
+{
+ partial class roRichTextBox
+ {
+ ///
+ /// 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.
+ ///
+ System.Windows.Forms.AutoScaleMode AutoScaleMode;
+ private void InitializeComponent()
+ {
+
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ }
+
+ #endregion
+ }
+}
diff --git a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.cs b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.cs
new file mode 100644
index 00000000..77f6da37
--- /dev/null
+++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Volian.Base.Library;
+
+namespace ctlXMLEditLib
+{
+ public partial class roRichTextBox : RichTextBox // C2022-003 Symbols in RO Editor. Customized RichTextBox for RO Editor.
+ {
+ public roRichTextBox()
+ {
+ InitializeComponent();
+ }
+ private string _RtfPrefix; // contains Font table and styles (bold/underline/italics) for rtb from step style
+ public string RtfPrefixForSymbols
+ {
+ get
+ {
+ //B2020-100 RHM Use SelectionFont rather than the font from the format file.
+ StringBuilder selectedRtfSB = new StringBuilder();
+ AddFontTable(selectedRtfSB, FormatFont, true);
+ _RtfPrefix = selectedRtfSB.ToString();
+ return _RtfPrefix + @"\f1\fs" + 10 * 2 + " ";
+ }
+ }
+ public void InsertSymbol( int symbcode)
+ {
+ int position = this.SelectionStart;
+ string sym = string.Format(symbcode < 256 ? "\'{0:X2}" : @"\u{0}", symbcode);
+ this.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
+ Select(position, -1);
+ Select(position + 1, 0);
+ }
+ public void rchtxtBox_KeyDown(object sender,string RO_IDEN) // C2022-003 code used to prevent a symbol from being inserted into RO ID.
+ {
+ bool symFlg = false;
+
+ roRichTextBox o = (roRichTextBox)sender;
+ if (o.Name == RO_IDEN)
+ {
+ if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
+ {
+ string clpBrd = Clipboard.GetText();
+ if (clpBrd.Any(c => c > 166))
+ {
+ MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
+ Clipboard.Clear();
+ }
+ }
+ }
+ }
+ private static void AddFontTable(StringBuilder selectedRtfSB, Font myFont, bool isFixed)
+ {
+ StringBuilder sbbeg = new StringBuilder();
+ StringBuilder sbend = new StringBuilder();
+ if (myFont.Bold)
+ {
+ sbbeg.Append(@"\b");
+ sbend.Append(@"\b0");
+ }
+ if (myFont.Underline)
+ {
+ sbbeg.Append(@"\ul");
+ sbend.Insert(0, @"\ulnone");
+ }
+ if (myFont.Italic)
+ {
+ sbbeg.Append(@"\i");
+ sbend.Insert(0, @"\i0");
+ }
+ // RO Editor add symbols C2022-003
+ selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}");
+ selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for symbols display.
+ selectedRtfSB.Append("\r\n");
+ selectedRtfSB.Append(@"\viewkind4\uc1\pard" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(myFont.SizeInPoints * 2).ToString() + @" ");
+ }
+ private Font _FormatFont;
+ public Font FormatFont
+ {
+ get
+ {
+ if (_FormatFont == null)
+ {
+ Font formatFont;
+ formatFont = Font;
+ _FormatFont = formatFont;
+ }
+ return _FormatFont;
+ }
+ set { _FormatFont = value; }
+ }
+ }
+}
+
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs
index 6cf15ddd..c9a39132 100644
--- a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs
+++ b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs
@@ -1,14 +1,14 @@
+using Csla.Data;
using System;
using System.Collections.Generic;
-using System.Text;
using System.ComponentModel;
-using System.Text.RegularExpressions;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
using System.Threading;
-
-using Csla.Data;
+using static System.Net.Mime.MediaTypeNames;
namespace VEPROMS.CSLA.Library
@@ -494,6 +494,8 @@ namespace VEPROMS.CSLA.Library
{
roid = FormatRoidKey(roid, true);
+
+
string retval = GetRoChild(roid).value;
if (string.IsNullOrEmpty(retval))
@@ -2162,7 +2164,7 @@ namespace VEPROMS.CSLA.Library
return s2;
s2 = s2.Replace(@"\u160?", ""); // convert hard spaces bug fix: B2016-206
- s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
+ s2 = Regex.Replace(s2, @"\\(?!u)", @"\u9586?"); // convert backslashes to a backslash symbol
s2 = s2.Replace("", @"\u160?"); // convert hard spaces bug fix: B2016-206
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
diff --git a/PROMS/Volian.Controls.Library/DisplayRO.Designer.cs b/PROMS/Volian.Controls.Library/DisplayRO.Designer.cs
index 2e0f231d..77f45d7f 100644
--- a/PROMS/Volian.Controls.Library/DisplayRO.Designer.cs
+++ b/PROMS/Volian.Controls.Library/DisplayRO.Designer.cs
@@ -81,7 +81,7 @@ namespace Volian.Controls.Library
this.lbROId.Dock = System.Windows.Forms.DockStyle.Left;
this.lbROId.ForeColor = System.Drawing.SystemColors.Highlight;
this.lbROId.Location = new System.Drawing.Point(48, 24);
- this.lbROId.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.lbROId.Margin = new System.Windows.Forms.Padding(2);
this.lbROId.Name = "lbROId";
this.lbROId.Size = new System.Drawing.Size(183, 33);
this.superTooltip1.SetSuperTooltip(this.lbROId, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here. Double-Click to open" +
@@ -97,7 +97,7 @@ namespace Volian.Controls.Library
this.lblROID.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lblROID.Dock = System.Windows.Forms.DockStyle.Left;
this.lblROID.Location = new System.Drawing.Point(0, 24);
- this.lblROID.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.lblROID.Margin = new System.Windows.Forms.Padding(2);
this.lblROID.Name = "lblROID";
this.lblROID.Size = new System.Drawing.Size(48, 33);
this.superTooltip1.SetSuperTooltip(this.lblROID, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
@@ -139,7 +139,7 @@ namespace Volian.Controls.Library
this.btnGoToRO.Dock = System.Windows.Forms.DockStyle.Top;
this.btnGoToRO.Enabled = false;
this.btnGoToRO.Location = new System.Drawing.Point(0, 55);
- this.btnGoToRO.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.btnGoToRO.Margin = new System.Windows.Forms.Padding(2);
this.btnGoToRO.Name = "btnGoToRO";
this.btnGoToRO.Size = new System.Drawing.Size(233, 18);
this.btnGoToRO.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -155,7 +155,7 @@ namespace Volian.Controls.Library
this.btnPreviewRO.Dock = System.Windows.Forms.DockStyle.Top;
this.btnPreviewRO.Enabled = false;
this.btnPreviewRO.Location = new System.Drawing.Point(0, 37);
- this.btnPreviewRO.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.btnPreviewRO.Margin = new System.Windows.Forms.Padding(2);
this.btnPreviewRO.Name = "btnPreviewRO";
this.btnPreviewRO.Size = new System.Drawing.Size(233, 18);
this.superTooltip1.SetSuperTooltip(this.btnPreviewRO, new DevComponents.DotNetBar.SuperTooltipInfo("Preview", "", "This will Preview the selected RO Table, X/Y Plot, or Image.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
@@ -263,6 +263,7 @@ namespace Volian.Controls.Library
this.Controls.Add(this.tvROFST);
this.Controls.Add(this.lbFound);
this.Controls.Add(this.panelValue);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "DisplayRO";
this.Size = new System.Drawing.Size(233, 507);
this.panelValue.ResumeLayout(false);
diff --git a/PROMS/Volian.Controls.Library/DisplayRO.cs b/PROMS/Volian.Controls.Library/DisplayRO.cs
index 038a258e..920b829b 100644
--- a/PROMS/Volian.Controls.Library/DisplayRO.cs
+++ b/PROMS/Volian.Controls.Library/DisplayRO.cs
@@ -1,18 +1,18 @@
+using DevComponents.DotNetBar;
+using JR.Utils.GUI.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Drawing;
using System.Data;
-using System.Text;
+using System.Drawing;
using System.IO;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
-using XYPlots;
-using DevComponents.DotNetBar;
-using System.Text.RegularExpressions;
using Volian.Base.Library;
-using JR.Utils.GUI.Forms;
-using System.Linq;
+using XYPlots;
namespace Volian.Controls.Library
{
@@ -372,8 +372,7 @@ namespace Volian.Controls.Library
{
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
// B2022-098: [JPR] ROs not being resolved in Word Sections
- if (e.Node.Tag is ROFSTLookup.rochild)
- {
+ if (e.Node.Tag is ROFSTLookup.rochild){
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
selectedChld = chld;
@@ -770,9 +769,15 @@ namespace Volian.Controls.Library
}
else
{
+
tmp = new TreeNode(roc.title);
tmp.Tag = roc;
+ if (tmp.Text.IndexOf("\\u") > -1) // RO Editor add symbols C2022 - 003
+ {
+ tmp.Text = Regex.Replace(tmp.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
+ }
+
if (roc.roid.Length == 16)
{
tn.Nodes.Add(tmp);
@@ -921,11 +926,12 @@ namespace Volian.Controls.Library
// Pad to 16 to store in the RoUsage table.
string padroid = ROFSTLookup.FormatRoidKey(roc.roid, true);
string linktxt = string.Format(@"#Link:ReferencedObject: {0} {1}", padroid, MyROFST.RODbID);
-
- // Resolve symbols and scientific notation in the RO return value
- string valtxt = MyROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, MyRTB.MyItemInfo);
- MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, MyROFST.RODbID));
+ // Resolve symbols and scientific notation in the RO return value
+ string valtxt = MyROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, MyRTB.MyItemInfo);
+
+ MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, MyROFST.RODbID));
+
}
}
diff --git a/PROMS/Volian.Controls.Library/DisplayRO.resx b/PROMS/Volian.Controls.Library/DisplayRO.resx
index f24ecbca..c838cbe9 100644
--- a/PROMS/Volian.Controls.Library/DisplayRO.resx
+++ b/PROMS/Volian.Controls.Library/DisplayRO.resx
@@ -112,20 +112,12 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
17, 17
-
- For Step Editor sections:
-- This will place the selected RO at the cursor position.
-- This will replace an RO with the selected RO.
-
-For Word sections
-- This will place the needed RO ID on the clipboard.
-
\ No newline at end of file
diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs
index cc20f092..0556dbba 100644
--- a/PROMS/Volian.Controls.Library/StepRTB.cs
+++ b/PROMS/Volian.Controls.Library/StepRTB.cs
@@ -1400,9 +1400,13 @@ namespace Volian.Controls.Library
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
int position = SelectionStart;
SelectionLength = 0;
- linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
- linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
- linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
+
+ var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
+ foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
+ {
+ linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0");
+ }
+
linkValue = linkValue.Replace(@"{", @"\{");
linkValue = linkValue.Replace(@"}", @"\}");
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" \v0 }";