From 5dc41a738be28b7deade4e3288ae243755c2e738 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 6 Mar 2015 13:31:06 +0000 Subject: [PATCH] Added code to DoTopContinueMsg for UseStepTabs flag (Comanche Peak Step Headers) --- PROMS/Volian.Print.Library/vlnParagraph.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 0becce26..51d717fb 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1734,6 +1734,33 @@ namespace Volian.Print.Library private bool DoTopContinueMsg(PdfContentByte cb, ref float yPageStart, float yTopMargin, DocStyle docstyle, string subTab) { bool addExtraLine = false; + if ((bool)docstyle.Continue.Top.UseStepTabs) + { + // UseStepTabs is a format flag added for Comanche Peak to print out step tabs as + // a top comtinue message. This code will go up through parents putting out + // their tabs - at this y location, but at the tabs' x location + vlnParagraph myPar = this; + MyPageHelper.TopMessageRs = new List(); + while (!myPar.MyItemInfo.IsHigh) + { + myPar = myPar.MyParent; + foreach (vlnPrintObject vpo in myPar.PartsLeft) + { + if (vpo is vlnTab) + { + vlnTab vt = vpo as vlnTab; + string cltxt = vt.Text; + cltxt = cltxt.Replace("*", " "); // the customer did not want the '*' + // replace C# representation of unicode character "\u25CF" which is hex + // with the rtf representation @"\u9679?" + if (cltxt.Contains("\u25CF")) cltxt = cltxt.Replace("\u25CF", @"\u9679?"); // handle a bullet, if it isn't unicode yet + MyPageHelper.TopMessageRs.Add(new vlnText(cb, this, cltxt, cltxt, vt.XOffset, yTopMargin, vt.MyFont)); + } + } + } + return false; + } + string myMsg = docstyle.Continue.Top.Message; MyPageHelper.TopMessageRs = new List(); if (myMsg != null && myMsg != "")