diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 4ae0d6ac..6f79e8b2 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -131,10 +131,31 @@ namespace Volian.Controls.Library int typ = ((int)itemInfo.MyContent.Type) % 10000; bool tableHasBorder = tableShouldBeOutlined ? itemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[typ].Type.IndexOf(@"Borderless") < 0 : false; bool ROsShouldBeAdjusted = wordsShouldBeReplaced; // same logical value - + if (epMode == E_EditPrintMode.Print && _MyItemInfo.IsStep) + { + if (_MyItemInfo.FormatStepData.Prefix != null && _MyItemInfo.FormatStepData.Prefix != "") + text = ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Prefix) + @"\par " + text + @"\par "; + if (_MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "") + text = text + ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Suffix); + } text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted); StartText = text; } + private string ReplaceLinesWithUnicode(string text) + { + text = text.Replace("\x2500", @"\u9472?"); // Horizontal + text = text.Replace("\x2502", @"\u9474?"); // Vertical + text = text.Replace("\x2514", @"\u9492?"); // Bottom Left Corner + text = text.Replace("\x2518", @"\u9496?"); // Bottom Right Corner + text = text.Replace("\x2534", @"\u9524?"); // Bottom Tee + text = text.Replace("\x250c", @"\u9484?"); // Upper Left Corner + text = text.Replace("\x251c", @"\u9500?"); // Left Tee + text = text.Replace("\x2510", @"\u9488?"); // Upper Right Corner + text = text.Replace("\x252c", @"\u9516?"); // Top Tee + text = text.Replace("\x2524", @"\u9508?"); // Right Tee + text = text.Replace("\x253c", @"\u9532?"); // Plus + return text; + } public DisplayText(string text, VE_Font vFont, bool colorLinks) { TextFont = vFont; @@ -228,6 +249,7 @@ namespace Volian.Controls.Library indxsym = NextUnicode(text, indxsym + incrindx);//text.IndexOf(@"\u", indxsym + incrindx); } } + return text; } private static string DoColorLinks(string text)