C2022-003-Change-Textboxes-to-RTF-3 #676
Open
plarsen
wants to merge 8 commits from
C2022-003-Change-Textboxes-to-RTF-3 into Development
pull from: C2022-003-Change-Textboxes-to-RTF-3
merge into: Volian:Development
Volian:master
Volian:Development
Volian:Rollback_B2025-064
Volian:Code_Cleanup_12_16_2025
Volian:C2025-060
Volian:F2025-042_Vogtle3&4_nonboldCAS
Volian:F2025-040_VogtleSingleColAtt_ContActStep_Box
Volian:B2025-064
Volian:B2019-140_B2022-099
Volian:F2025-038_Vogtle_3&4_CAS_Formating
Volian:F2025-039_Vogtle_3&4_ReplaceWordsUpdate
Volian:F2025-037_Vogtle_ReplaceWords_Tweak
Volian:C2025-063
Volian:B2025-063
Volian:C2019-036
Volian:B2025-062_Vogtle_AOP_Null_Ref
Volian:B2025_060_SectContPrintBug
Volian:F2025-036_Vogtle_3_4_rmvExtraSectStyle
Volian:F2025-035_Vogtle_3_4_substep_tab
Volian:F2025-034_VogtleTransitions
Volian:F2025-033_Vogtle_3&4_Remove_Operator_Actions
Volian:B2025-058_061_Vogtle_TransitionFix
Volian:F2025-031_Vogtle3&4_ReplaceWordsFix
Volian:C2021-035
Volian:F2025-030_Vogtle_End
Volian:F2025-029_Vogtle_Westinghouse_Footer
Volian:B2021-092
Volian:B2025-053
Volian:B2025-056
Volian:C2024-047
Volian:F2025-028_Vogtle3_4_Bold_RNO
Volian:F2025-027_Vogtle_3_4_Backgrounds_PSI
Volian:B2025-057
Volian:B2025-055
Volian:B2025-054
Volian:F2025-026_Vogtle_Background_Formats
Volian:C2025-053
Volian:F2025_025_Vogtle3&4_SubSect_single_Att
Volian:C2025-037
Volian:F2025-024_Vogtle_Dont_Bold_RNO
Volian:F2025-023_Vogtle_3_4_Replacewords_Fix
Volian:B2025-046_B2025-043_B2024-082
Volian:Vogtle34_EOP_Format_Changes
Volian:B2025-051
Volian:B2025-048
Volian:Vogtle_Format_Tweaks_EOPs
Volian:C2015-028
Volian:B2025-050_SaveUserSettings
Volian:B2025-049
Volian:B2025-047
Volian:F2025-018-019_BVPS_2colAttSect_SetPtUnits
Volian:C2025-055
Volian:C2021-058_C2025-052
Volian:C2025-054_UpMinorRev
Volian:C2025-034
Volian:C2025-009
Volian:C2025-022-PROMS-FIXES_CHECKIN
Volian:C2024-036
Volian:C2025-017_PrintAllApproved
Volian:C2025-022-Remove-UCF-2
Volian:B2025-044
Volian:C2025-051
Volian:C2025-001
Volian:C2025-035
Volian:B2025-041-Set-Quick-Print-overwrite-pdf-to-false
Volian:B2025-042
Volian:C2025-048-Set-Quick-Print-overwrite-pdf-to-false
Volian:B2025-037
Volian:C2025-045
Volian:C2025-049-update_StandardHyphens_AdminTools
Volian:C2025-015_ViewMultipleApprovedPDFsOfSameName
Volian:B2025-038-Copy-a-step-between-two-screens
Volian:C2025-024
Volian:B2025-036-SplitScreen-Print-Error
Volian:C2025-039_allowStepTransToAllWordProc
Volian:C2025-047-cleanup
Volian:C2025-047-AnnotationsTypeSelectChanges
Volian:C2025-047-AnnotationsTypeSelectChanges-5
Volian:SQL_Optimization_7_31_2025
Volian:C2025-027-AnnotationsTypeSelect-3
Volian:C2025-027-AnnotationsTypeSelect-2
Volian:C2025-027-AnnotationsTypeSelect
Volian:C2025-044
Volian:DEV_Proj_File_Dependency_Update
Volian:B2025-039_PropFontColorRplWrds
Volian:General_Debugging
Volian:C2025-038_EventCalls
Volian:F2025-016
Volian:B2025-035-Hold-Procedure-Set-Bug
Volian:C2025-023
Volian:C2025-036_CleanupTabCode
Volian:B2025-034-Add-error-message-documents-2
Volian:B2025-034-Add-error-message-documents
Volian:F2025-015_SharonHarris
Volian:B2025-024-Document-Unit-Print
Volian:C2025-021
Volian:C2025-023-New-EP-Format-File
Volian:F2024-089_BNPP_LOGO
Volian:C2025-013
Volian:C2025-028_B2025-032
Volian:DemoFormats
Volian:B2025-028
Volian:C2025_031_OptionsTooltips_Cleanup
Volian:B2025-031
Volian:B2025-030
Volian:C2025-032
Volian:F2025-012
Volian:B2025-026_B2025-027
Volian:C2025-027-Develop-a-way-to-filter-annotations-so-the-user-can-view-only-the-types-they-want-to-see-EP
Volian:F2025-011
Volian:B2025-010
Volian:B2022-031-Add-filtering-for-Proc-and-Section-name-from-Global-Search-2
Volian:B2022-031-Add-filtering-for-Proc-and-Section-name-from-Global-Search
Volian:ACME_formats
Volian:C2024-041-Disable-UCF-(User-Control-of-Format)-options-3
Volian:C2024-041-Disable-UCF-(User-Control-of-Format)-options-2
Volian:C2024-041-Disable-UCF-(User-Control-of-Format)-options
Volian:F2025-004_Ginna
Volian:B2025-017-Print-Section-Sub-Section-v2
Volian:DeveloperToolUpdate
Volian:B2025-020_UpdateTransitions
Volian:B2025-018
Volian:C2025-019
Volian:B2025-015
Volian:C2025-014_PDF_Step_BckMrk_Zoom
Volian:B2025-019
Volian:C2024-038_v2
Volian:F2025-002_Farley
Volian:B2025-016
Volian:C2024-038
Volian:OrgDotNetBar
Volian:B2025-013
Volian:B2025-011-Global-search-is-not-finding-question-marks
Volian:DotNetBar_net4.8.1
Volian:CLSA481Build
Volian:B2025-014
Volian:B2025-012
Volian:C2025-011
Volian:F2025-001_BNPP
Volian:C2019-025_Ability-to-Toggle-Replace-Words-3
Volian:C2025-005
Volian:C2019-025_Ability-to-Toggle-Replace-Words-2
Volian:C2019-025_Ability-to-Toggle-Replace-Words
Volian:B2025-005
Volian:C2025-008
Volian:B2025-008
Volian:B2025-007
Volian:C2025-007
Volian:B2025-009
Volian:B2025-004_v2
Volian:B2025-004
Volian:C2025-006_B2025-006
Volian:C2025-003
Volian:B2025-003
Volian:C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS-6
Volian:F2024-074-Farley_TOC
Volian:C2020-049-Add-the-ability-for-PROMS-to-remember-the-procedure-tabs-that-were-open-when-you-closed-PROMS
Volian:B2024-063-Invalid-Format-message-box-displays-when-rev-date-empty
Volian:B2024-062_EmptyProcedure
Volian:B2024-068-VCS-Deviation-Format
Volian:C2024-005
Volian:C2024-016-Write-Info-to-Results-Window-Delete-Annotations
Volian:B2024-046-Set-Default-Tab-In-Admin-Tools
Volian:C2024-005-Annotations-Cleanup
Volian:B2024-041
Volian:C2024-004_fix
Volian:C2021-059
Volian:B2024-032-Fix-Quick-Print
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "C2022-003-Change-Textboxes-to-RTF-3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
C2022-003 The symbols that can be entered into the PROMS editor should be added to the RO editor.
see notes. Let me know if you have any questions.
@@ -302,13 +302,18 @@ using Org.Mentalis.Files;using System.Runtime.InteropServices;using System.Linq;using System.Collections.Generic;//using Volian.Controls.Library;remove commented out code
@@ -304,1 +304,4 @@using System.Collections.Generic;//using Volian.Controls.Library;using Volian.Base.Library;using VEPROMS.CSLA.Library;Not seeing where this is needed - should this be here?
can't see needing CSLA as a dependency.
@@ -309,3 +314,3 @@namespace ROEditor{/// <summary>/// <summary>Not critical -- but just a side suggestion to make things easier for future possible changes ---- I would suggest reviewing this file and try to fix some of the spacing issues --- there are a lot of items showing as changes that are not actual changes (i.e. removed blank lines or added / removed spaces) -- this makes it difficult to tell what was / wasn't changed and more likely to miss something / make a mistake. It also means that all these items will show up in history as being changed by this project. This could make diagnosing future issues more difficult (i.e. something that may have always been a certain way may appear it was changed with this project.)
@@ -1163,2 +1187,4 @@menuROSave.Enabled = rbtnSave.Enabled;}public void RTBSymbolsOnOff(string nm)It looks like this function isn't called by anything - we should remove code that isn't called.
I removed function
@@ -1165,0 +1212,4 @@}}//EnableDisableSymbolsBtn(sender, new ctlXMLEditEventArgs(args.idName));Remove commented out code,
@@ -1345,0 +1378,4 @@this.tbar = new System.Windows.Forms.ToolBar();this.imageListToolBar = new System.Windows.Forms.ImageList(this.components);this.lblDuplicateRO = new System.Windows.Forms.Label();this.galleryContainerSymbolsCM = new DevComponents.DotNetBar.GalleryContainer();There are all these: galleryContainerSymbolsCM, CM3, galleryContainerSymbolsGrid, etc...
but it looks like the only gallery used is:
galleryContainerSymbols from line 1386
we shouldn't add these if they aren't used.
@@ -2947,0 +3217,4 @@if (nd == null) nd = curele.SelectSingleNode("*/" + nm);if (nd == null)nd = curele.GetCurrentOfMultiFields(curele, nm); // RO Editor add symbols C2022 - 003Should these lines be removed?
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");
@@ -3031,0 +3312,4 @@DevComponents.DotNetBar.ButtonItem btn = new DevComponents.DotNetBar.ButtonItem();btn.Image = symCharBtmp;//btnCM.Text = string.Format("{0}", SymbolNode.SelectSingleNode("unicode").InnerText);remove commented out code
@@ -3031,0 +3323,4 @@btn.FontBold = true;btn.Click += new System.EventHandler(rbtnSymbols_Click);galleryContainerSymbols.SubItems.Add(btn);////galleryContainerSymbolsremove commented out code
Removed
@@ -3057,0 +3453,4 @@// 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 listFont objFont = new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);//Font objFont = new Font("Arial Unicode MS", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);remove commented out code
@@ -3057,0 +3473,4 @@objGraphics.SmoothingMode = SmoothingMode.AntiAlias;objGraphics.TextContrast = 0;objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;//objGraphics.DrawString(txt, objFont, new SolidBrush(Color.FromArgb(102, 102, 102)), 0, 0);remove commented out code
@@ -3057,0 +3478,4 @@objGraphics.Flush();return (objBmpImage);}private void btnSym_Click(object sender, EventArgs e)what does this do? / is this used?
looks like only sets a local variable that is never used?
I removed function. it was used in previous code before RTB.
@@ -3057,0 +3482,4 @@{DevComponents.DotNetBar.ButtonItem b = (DevComponents.DotNetBar.ButtonItem)sender;//if (cbxTextSearchAnnotation.Focused)remove commented out code
@@ -3071,0 +3565,4 @@{DevComponents.DotNetBar.ButtonItem b = (DevComponents.DotNetBar.ButtonItem)sender;ctlXMLEdit2.TextBoxFocus.InsertSymbol(Convert.ToInt32(b.Tag));//StartGridEditing(SelectionOption.Start); // If in a FlexGrid, start the editor for a cellRemove commented out code
@@ -124,6 +128,10 @@<Reference Include="System.Xml"><Name>System.XML</Name></Reference><Reference Include="VEPROMS.CSLA.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">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.
@@ -42,6 +42,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmpRpt", "..\CmpRpt\CmpRpt.{3A4A3543-2D44-11D6-8452-00A0CC271352} = {3A4A3543-2D44-11D6-8452-00A0CC271352}EndProjectSectionEndProjectProject("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D9093FAB-448E-47C7-961B-92B18D85CAF7}"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) )
@@ -2182,10 +2186,13 @@ namespace RODBInterfaceparent.SetAttribute("ChildLoaded", "True");}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 C2022 - 003Where 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.
I removed the line. It might have been a left over from something I was trying.
@@ -111,6 +111,9 @@<Prefer32Bit>false</Prefer32Bit></PropertyGroup><ItemGroup><Reference Include="ctlXMLEditLib">not sure I am understanding why this reference is needed. ctlXMLEdit should depend on RODBInterface instead of the other way around?
removed reference
@@ -315,0 +336,4 @@set{_TextBoxFocus = value;// C2015-017 hide the label indicating user is working with a duplicate of an exiting RONot sure this comment is correct.
Isn't this: // RO Editor add symbols C2022 - 003
@@ -315,0 +337,4 @@{_TextBoxFocus = value;// C2015-017 hide the label indicating user is working with a duplicate of an exiting RO//lblDuplicateRO.Visible = value;Remove commented out code
@@ -481,0 +509,4 @@{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 XMLRemove commented out code
@@ -675,0 +713,4 @@string result1 = "";string Str = "";char[] chrAry = hwnd.Text.ToCharArray();foreach (int chr in chrAry)Can simplify this to have less executions / possibly use LINQ. See recommendations that SonrLint Visual Studio Ext will give.
@@ -675,0 +717,4 @@{if (chr > 166){//Str = @"\u" + ((int)chr).ToString("X4");Remove commented out code
@@ -788,6 +850,125 @@ namespace ctlXMLEditLibreturn (false);}// RO Editor add symbols C2022 - 003see 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.
@@ -791,0 +861,4 @@private static Regex sreg8 = new Regex(@"(\\[^ \\?\r\n\t]+) (?=\\)"); // remove space between tokensprivate static Regex sreg9 = new Regex(@"(\\[^ \\?\r\n\t]+) (?=\r\n)"); // remove space before /r/npublic static string StaticStripRtfCommands(string rtf, bool fromTable)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.
@@ -791,0 +907,4 @@}// RO Editor add symbols C2022 - 003public static string RTFConvertedSymbolsToUnicode(string str)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?
@@ -791,0 +924,4 @@return rtnStr;}public static string StaticReplaceRTFClause(Match m)It looks like this function is never called?
We should remove unused functions.
@@ -891,1 +1073,4 @@Size size = GraphicsHttextbox.Size;mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);//mytextbox.Remove commented out code
@@ -1932,0 +2160,4 @@set { _DisplaySymBolBtn = value; }}}public static class RichTextBoxExtensions // RO Editor add symbols C2022 - 003A new class like this or extending an existing class should be in it's own cs file so it can be found easily. --- also, otherwise it may be difficult to tell when it will work or not.
@@ -1932,0 +2170,4 @@richTextBox.SelectedRtf = RtfPrefixForSymbols + sym + @"}";richTextBox.SelectedRtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033\uc1 }";richTextBox.Select(position, 0);//richTextBox.Select(position, 1); //left here for referenceRemove commented out code
@@ -126,6 +126,10 @@<Reference Include="System.Xml"><Name>System.XML</Name></Reference><Reference Include="Volian.Base.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">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.
I remove the reference
@@ -2155,2 +2160,3 @@s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbolif (!Regex.IsMatch(s2, pattern)) // RO Editor add symbols C2022 - 003Not 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?
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.
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,
@@ -1,18 +1,19 @@using DevComponents.DotNetBar;what is this needed for?
I did not add it. I checked with the Master and it is included.
sorry missed it since the lines were changed. It was previously on line 11. - this is good. I will resolve this item.
@@ -13,3 +14,2 @@using Volian.Base.Library;using JR.Utils.GUI.Forms;using System.Linq;using XYPlots;what is this needed for?
I did not add it. I checked with the Master and XYPlots is included.
sorry missed it since the lines were changed. It was previously on line 10. - this is good. I will resolve this item.
@@ -14,2 +15,2 @@using JR.Utils.GUI.Forms;using System.Linq;using XYPlots;using static System.Net.Mime.MediaTypeNames;what is this needed for?
Not sure how the line got there. I will remove it.
@@ -724,2 +724,4 @@}}public DevComponents.DotNetBar.GalleryContainer BuildSymbolGalleryForRO()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?
I removed the function
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.