diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 5571113d..216f826f 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -126,6 +126,7 @@ namespace Volian.Print.Library // reset the document style off of this section AND reset docstyle values used. if ((MySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0) { + //Console.WriteLine("{0} ResetDocStyleAndValues", MySection.MyDocStyle.Name); ItemInfo ii = (ItemInfo) MySection; int indx = (int)MySection.MyDocStyle.IndexOtherThanFirstPage; foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList) @@ -448,8 +449,9 @@ namespace Volian.Print.Library get { return _MyPromsPrinter; } set { _MyPromsPrinter = value; } } - public VlnSvgPageHelper(VEPROMS.CSLA.Library.SectionInfo mySection,PromsPrinter myPromsPrinter) : base() + public VlnSvgPageHelper(VEPROMS.CSLA.Library.SectionInfo mySection,PromsPrinter myPromsPrinter,string hlsText) : base() { + HLSText = hlsText; MySection = mySection; MyPromsPrinter = myPromsPrinter; } @@ -661,6 +663,8 @@ namespace Volian.Print.Library public Dictionary PgLogicals; private void AddPageListItems(Volian.Svg.Library.Svg mySvg, VEPROMS.CSLA.Library.PageStyle pageStyle, VEPROMS.CSLA.Library.SectionInfo section) { + //Console.WriteLine("{0}", section.ActiveFormat.Name); + //Console.WriteLine("{0} pgstyle {1} section", pageStyle.Name,section.DisplayText); if (PgLogicals == null) PgLogicals = new Dictionary(); else PgLogicals.Clear(); @@ -682,6 +686,9 @@ namespace Volian.Print.Library //float rowAdj = 0; // = 18; foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems) { + //if (pageItem.Token.Contains("HLSTEXT")) + // Console.WriteLine("{0} - PageList Token", pageItem.Token); + VE_Font useFontForCheckOffHeader = null; if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& (pageItem.Row < 0))) { @@ -792,8 +799,25 @@ namespace Volian.Print.Library } return deflt; } + private bool _HasHLSText = false; + public bool HasHLSText + { + get { return _HasHLSText; } + set { _HasHLSText = value; } + } + private string _HLSText = ""; + public string HLSText + { + get { return _HLSText; } + set + { + if (_HLSText == "") + _HLSText = value; + } + } private void ProcessPaglistToken(VEPROMS.CSLA.Library.SectionInfo section, SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, ref VE_Font useFontForCheckOffHeader, ref string plstr, string token) { + //Console.WriteLine("{0} ProcessPagelistToken", token); // Paglist token inside a PS= conditional are surrounded by square brackets instead of curley // ex. [BOX3] instead of {BOX3}, thus the redunant looking cases switch (token) @@ -903,8 +927,14 @@ namespace Volian.Print.Library case "[PREDELIMEOPNUM]": string eopnum = section.MyProcedure.MyContent.Number; string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber; + string unitname = MySection.MyDocVersion.DocVersionConfig.Unit_Name; if (unitnum.Length > 0) - eopnum = unitnum.Replace("#", eopnum); + { + if (unitnum.Contains("#")) + eopnum = unitnum.Replace("#", eopnum); + if (unitnum.Contains("!")) + eopnum = unitnum.Replace("!", unitname); + } if (token.Equals("{PREDELIMEOPNUM}")) { // only use up to the first non-alphanumeric character of the procedur number @@ -944,6 +974,11 @@ namespace Volian.Print.Library useFontForCheckOffHeader = vf; PageListCheckOffHeader = PageItemToSvgText(pageItem, pageItem.Token, vf, section); break; + case "{HLSTEXT}": + HasHLSText = true; + plstr = plstr.Replace(token, HLSText); + Console.WriteLine("'{0}' pagelist", plstr); + break; default: if (token.Contains(@"RO-")) {