diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 580ab014..ae1eebbc 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -137,7 +137,7 @@ namespace Volian.Controls.Library // lines (the 2 spaces after the first "\par " command and 1 space before 2nd "\par"). Tried other // combinations that did not work. if (_MyItemInfo.FormatStepData.Prefix != null && _MyItemInfo.FormatStepData.Prefix != "") - text = ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Prefix) + @"\par " + text + @" \par "; + text = ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Prefix) + @"\par " + text + @"\par "; if (_MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "") text = text + ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Suffix); } @@ -199,6 +199,12 @@ namespace Volian.Controls.Library // actual edit mode are replace words left as is. if (wordsShouldBeReplaced) text = DoReplaceWords2(text); + if (_MyItemInfo != null) + { + text = DoSearchAndReplace(text, "", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID); + text = text.Replace(@"", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID); + text = text.Replace("", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number); + } // Adjust RO display if (ROsShouldBeAdjusted) text = DoTransitionAdjustments(text); @@ -253,9 +259,13 @@ namespace Volian.Controls.Library indxsym = NextUnicode(text, indxsym + incrindx);//text.IndexOf(@"\u", indxsym + incrindx); } } - return text; } + + private string DoSearchAndReplace(string text, string find, string replace) + { + return text.Replace(find, replace); + } private static string DoColorLinks(string text) { string origtext = text; @@ -1581,6 +1591,7 @@ namespace Volian.Controls.Library #endregion public class FoundMatches : SortedList { + private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private string _Text; public FoundMatches(string text) : base()