From 52aa2ca5de60caaedccc2d6f661f1df18eb2cea8 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 21 Nov 2011 20:48:53 +0000 Subject: [PATCH] Lettered HLS Tab Fix, Method to remove symbol chars from HLS Tabs (used for Transitions) --- .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 34146cea..807c2dc4 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1844,7 +1844,14 @@ namespace VEPROMS.CSLA.Library _ActiveSection = value; } } + //private int _PageNumForDocStyle = 0; + //public int PageNumForDocStyle + //{ + // get { return _PageNumForDocStyle; } + // set { _PageNumForDocStyle = value; } + //} private DocStyle _MyDocStyle; + //private DocStyle _MyDocStyleOtherThanFirstPage; public DocStyle MyDocStyle { get @@ -1854,8 +1861,25 @@ namespace VEPROMS.CSLA.Library int typ = (int)ActiveSection.MyContent.Type; int subtyp = typ % 10000; _MyDocStyle = ActiveFormat.PlantFormat.DocStyles.DocStyleList[subtyp]; + // if (((MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) != 0) && PageNumForDocStyle > 1) + // { + // if (_MyDocStyleOtherThanFirstPage == null) + // { + // foreach (DocStyle ds in ActiveFormat.PlantFormat.DocStyles.DocStyleList) + // { + // if ((ds.StructureStyle.Where & E_DocStyleUse.UseOnAllButFirstPage) != 0) + // { + // _MyDocStyleOtherThanFirstPage = ds; + // break; + // } + // } + // } + // } } - return _MyDocStyle; + //if (PageNumForDocStyle <= 1) + return _MyDocStyle; + //else + // return _MyDocStyleOtherThanFirstPage; } } private FormatInfo _ActiveFormat = null; @@ -2186,6 +2210,8 @@ namespace VEPROMS.CSLA.Library par = par.MyParent; } bias = 0; + if (par.FormatStepData.TabData.IdentPrint.Contains("{ALPHA}")) + level--; // ImperfectStructure is used so that the sequential numbering for substeps under an RNO is not same // numbering (alpha vs numeric), if the HLS has substeps - WCN uses this, as well as other plants. @@ -2597,6 +2623,16 @@ namespace VEPROMS.CSLA.Library MyFont = font; } public int Offset; + private static Regex _ReplaceSymbols = new Regex("^[^0-9A-Za-z]*"); // trim anything that isn't an ascii alpha/numeric from the beginning + public string CleanTextNoSymbols + { + get + { + // this trims off any symbols at the start of the tab + return _ReplaceSymbols.Replace(CleanText, ""); + } + } + } public class Header : MetaTag {