From 5a2c0460aabf599d3b229563693bf90467228ad1 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 6 Jan 2026 13:18:49 -0500 Subject: [PATCH] C2022-003-Change-Textboxes-to-RTF-3 --- .../LibSource/RODBInterface/RODBInterface.cs | 6 ++++-- .../LibSource/ctlXMLEditLib/ctlXMLEdit.cs | 13 ++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index 7feed369..1b3002cc 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -1975,7 +1975,9 @@ namespace RODBInterface elem.SetAttribute("RecID", RecID); elem.SetAttribute("ParentID", node.GetAttribute("RecID")); 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 C2022 - 003 + //AccPageID = Regex.Replace(AccPageID, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003 + string pattern = @"\\u([0-9]{1,4})\?"; + AccPageID = Regex.Replace(AccPageID, pattern, ""); // Remove any symbols from AccPageID - RO Editor add symbols C2022 - 003 elem.SetAttribute("AccPageID", AccPageID); } } @@ -2258,7 +2260,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/ctlXMLEdit.cs b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs index 2f830d72..3938d121 100644 --- a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs +++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs @@ -706,25 +706,20 @@ namespace ctlXMLEditLib object o = myHT[str]; hwnd = (RichTextBox) o; - string result1 = ""; - string Str = ""; + StringBuilder result1 = new StringBuilder(); char[] chrAry = hwnd.Text.ToCharArray(); foreach (int chr in chrAry) { if (chr > 166) { - Str = $"\\u{(int)chr}?"; - result1 = result1 + Str; + result1.Append($"\\u{(int)chr}?"); } else { - result1 = result1 + (char)chr; + result1.Append((char)chr); } - } - - - hwnd.Text = result1; + hwnd.Text = result1.ToString(); imgdate = null; // if this is a required field and there is no text, put out an error