C2022-003-Change-Textboxes-to-RTF-3 #676
@@ -96,10 +96,10 @@ namespace ROEditor
|
|||||||
private System.Windows.Forms.Label lblW2;
|
private System.Windows.Forms.Label lblW2;
|
||||||
private System.Windows.Forms.Label lblW3;
|
private System.Windows.Forms.Label lblW3;
|
||||||
private System.Windows.Forms.Label lblW4;
|
private System.Windows.Forms.Label lblW4;
|
||||||
private System.Windows.Forms.TextBox tbSingleTxtWid;
|
private System.Windows.Forms.RichTextBox tbSingleTxtWid; // RO Editor add symbols C2025 - 003
|
||||||
private System.Windows.Forms.TextBox tbVariableTxtWid;
|
private System.Windows.Forms.RichTextBox tbVariableTxtWid;
|
||||||
private System.Windows.Forms.TextBox tbTableWid;
|
private System.Windows.Forms.RichTextBox tbTableWid;
|
||||||
private System.Windows.Forms.TextBox tbXYPlotWid;
|
private System.Windows.Forms.RichTextBox tbXYPlotWid;
|
||||||
private System.Windows.Forms.Button btnOK;
|
private System.Windows.Forms.Button btnOK;
|
||||||
private System.Windows.Forms.Button btnCancel;
|
private System.Windows.Forms.Button btnCancel;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -218,10 +218,10 @@ namespace ROEditor
|
|||||||
this.lblFieldName = new System.Windows.Forms.Label();
|
this.lblFieldName = new System.Windows.Forms.Label();
|
||||||
this.tbFieldName = new System.Windows.Forms.TextBox();
|
this.tbFieldName = new System.Windows.Forms.TextBox();
|
||||||
this.gbAlternatives = new System.Windows.Forms.GroupBox();
|
this.gbAlternatives = new System.Windows.Forms.GroupBox();
|
||||||
this.tbXYPlotWid = new System.Windows.Forms.TextBox();
|
this.tbXYPlotWid = new System.Windows.Forms.RichTextBox(); // RO Editor add symbols C2025 - 003
|
||||||
this.tbTableWid = new System.Windows.Forms.TextBox();
|
this.tbTableWid = new System.Windows.Forms.RichTextBox();
|
||||||
this.tbVariableTxtWid = new System.Windows.Forms.TextBox();
|
this.tbVariableTxtWid = new System.Windows.Forms.RichTextBox();
|
||||||
this.tbSingleTxtWid = new System.Windows.Forms.TextBox();
|
this.tbSingleTxtWid = new System.Windows.Forms.RichTextBox();
|
||||||
this.lblW4 = new System.Windows.Forms.Label();
|
this.lblW4 = new System.Windows.Forms.Label();
|
||||||
this.lblW3 = new System.Windows.Forms.Label();
|
this.lblW3 = new System.Windows.Forms.Label();
|
||||||
this.lblW2 = new System.Windows.Forms.Label();
|
this.lblW2 = new System.Windows.Forms.Label();
|
||||||
|
|||||||
@@ -127,10 +127,18 @@
|
|||||||
<Reference Include="System.Xml">
|
<Reference Include="System.Xml">
|
||||||
<Name>System.XML</Name>
|
<Name>System.XML</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="VEPROMS.CSLA.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
|
|||||||
|
<HintPath>..\..\..\..\VEPROMS.CSLA.Library\bin\Debug\VEPROMS.CSLA.Library.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Volian.Base.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
|
<Reference Include="Volian.Base.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
<HintPath>..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Volian.Controls.Library, Version=1.0.9399.43177, Culture=neutral, processorArchitecture=AMD64">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\..\Volian.Controls.Library\bin\Debug\Volian.Controls.Library.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AboutROEditor.cs">
|
<Compile Include="AboutROEditor.cs">
|
||||||
@@ -171,6 +179,7 @@
|
|||||||
<Compile Include="RO_FST.cs">
|
<Compile Include="RO_FST.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Content Include="Symbols.xml" />
|
||||||
<EmbeddedResource Include="AboutROEditor.resx">
|
<EmbeddedResource Include="AboutROEditor.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<DependentUpon>AboutROEditor.cs</DependentUpon>
|
<DependentUpon>AboutROEditor.cs</DependentUpon>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
||||||
CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CwAAAk1TRnQBSQFMAgEBBgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmpRpt", "..\CmpRpt\CmpRpt.
|
|||||||
{3A4A3543-2D44-11D6-8452-00A0CC271352} = {3A4A3543-2D44-11D6-8452-00A0CC271352}
|
{3A4A3543-2D44-11D6-8452-00A0CC271352} = {3A4A3543-2D44-11D6-8452-00A0CC271352}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D9093FAB-448E-47C7-961B-92B18D85CAF7}"
|
||||||
|
mschill
commented
What project is this that is being added to this solution? (I am asking as I do not see a new project file which leads me to wonder if this is a PROMS project file being added (which could add cross dependencies) ) What project is this that is being added to this solution?
(I am asking as I do not see a new project file which leads me to wonder if this is a PROMS project file being added (which could add cross dependencies) )
plarsen
commented
I removed it. I removed it.
|
|||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ using System.Collections.Specialized;
|
|||||||
using Org.Mentalis.Files;
|
using Org.Mentalis.Files;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
|
||||||
namespace RODBInterface
|
namespace RODBInterface
|
||||||
@@ -1909,6 +1910,8 @@ namespace RODBInterface
|
|||||||
string Info = DBE.GetString(3);
|
string Info = DBE.GetString(3);
|
||||||
//B2022-043 &pos; was missing the ;
|
//B2022-043 &pos; was missing the ;
|
||||||
Info = Info.Replace("'", "\'"); // B2021-071: crash when getting/saving field names
|
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 C2025 - 003
|
||||||
|
|
||||||
node.SetAttribute("HasChild", "True");
|
node.SetAttribute("HasChild", "True");
|
||||||
|
|
||||||
// Store data in the VlnXmlElement as a subgroup
|
// Store data in the VlnXmlElement as a subgroup
|
||||||
@@ -1972,6 +1975,7 @@ namespace RODBInterface
|
|||||||
elem.SetAttribute("RecID", RecID);
|
elem.SetAttribute("RecID", RecID);
|
||||||
elem.SetAttribute("ParentID", node.GetAttribute("RecID"));
|
elem.SetAttribute("ParentID", node.GetAttribute("RecID"));
|
||||||
elem.SetAttribute("Table", node.GetAttribute("Table"));
|
elem.SetAttribute("Table", node.GetAttribute("Table"));
|
||||||
|
AccPageID = Regex.Replace(AccPageID, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2025 - 003
|
||||||
elem.SetAttribute("AccPageID", AccPageID);
|
elem.SetAttribute("AccPageID", AccPageID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2182,10 +2186,13 @@ namespace RODBInterface
|
|||||||
parent.SetAttribute("ChildLoaded", "True");
|
parent.SetAttribute("ChildLoaded", "True");
|
||||||
}
|
}
|
||||||
string xmlstr = GenerateXmlString(ro, false);
|
string xmlstr = GenerateXmlString(ro, false);
|
||||||
|
string tmp2 = Regex.Replace(xmlstr, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2025 - 003
|
||||||
|
mschill
commented
Where is tmp2 used? I am seeing this added but doing see a usage later in the file. Running Regex's take up resources so should only be done if necessary. Where is tmp2 used?
I am seeing this added but doing see a usage later in the file.
Running Regex's take up resources so should only be done if necessary.
plarsen
commented
I removed the line. It might have been a left over from something I was trying. I removed the line. It might have been a left over from something I was trying.
|
|||||||
string wraccid = null;
|
string wraccid = null;
|
||||||
if (ro.HasAttribute("AccPageID"))
|
if (ro.HasAttribute("AccPageID"))
|
||||||
{
|
{
|
||||||
string accid = ro.GetAttribute("AccPageID");
|
string accid = ro.GetAttribute("AccPageID");
|
||||||
|
|
||||||
|
|
||||||
int quote = accid.IndexOf("'");
|
int quote = accid.IndexOf("'");
|
||||||
if (quote >= 0)
|
if (quote >= 0)
|
||||||
wraccid = accid.Insert(quote, "'");
|
wraccid = accid.Insert(quote, "'");
|
||||||
|
|||||||
@@ -109,6 +109,9 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="ctlXMLEditLib">
|
||||||
|
<HintPath>..\..\..\VEPROMS User Interface\bin\Debug\ctlXMLEditLib.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
mschill
commented
not sure I am understanding why this reference is needed. ctlXMLEdit should depend on RODBInterface instead of the other way around? not sure I am understanding why this reference is needed. ctlXMLEdit should depend on RODBInterface instead of the other way around?
plarsen
commented
removed reference removed reference
|
|||||||
<Reference Include="System">
|
<Reference Include="System">
|
||||||
<Name>System</Name>
|
<Name>System</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
private System.Windows.Forms.Button btnSave;
|
private System.Windows.Forms.Button btnSave;
|
||||||
private System.Windows.Forms.Button btnCancel;
|
private System.Windows.Forms.Button btnCancel;
|
||||||
private System.Windows.Forms.TextBox tbZoom;
|
private System.Windows.Forms.RichTextBox tbZoom; // RO Editor add symbols C2025 - 003
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -88,7 +88,7 @@ namespace ctlXMLEditLib
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.tbZoom = new System.Windows.Forms.TextBox();
|
this.tbZoom = new System.Windows.Forms.RichTextBox(); // RO Editor add symbols C2025 - 003
|
||||||
this.btnSave = new System.Windows.Forms.Button();
|
this.btnSave = new System.Windows.Forms.Button();
|
||||||
this.btnCancel = new System.Windows.Forms.Button();
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@@ -99,7 +99,7 @@ namespace ctlXMLEditLib
|
|||||||
this.tbZoom.Location = new System.Drawing.Point(24, 16);
|
this.tbZoom.Location = new System.Drawing.Point(24, 16);
|
||||||
this.tbZoom.Multiline = true;
|
this.tbZoom.Multiline = true;
|
||||||
this.tbZoom.Name = "tbZoom";
|
this.tbZoom.Name = "tbZoom";
|
||||||
this.tbZoom.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
this.tbZoom.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; // RO Editor add symbols C2025 - 003
|
||||||
this.tbZoom.Size = new System.Drawing.Size(576, 392);
|
this.tbZoom.Size = new System.Drawing.Size(576, 392);
|
||||||
this.tbZoom.TabIndex = 0;
|
this.tbZoom.TabIndex = 0;
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -200,6 +200,10 @@ using System.Xml.Schema;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
using Org.Mentalis.Files;
|
using Org.Mentalis.Files;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using Volian.Base.Library;
|
||||||
|
using System.Linq;
|
||||||
//using IniFileIO;
|
//using IniFileIO;
|
||||||
|
|
||||||
|
|
||||||
@@ -311,7 +315,17 @@ namespace ctlXMLEditLib
|
|||||||
public string GetParentHTId { get { return parenthtid; } }
|
public string GetParentHTId { get { return parenthtid; } }
|
||||||
public void SetParentHTId(string id) { this.parenthtid = id; }
|
public void SetParentHTId(string id) { this.parenthtid = id; }
|
||||||
}
|
}
|
||||||
|
private RichTextBox _TextBoxFocus; // RO Editor add symbols C2025 - 003
|
||||||
|
public RichTextBox TextBoxFocus
|
||||||
|
{
|
||||||
|
get { return _TextBoxFocus; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_TextBoxFocus = value;
|
||||||
|
// C2015-017 hide the label indicating user is working with a duplicate of an exiting RO
|
||||||
|
//lblDuplicateRO.Visible = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
|
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
|
||||||
{
|
{
|
||||||
// This call is required by the Windows.Forms Form Designer.
|
// This call is required by the Windows.Forms Form Designer.
|
||||||
@@ -363,7 +377,7 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
// set the required fields tag on those fields which are included in the passed
|
// set the required fields tag on those fields which are included in the passed
|
||||||
// in required fields list.
|
// in required fields list.
|
||||||
private void DoSet(TextBox hwnd, string msg)
|
private void DoSet(RichTextBox hwnd, string msg) // RO Editor add symbols C2025 - 003
|
||||||
{
|
{
|
||||||
if (hwnd == null) return;
|
if (hwnd == null) return;
|
||||||
if (hwnd.Tag != null)
|
if (hwnd.Tag != null)
|
||||||
@@ -397,10 +411,10 @@ namespace ctlXMLEditLib
|
|||||||
o = myHT[field+"a"];
|
o = myHT[field+"a"];
|
||||||
if (o != null) // set all combo types required, the checker
|
if (o != null) // set all combo types required, the checker
|
||||||
{
|
{
|
||||||
DoSet((TextBox)o,msg);
|
DoSet((RichTextBox)o,msg);
|
||||||
DoSet((TextBox)myHT[field+"b"],msg);
|
DoSet((RichTextBox)myHT[field+"b"],msg);
|
||||||
DoSet((TextBox)myHT[field+"c"],msg);
|
DoSet((RichTextBox)myHT[field+"c"],msg);
|
||||||
DoSet((TextBox)myHT[field+"d"],msg);
|
DoSet((RichTextBox)myHT[field+"d"],msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (o != null)
|
else if (o != null)
|
||||||
@@ -477,7 +491,10 @@ namespace ctlXMLEditLib
|
|||||||
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
|
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
|
||||||
else
|
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
|
||||||
|
//hwnd.Text = nd.InnerText; // 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
|
// 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
|
// so it's a combo type & the radio button/visibility may need to
|
||||||
@@ -585,13 +602,13 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
dosaveflag=false;
|
dosaveflag=false;
|
||||||
mysavexml=false;
|
mysavexml=false;
|
||||||
TextBox hwnd;
|
RichTextBox hwnd;
|
||||||
// first, clear out all of the text boxes.
|
// first, clear out all of the text boxes.
|
||||||
|
|
||||||
foreach (string str in myHT.Keys)
|
foreach (string str in myHT.Keys)
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (RichTextBox) o;
|
||||||
hwnd.Text = "";
|
hwnd.Text = "";
|
||||||
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
||||||
RadioButton radio;
|
RadioButton radio;
|
||||||
@@ -623,7 +640,7 @@ namespace ctlXMLEditLib
|
|||||||
// to the parent's value, then clear the child's textbox so that nothing is saved
|
// 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
|
// to the database. This allow us to know that a specific value was not set
|
||||||
// for this Parent/Child child
|
// for this Parent/Child child
|
||||||
private void RemovePCChildTextIfSameAsParent(XmlNode node, TextBox tb, string chldName)
|
private void RemovePCChildTextIfSameAsParent(XmlNode node, RichTextBox tb, string chldName)
|
||||||
{
|
{
|
||||||
XmlNode parentNode = null;
|
XmlNode parentNode = null;
|
||||||
// if this is a child node get the parent's value
|
// if this is a child node get the parent's value
|
||||||
@@ -656,6 +673,9 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// SaveData saves the data in the element which had been sent to the control. Return
|
// SaveData saves the data in the element which had been sent to the control. Return
|
||||||
// true if success, false if fail.
|
// true if success, false if fail.
|
||||||
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
|
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
|
||||||
@@ -663,15 +683,56 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
if (mysavexml)
|
if (mysavexml)
|
||||||
{
|
{
|
||||||
TextBox hwnd;
|
RichTextBox hwnd;
|
||||||
TextBoxAttrTag tag;
|
TextBoxAttrTag tag;
|
||||||
string imgdate;
|
string imgdate;
|
||||||
|
|
||||||
//go thru the hash table to get textboxes. Find the ones that have text.
|
//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 C2025 - 003
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (RichTextBox) o;
|
||||||
|
|
||||||
|
string result1 = "";
|
||||||
|
string Str = "";
|
||||||
|
char[] chrAry = hwnd.Text.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
//Str = @"\u" + ((int)chr).ToString("X4");
|
||||||
|
//Str = @"\u" + ((int)chr); //.ToString("X4");
|
||||||
|
Str = $"\\u{(int)chr}?";
|
||||||
|
|
||||||
|
|
||||||
|
result1 = result1 + Str;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result1 = result1 + (char)chr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mschill
commented
Can simplify this to have less executions / possibly use LINQ. See recommendations that SonrLint Visual Studio Ext will give. Can simplify this to have less executions / possibly use LINQ. See recommendations that SonrLint Visual Studio Ext will give.
plarsen
commented
I will take a look at it if I have time. I will take a look at it if I have time.
|
|||||||
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2025 - 003
|
||||||
|
|
||||||
|
var results = Regex.Matches(hwnd.Text, pattern);
|
||||||
|
|
||||||
|
mschill
commented
Remove commented out code Remove commented out code
plarsen
commented
Removed commented out code. Removed commented out code.
|
|||||||
|
string num1;
|
||||||
|
|
||||||
|
int num2;
|
||||||
|
|
||||||
|
foreach (Match result in results)
|
||||||
|
{
|
||||||
|
num1 = (result.Groups[1].Value);
|
||||||
|
string resultString = Regex.Match(num1, @"\d+").Value;
|
||||||
|
string resultString1 = string.Format("{0:x}", resultString);
|
||||||
|
num2 = int.Parse(resultString, System.Globalization.NumberStyles.HexNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
hwnd.Text = result1;
|
||||||
|
|
||||||
imgdate = null;
|
imgdate = null;
|
||||||
// if this is a required field and there is no text, put out an error
|
// if this is a required field and there is no text, put out an error
|
||||||
// message and get out of here.
|
// message and get out of here.
|
||||||
@@ -788,6 +849,125 @@ namespace ctlXMLEditLib
|
|||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RO Editor add symbols C2025 - 003
|
||||||
|
private static Regex sreg1 = new Regex(@"\\par\r\n(?!\\)");
|
||||||
|
mschill
commented
see notes below. It looks like these sreg variables are never used. i.e. they are only called in StaticStripRtfCommands - which is never called. we should avoid regexs that are never used as they take up resources. see notes below. It looks like these sreg variables are never used.
i.e. they are only called in StaticStripRtfCommands - which is never called.
we should avoid regexs that are never used as they take up resources.
plarsen
commented
I removed them. I removed them.
|
|||||||
|
private static Regex sreg2 = new Regex(@"[\r\n]", RegexOptions.Singleline); // Strip Carriage Returns and Newlines
|
||||||
|
private static Regex sreg3 = new Regex(@"^\{(.*)\}$", RegexOptions.Singleline); // Strip Opening and Closing Braces
|
||||||
|
private static Regex sreg4 = new Regex(@"\{[^{]*?\}", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces
|
||||||
|
private static Regex sreg5 = new Regex(@"\{[^{]*?\}", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces
|
||||||
|
private static Regex sreg6 = new Regex(@"(\\[^' \\?\r\n\t]+)(?=\\)"); // add space after token if followed by token
|
||||||
|
private static Regex sreg7 = new Regex(@"(\\[^ \\?\r\n\t]+ )"); // take backslash xyz and evaluates them
|
||||||
|
private static Regex sreg8 = new Regex(@"(\\[^ \\?\r\n\t]+) (?=\\)"); // remove space between tokens
|
||||||
|
private static Regex sreg9 = new Regex(@"(\\[^ \\?\r\n\t]+) (?=\r\n)"); // remove space before /r/n
|
||||||
|
|
||||||
|
public static string StaticStripRtfCommands(string rtf, bool fromTable)
|
||||||
|
{
|
||||||
|
mschill
commented
Maybe I am missing something but I am not seeing this function being called anywhere? We shouldn't include code that isn't called / used. Maybe I am missing something but I am not seeing this function being called anywhere?
We shouldn't include code that isn't called / used.
plarsen
commented
I removed the unused functions. I removed the unused functions.
|
|||||||
|
// replace \{ & \} with (![ & (!] respectively and then redo at end. The curly braces
|
||||||
|
// are rtf so were getting removed and/or not handled correctly.
|
||||||
|
string retval = rtf.Replace(@"\{", @" (![");
|
||||||
|
retval = retval.Replace(@"\}", @" (!]");
|
||||||
|
|
||||||
|
// For hardspaces, the windows richtextbox does some 'quirky' things:
|
||||||
|
// A unicode representation of \u160? is sent INTO the rtb. Coming out,
|
||||||
|
// that \u160? was translated to a \~ (by the underlying windows rtb).
|
||||||
|
// Note that if the \~ is sent to the rtb, it is treated as a regular space,
|
||||||
|
// i.e. no longer a hardspace, and actually is converted to a regular space.
|
||||||
|
// SO, on the way out, convert any \~ to \u160?
|
||||||
|
retval = RTFConvertedSymbolsToUnicode(retval);
|
||||||
|
|
||||||
|
// remove carriage return/newlines after \par commands (these are introduced by rtb
|
||||||
|
// for hard returns, goes into rtb as \par and comes out as \par\r\n):
|
||||||
|
retval = sreg1.Replace(retval, "\\par ");
|
||||||
|
|
||||||
|
retval = retval.Replace("\\v0\r\n", "\\v0 "); // Replace Carriage Return and Newline after comment
|
||||||
|
retval = sreg2.Replace(retval, ""); // Strip Carriage Returns and Newlines
|
||||||
|
retval = sreg3.Replace(retval, "$1"); // Strip Opening and Closing Braces
|
||||||
|
retval = sreg4.Replace(retval, ""); // Strip Clauses - remove anything from curly braces
|
||||||
|
retval = sreg5.Replace(retval, ""); // Strip Clauses - remove anything from curly braces
|
||||||
|
retval = sreg6.Replace(retval, "$1 "); // add space after token if followed by token
|
||||||
|
retval = sreg7.Replace(retval, new MatchEvaluator(StaticReplaceRTFClause)); // take backslash xyz and evaluates them
|
||||||
|
retval = sreg8.Replace(retval, "$1"); // remove space between tokens
|
||||||
|
retval = sreg9.Replace(retval, "$1"); // remove space before /r/n
|
||||||
|
|
||||||
|
// remove \r\n at end of string if the string has 2 or more characters
|
||||||
|
if (retval.Length > 1 && retval.Substring(retval.Length - 2, 2) == "\r\n") retval = retval.Remove(retval.Length - 2, 2);
|
||||||
|
|
||||||
|
if (retval.Length == 0) return "";
|
||||||
|
if (retval.Length > 1 && retval.Substring(retval.Length - 2, 2) == @"\v") retval = retval.Remove(retval.Length - 2, 2);
|
||||||
|
|
||||||
|
retval = retval.Replace(@" (![", @"\{");
|
||||||
|
retval = retval.Replace(@" (!]", @"\}");
|
||||||
|
retval = retval.TrimEnd(' ');
|
||||||
|
|
||||||
|
// the indent character was translated in the richtextbox, change it back:
|
||||||
|
if (retval.IndexOf(@"\'05") > -1) retval = retval.Replace(@"\'05", "\x05");
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
// RO Editor add symbols C2025 - 003
|
||||||
|
public static string RTFConvertedSymbolsToUnicode(string str)
|
||||||
|
{
|
||||||
|
mschill
commented
Maybe I am missing something, but it looks like the only place this is called from is StaticStripRtfCommands - which is never called --- so this code will never be called / executed? Maybe I am missing something, but it looks like the only place this is called from is StaticStripRtfCommands - which is never called --- so this code will never be called / executed?
plarsen
commented
I removed the unused functions. I removed the unused functions.
|
|||||||
|
string rtnStr = str;
|
||||||
|
// convert \~ to a hard spece. RTF is automatically converting \u160? to \~ but will then convert
|
||||||
|
// the \~ to a regular space!
|
||||||
|
rtnStr = rtnStr.Replace(@"\~", @"\u160?");
|
||||||
|
rtnStr = rtnStr.Replace(@"\'a0", @"\u160?");
|
||||||
|
// convert \'99 to \u8482? this is for the trade mark symbol. RTF is automatically
|
||||||
|
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) does not show it
|
||||||
|
rtnStr = rtnStr.Replace(@"\'99", @"\u8482?");
|
||||||
|
// convert \'ae to \u174? this is for the registered symbol. RTF converts the unicode character to \'ae
|
||||||
|
rtnStr = rtnStr.Replace(@"\'ae", @"\u174?");
|
||||||
|
// convert \'a9 to \u169? this is for the copyright symbol. RTF converts the unicode character to \'a9
|
||||||
|
rtnStr = rtnStr.Replace(@"\'a9", @"\u169?");
|
||||||
|
return rtnStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string StaticReplaceRTFClause(Match m)
|
||||||
|
{
|
||||||
|
mschill
commented
It looks like this function is never called? We should remove unused functions. It looks like this function is never called?
We should remove unused functions.
plarsen
commented
I removed the unused functions I removed the unused functions
|
|||||||
|
try
|
||||||
|
{
|
||||||
|
string token = m.Groups[1].Value;
|
||||||
|
switch (token[1])
|
||||||
|
{
|
||||||
|
case '_': // B2020-100 New Non-Breaking Hyphen
|
||||||
|
return token.Trim();
|
||||||
|
case '\\':
|
||||||
|
return token;
|
||||||
|
case '\'': // Special Character
|
||||||
|
return token;
|
||||||
|
case '{': // look for escape for curly braces:
|
||||||
|
return token;
|
||||||
|
case '}':
|
||||||
|
return token;
|
||||||
|
case 'v': // save link hidden info
|
||||||
|
if (token == "\\viewkind4 ") break;
|
||||||
|
if (Regex.IsMatch(token, @"^\\v0? ?$"))
|
||||||
|
return token; // comment part of link
|
||||||
|
// If possible show what procedure was being processed.
|
||||||
|
break;
|
||||||
|
case 'l':
|
||||||
|
if (Regex.IsMatch(token, @"^\\line ?$")) return token;
|
||||||
|
if (Regex.IsMatch(token, @"^\\li[-0-9]+ ?$")) return token; // line indent
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
if (Regex.IsMatch(token, @"^\\fi[-0-9]+ ?$")) return token; // first line indent
|
||||||
|
// C2020-001: only keep the font size rtf if in a table.
|
||||||
|
//if (_fromTable && Regex.IsMatch(token, @"^\\fs[-0-9]+ ?$")) return token; // font size
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
if (Regex.IsMatch(token, @"^\\par ?$")) return "\r\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("StaticReplaceRTFClause {0} - {1}", ex.GetType().Name, ex.Message);
|
||||||
|
}
|
||||||
|
return "";//Strip All
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
#region Component Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
@@ -888,12 +1068,18 @@ namespace ctlXMLEditLib
|
|||||||
if (getannot.IndexOf("Lines")>=0)
|
if (getannot.IndexOf("Lines")>=0)
|
||||||
{
|
{
|
||||||
GraphicsHttextbox = mytextbox;
|
GraphicsHttextbox = mytextbox;
|
||||||
|
|
||||||
|
Size size = GraphicsHttextbox.Size;
|
||||||
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
|
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
|
||||||
|
|
||||||
|
//mytextbox.
|
||||||
}
|
}
|
||||||
|
mschill
commented
Remove commented out code Remove commented out code
plarsen
commented
Removed comment. Removed comment.
|
|||||||
if (getannot.IndexOf("Character")>=0)
|
if (getannot.IndexOf("Character")>=0)
|
||||||
{
|
{
|
||||||
GraphicsWdtextbox = mytextbox;
|
GraphicsWdtextbox = mytextbox;
|
||||||
|
|
||||||
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
|
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -905,7 +1091,10 @@ namespace ctlXMLEditLib
|
|||||||
// A Schema Type Restriction is used to define single or multi-line boxes.
|
// A Schema Type Restriction is used to define single or multi-line boxes.
|
||||||
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
|
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
|
||||||
if (myRestrictions.BaseTypeName.Name == "normalizedString")
|
if (myRestrictions.BaseTypeName.Name == "normalizedString")
|
||||||
|
{
|
||||||
mytextbox.Multiline = false;
|
mytextbox.Multiline = false;
|
||||||
|
mytextbox.Size = new Size(300, 40);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mytextbox.Multiline = true;
|
mytextbox.Multiline = true;
|
||||||
@@ -993,6 +1182,7 @@ namespace ctlXMLEditLib
|
|||||||
gbox.Controls.Add(radio);
|
gbox.Controls.Add(radio);
|
||||||
|
|
||||||
RichTextBox tb = new RichTextBox();
|
RichTextBox tb = new RichTextBox();
|
||||||
|
Size size3 = tb.Size;
|
||||||
tb.Location = new Point(boxx+20, y+25);
|
tb.Location = new Point(boxx+20, y+25);
|
||||||
if (!first) tb.Visible = false;
|
if (!first) tb.Visible = false;
|
||||||
myHT.Add(element.Name,tb);
|
myHT.Add(element.Name,tb);
|
||||||
@@ -1001,7 +1191,7 @@ namespace ctlXMLEditLib
|
|||||||
// the groupbox.
|
// the groupbox.
|
||||||
Controls.Add(tb);
|
Controls.Add(tb);
|
||||||
tb.TextChanged += new System.EventHandler(this.textbox_change);
|
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);
|
tb.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
||||||
gbox.Contains(tb);
|
gbox.Contains(tb);
|
||||||
// the following will set attributes on the text boxes such as maxlength, multiline, etc.
|
// the following will set attributes on the text boxes such as maxlength, multiline, etc.
|
||||||
@@ -1146,6 +1336,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
RichTextBox mytextbox;
|
RichTextBox mytextbox;
|
||||||
mytextbox = new RichTextBox();
|
mytextbox = new RichTextBox();
|
||||||
|
Size size3 = mytextbox.Size;
|
||||||
mytextbox.Location = new Point(screenx+indent, screeny);
|
mytextbox.Location = new Point(screenx+indent, screeny);
|
||||||
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
|
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
|
||||||
mytextbox.Name = tFieldName;
|
mytextbox.Name = tFieldName;
|
||||||
@@ -1155,7 +1346,7 @@ namespace ctlXMLEditLib
|
|||||||
screeny = screeny + 10;
|
screeny = screeny + 10;
|
||||||
mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
|
mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
|
||||||
mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating);
|
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);
|
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
||||||
if (pcChildIdx > 0)
|
if (pcChildIdx > 0)
|
||||||
{
|
{
|
||||||
@@ -1264,7 +1455,7 @@ namespace ctlXMLEditLib
|
|||||||
private void radiocheckchg(object sender, System.EventArgs e)
|
private void radiocheckchg(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
RadioButton btnsel = (RadioButton) sender;
|
RadioButton btnsel = (RadioButton) sender;
|
||||||
TextBox assocbox;
|
RichTextBox assocbox;
|
||||||
string btntext, str;
|
string btntext, str;
|
||||||
|
|
||||||
if(dosaveflag)mysavexml = true;
|
if(dosaveflag)mysavexml = true;
|
||||||
@@ -1277,7 +1468,7 @@ namespace ctlXMLEditLib
|
|||||||
str = btnsel.Name.Replace(btntext,"");
|
str = btnsel.Name.Replace(btntext,"");
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
if (o == null) return;
|
if (o == null) return;
|
||||||
assocbox = (TextBox) o;
|
assocbox = (RichTextBox) o;
|
||||||
// make the text box visible if checked, otherwise, invisible
|
// make the text box visible if checked, otherwise, invisible
|
||||||
assocbox.Visible = btnsel.Checked;
|
assocbox.Visible = btnsel.Checked;
|
||||||
// C2021-026 show or hide the Parent/Child appicability group box
|
// C2021-026 show or hide the Parent/Child appicability group box
|
||||||
@@ -1420,13 +1611,15 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
|
|
||||||
// save which box we're on, for zoom processing.
|
// 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)
|
||||||
{
|
{
|
||||||
RichTextBox textbox = (RichTextBox) sender;
|
RichTextBox textbox = (RichTextBox) sender;
|
||||||
if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
|
if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
|
||||||
zoomtextbox = textbox;
|
zoomtextbox = textbox;
|
||||||
else
|
else
|
||||||
zoomtextbox = null;
|
zoomtextbox = null;
|
||||||
|
|
||||||
|
TextBoxFocus = textbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
|
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
|
||||||
@@ -1932,5 +2125,35 @@ namespace ctlXMLEditLib
|
|||||||
return curTZ.GetDaylightChanges(year);
|
return curTZ.GetDaylightChanges(year);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static class RichTextBoxExtensions // RO Editor add symbols C2025 - 003
|
||||||
|
{
|
||||||
|
public static void InsertSymbol(this RichTextBox richTextBox, int symbcode)
|
||||||
|
{
|
||||||
|
int position = richTextBox.SelectionStart;
|
||||||
|
string sym = string.Format(symbcode < 256 ? "\'{0:X2}" : @"\u{0}", symbcode);
|
||||||
|
string RtfPrefixForSymbols = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 FreeMono; } {\f1\fnil\fcharset0 FreeMono; } } {\colortbl;\red255\green0\blue0;\red0\green0\blue255; } \viewkind4\uc1\pard\fs24 \f1\fs24 ";
|
||||||
|
richTextBox.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
|
||||||
|
richTextBox.SelectedRtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033\uc1 }";
|
||||||
|
richTextBox.Select(position, 1);
|
||||||
|
richTextBox.Select(position + 1, 0);
|
||||||
|
|
||||||
|
//TextPointer caretPos = rtb.CaretPosition;
|
||||||
|
//if (symbcode < 256)
|
||||||
|
// AddText(((char)symbcode).ToString());
|
||||||
|
//else
|
||||||
|
// AddSymbol(sym); // Adds font commands around symbol, needed for higher codes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public enum E_FontStyle : byte
|
||||||
|
{
|
||||||
|
FS_NONE = 0,
|
||||||
|
FS_BOLD = 0x01,
|
||||||
|
FS_UNDERLINE = 0x02,
|
||||||
|
FS_ITALIC = 0x04,
|
||||||
|
FS_SUPERSCRIPT = 0x08,
|
||||||
|
FS_SUBSCRIPT = 0x10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,10 @@
|
|||||||
<Reference Include="System.Xml">
|
<Reference Include="System.Xml">
|
||||||
<Name>System.XML</Name>
|
<Name>System.XML</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Volian.Base.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
||||||
|
mschill
commented
Is this reference needed? Not seeing anything added that references the Base library? (unless I am missing something) If nothing is added requiring this, then should not add an added dependency. Is this reference needed?
Not seeing anything added that references the Base library? (unless I am missing something)
If nothing is added requiring this, then should not add an added dependency.
plarsen
commented
I remove the reference I remove the reference
|
|||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AssemblyInfo.cs">
|
<Compile Include="AssemblyInfo.cs">
|
||||||
|
|||||||
@@ -494,6 +494,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
roid = FormatRoidKey(roid, true);
|
roid = FormatRoidKey(roid, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string retval = GetRoChild(roid).value;
|
string retval = GetRoChild(roid).value;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(retval))
|
if (string.IsNullOrEmpty(retval))
|
||||||
@@ -2152,8 +2154,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (string.IsNullOrEmpty(s2))
|
if (string.IsNullOrEmpty(s2))
|
||||||
return s2;
|
return s2;
|
||||||
|
|
||||||
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2025 - 003
|
||||||
|
|
||||||
|
if (Regex.IsMatch(s2, pattern))
|
||||||
|
|
||||||
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
||||||
|
if (!Regex.IsMatch(s2, pattern)) // RO Editor add symbols C2025 - 003
|
||||||
|
mschill
commented
Not if sure this makes sense --- will this ever get executed? what if you have something that contains both special characters and a backslash in the text? Not if sure this makes sense --- will this ever get executed?
what if you have something that contains both special characters and a backslash in the text?
plarsen
commented
It is needed. If a special letter (Unicode) comes through this code it will mess-up one way or another. Maybe it needs to be refined to handle the special char and a separate back slash. It is needed. If a special letter (Unicode) comes through this code it will mess-up one way or another. Maybe it needs to be refined to handle the special char and a separate back slash.
mschill
commented
I would say that is the case --- if there are are matches on the backslash not followed by a "u" those need to be replaced. Likely would have to get matches and then loop through those specific matches doing a replace on those, I would say that is the case --- if there are are matches on the backslash not followed by a "u" those need to be replaced.
Likely would have to get matches and then loop through those specific matches doing a replace on those,
|
|||||||
|
{
|
||||||
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
||||||
|
}
|
||||||
s2 = s2.Replace("<HSP>", @"\u160?"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace("<HSP>", @"\u160?"); // convert hard spaces bug fix: B2016-206
|
||||||
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
||||||
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
|
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace Volian.Controls.Library
|
|||||||
this.lbROId.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lbROId.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.lbROId.ForeColor = System.Drawing.SystemColors.Highlight;
|
this.lbROId.ForeColor = System.Drawing.SystemColors.Highlight;
|
||||||
this.lbROId.Location = new System.Drawing.Point(48, 24);
|
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.Name = "lbROId";
|
||||||
this.lbROId.Size = new System.Drawing.Size(183, 33);
|
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" +
|
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.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.lblROID.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lblROID.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.lblROID.Location = new System.Drawing.Point(0, 24);
|
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.Name = "lblROID";
|
||||||
this.lblROID.Size = new System.Drawing.Size(48, 33);
|
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)));
|
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.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.btnGoToRO.Enabled = false;
|
this.btnGoToRO.Enabled = false;
|
||||||
this.btnGoToRO.Location = new System.Drawing.Point(0, 55);
|
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.Name = "btnGoToRO";
|
||||||
this.btnGoToRO.Size = new System.Drawing.Size(233, 18);
|
this.btnGoToRO.Size = new System.Drawing.Size(233, 18);
|
||||||
this.btnGoToRO.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
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.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.btnPreviewRO.Enabled = false;
|
this.btnPreviewRO.Enabled = false;
|
||||||
this.btnPreviewRO.Location = new System.Drawing.Point(0, 37);
|
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.Name = "btnPreviewRO";
|
||||||
this.btnPreviewRO.Size = new System.Drawing.Size(233, 18);
|
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)));
|
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.tvROFST);
|
||||||
this.Controls.Add(this.lbFound);
|
this.Controls.Add(this.lbFound);
|
||||||
this.Controls.Add(this.panelValue);
|
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.Name = "DisplayRO";
|
||||||
this.Size = new System.Drawing.Size(233, 507);
|
this.Size = new System.Drawing.Size(233, 507);
|
||||||
this.panelValue.ResumeLayout(false);
|
this.panelValue.ResumeLayout(false);
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
|
using DevComponents.DotNetBar;
|
||||||
|
mschill marked this conversation as resolved
mschill
commented
what is this needed for? what is this needed for?
plarsen
commented
I did not add it. I checked with the Master and it is included. I did not add it. I checked with the Master and it is included.
mschill
commented
sorry missed it since the lines were changed. It was previously on line 11. - this is good. I will resolve this item. sorry missed it since the lines were changed. It was previously on line 11. - this is good. I will resolve this item.
|
|||||||
|
using JR.Utils.GUI.Forms;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
using XYPlots;
|
|
||||||
using DevComponents.DotNetBar;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
using JR.Utils.GUI.Forms;
|
using XYPlots;
|
||||||
|
mschill marked this conversation as resolved
mschill
commented
what is this needed for? what is this needed for?
plarsen
commented
I did not add it. I checked with the Master and XYPlots is included. I did not add it. I checked with the Master and XYPlots is included.
mschill
commented
sorry missed it since the lines were changed. It was previously on line 10. - this is good. I will resolve this item. sorry missed it since the lines were changed. It was previously on line 10. - this is good. I will resolve this item.
|
|||||||
using System.Linq;
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
|
mschill
commented
what is this needed for? what is this needed for?
plarsen
commented
Not sure how the line got there. I will remove it. Not sure how the line got there. I will remove it.
|
|||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@@ -372,8 +373,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
||||||
// B2022-098: [JPR] ROs not being resolved 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;
|
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
||||||
selectedChld = chld;
|
selectedChld = chld;
|
||||||
|
|
||||||
@@ -770,9 +770,15 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
tmp = new TreeNode(roc.title);
|
tmp = new TreeNode(roc.title);
|
||||||
tmp.Tag = roc;
|
tmp.Tag = roc;
|
||||||
|
|
||||||
|
if (tmp.Text.IndexOf("\\u") > -1) // RO Editor add symbols C2025 - 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)
|
if (roc.roid.Length == 16)
|
||||||
{
|
{
|
||||||
tn.Nodes.Add(tmp);
|
tn.Nodes.Add(tmp);
|
||||||
@@ -926,6 +932,7 @@ namespace Volian.Controls.Library
|
|||||||
string valtxt = MyROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, MyRTB.MyItemInfo);
|
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));
|
MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, MyROFST.RODbID));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,20 +112,12 @@
|
|||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="btnSaveRO.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>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.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
@@ -1400,9 +1400,13 @@ namespace Volian.Controls.Library
|
|||||||
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
||||||
int position = SelectionStart;
|
int position = SelectionStart;
|
||||||
SelectionLength = 0;
|
SelectionLength = 0;
|
||||||
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
|
|
||||||
linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2025 - 003
|
||||||
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
|
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(@"{", @"\{");
|
||||||
linkValue = linkValue.Replace(@"}", @"\}");
|
linkValue = linkValue.Replace(@"}", @"\}");
|
||||||
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
|
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
|
||||||
|
|||||||
@@ -721,6 +721,59 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DevComponents.DotNetBar.GalleryContainer BuildSymbolGalleryForRO()
|
||||||
|
{
|
||||||
|
// sl, galleryContainerSymbolsCM, galleryContainerSymbolsCM3, galleryContainerSymbolsGrid, galleryContainerSymbolsCM4
|
||||||
|
mschill
commented
This function doesn't appear to be called from anywhere / used anywhere -- should this be in here / changed? Also, should there be any changes to the StepTabRibbon Designer or Resx PROMS files? It looks like Dotnetbar was used in the RO Editor not StepTabRibbon - so are theseearlier attempts that shouldn't be part of the final product (unless I am missing something - which could be possible)? ---but as is it looks like there shouldn't be any changes to any of the 3 StepTabRibbon files? This function doesn't appear to be called from anywhere / used anywhere -- should this be in here / changed?
Also, should there be any changes to the StepTabRibbon Designer or Resx PROMS files?
It looks like Dotnetbar was used in the RO Editor not StepTabRibbon - so are theseearlier attempts that shouldn't be part of the final product (unless I am missing something - which could be possible)?
---but as is it looks like there shouldn't be any changes to any of the 3 StepTabRibbon files?
plarsen
commented
I removed the function I removed the function
|
|||||||
|
|
||||||
|
DevComponents.DotNetBar.GalleryContainer gc1 = galleryContainerSymbolsCM;
|
||||||
|
DevComponents.DotNetBar.GalleryContainer gc2 = galleryContainerSymbolsCM3;
|
||||||
|
DevComponents.DotNetBar.GalleryContainer gc3 = galleryContainerSymbolsGrid;
|
||||||
|
DevComponents.DotNetBar.GalleryContainer gc4 = galleryContainerSymbolsCM4;
|
||||||
|
|
||||||
|
FormatInfo fmt = FormatInfo.Get(1);
|
||||||
|
SymbolList sl = fmt.PlantFormat.FormatData.SymbolList;
|
||||||
|
if (sl == null || sl.Count <= 0)
|
||||||
|
{
|
||||||
|
FlexibleMessageBox.Show("No symbols are available, check with administrator");
|
||||||
|
//return DevComponents.DotNetBar.GalleryContainer;
|
||||||
|
}
|
||||||
|
foreach (Symbol sym in sl)
|
||||||
|
{
|
||||||
|
// get an image of the symbol character
|
||||||
|
// found the we cannot change the font being used for the button text
|
||||||
|
Bitmap symCharBtmp = createTextBitmap((char)sym.Unicode);
|
||||||
|
DevComponents.DotNetBar.ButtonItem btn = new DevComponents.DotNetBar.ButtonItem();
|
||||||
|
btn.Image = symCharBtmp;
|
||||||
|
//btn.Text = string.Format("{0}", (char)sym.Unicode);
|
||||||
|
|
||||||
|
// to name button use unicode rather than desc, desc may have spaces or odd chars
|
||||||
|
btn.Name = "btn" + sym.Unicode.ToString();
|
||||||
|
btn.Tooltip = sym.Desc;
|
||||||
|
btn.Tag = string.Format(@"{0}", sym.Unicode);
|
||||||
|
//btn.FontBold = true;
|
||||||
|
btn.Click += new System.EventHandler(btnSym_Click);
|
||||||
|
galleryContainerSymbols.SubItems.Add(btn);
|
||||||
|
DevComponents.DotNetBar.ButtonItem btnCM1 = GetCMButton(sym);
|
||||||
|
btnCM1.Image = symCharBtmp;
|
||||||
|
btnCM1.Click += new System.EventHandler(btnSym_Click);
|
||||||
|
gc1.SubItems.Add(btnCM1);
|
||||||
|
DevComponents.DotNetBar.ButtonItem btnCM2 = GetCMButton(sym);
|
||||||
|
btnCM2.Image = symCharBtmp;
|
||||||
|
btnCM2.Click += new System.EventHandler(btnSym_Click);
|
||||||
|
gc2.SubItems.Add(btnCM2);
|
||||||
|
DevComponents.DotNetBar.ButtonItem btnCM3 = GetCMButton(sym);
|
||||||
|
btnCM3.Image = symCharBtmp;
|
||||||
|
btnCM3.Click += new System.EventHandler(btnSym_Click);
|
||||||
|
gc3.SubItems.Add(btnCM3);
|
||||||
|
DevComponents.DotNetBar.ButtonItem btnCM4 = GetCMButton(sym);
|
||||||
|
btnCM4.Image = symCharBtmp;
|
||||||
|
btnCM4.Click += new System.EventHandler(btnSym_Click);
|
||||||
|
gc4.SubItems.Add(btnCM4);
|
||||||
|
}
|
||||||
|
return galleryContainerSymbols;
|
||||||
|
}
|
||||||
|
|
||||||
private void SetBtnInsSupInfoVisible()
|
private void SetBtnInsSupInfoVisible()
|
||||||
{
|
{
|
||||||
if (MyItemInfo == null) return;
|
if (MyItemInfo == null) return;
|
||||||
|
|||||||
What is this needed for?
I would suggest not adding CSLA as a dependency to the RO Editor / doing straight SQL connections as this adds a dependency that we may need to strip out later as at some point CSLA may become no longer maintainable.