Lettered HLS Tab Fix, Method to remove symbol chars from HLS Tabs (used for Transitions)

This commit is contained in:
John Jenko 2011-11-21 20:48:53 +00:00
parent 897d213fa3
commit 52aa2ca5de

View File

@ -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
{