Logic to support the {HLSTEXT} token and to replace a “!” character with a Unit Name
This commit is contained in:
parent
f963dfc03c
commit
32ea07da99
@ -126,6 +126,7 @@ namespace Volian.Print.Library
|
|||||||
// reset the document style off of this section AND reset docstyle values used.
|
// reset the document style off of this section AND reset docstyle values used.
|
||||||
if ((MySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
if ((MySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
||||||
{
|
{
|
||||||
|
//Console.WriteLine("{0} ResetDocStyleAndValues", MySection.MyDocStyle.Name);
|
||||||
ItemInfo ii = (ItemInfo) MySection;
|
ItemInfo ii = (ItemInfo) MySection;
|
||||||
int indx = (int)MySection.MyDocStyle.IndexOtherThanFirstPage;
|
int indx = (int)MySection.MyDocStyle.IndexOtherThanFirstPage;
|
||||||
foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
|
foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
|
||||||
@ -448,8 +449,9 @@ namespace Volian.Print.Library
|
|||||||
get { return _MyPromsPrinter; }
|
get { return _MyPromsPrinter; }
|
||||||
set { _MyPromsPrinter = value; }
|
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;
|
MySection = mySection;
|
||||||
MyPromsPrinter = myPromsPrinter;
|
MyPromsPrinter = myPromsPrinter;
|
||||||
}
|
}
|
||||||
@ -661,6 +663,8 @@ namespace Volian.Print.Library
|
|||||||
public Dictionary<string, bool> PgLogicals;
|
public Dictionary<string, bool> PgLogicals;
|
||||||
private void AddPageListItems(Volian.Svg.Library.Svg mySvg, VEPROMS.CSLA.Library.PageStyle pageStyle, VEPROMS.CSLA.Library.SectionInfo section)
|
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<string, bool>();
|
if (PgLogicals == null) PgLogicals = new Dictionary<string, bool>();
|
||||||
else PgLogicals.Clear();
|
else PgLogicals.Clear();
|
||||||
|
|
||||||
@ -682,6 +686,9 @@ namespace Volian.Print.Library
|
|||||||
//float rowAdj = 0; // = 18;
|
//float rowAdj = 0; // = 18;
|
||||||
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
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;
|
VE_Font useFontForCheckOffHeader = null;
|
||||||
if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& (pageItem.Row < 0)))
|
if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& (pageItem.Row < 0)))
|
||||||
{
|
{
|
||||||
@ -792,8 +799,25 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
return deflt;
|
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)
|
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
|
// Paglist token inside a PS= conditional are surrounded by square brackets instead of curley
|
||||||
// ex. [BOX3] instead of {BOX3}, thus the redunant looking cases
|
// ex. [BOX3] instead of {BOX3}, thus the redunant looking cases
|
||||||
switch (token)
|
switch (token)
|
||||||
@ -903,8 +927,14 @@ namespace Volian.Print.Library
|
|||||||
case "[PREDELIMEOPNUM]":
|
case "[PREDELIMEOPNUM]":
|
||||||
string eopnum = section.MyProcedure.MyContent.Number;
|
string eopnum = section.MyProcedure.MyContent.Number;
|
||||||
string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber;
|
string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber;
|
||||||
|
string unitname = MySection.MyDocVersion.DocVersionConfig.Unit_Name;
|
||||||
if (unitnum.Length > 0)
|
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}"))
|
if (token.Equals("{PREDELIMEOPNUM}"))
|
||||||
{
|
{
|
||||||
// only use up to the first non-alphanumeric character of the procedur number
|
// only use up to the first non-alphanumeric character of the procedur number
|
||||||
@ -944,6 +974,11 @@ namespace Volian.Print.Library
|
|||||||
useFontForCheckOffHeader = vf;
|
useFontForCheckOffHeader = vf;
|
||||||
PageListCheckOffHeader = PageItemToSvgText(pageItem, pageItem.Token, vf, section);
|
PageListCheckOffHeader = PageItemToSvgText(pageItem, pageItem.Token, vf, section);
|
||||||
break;
|
break;
|
||||||
|
case "{HLSTEXT}":
|
||||||
|
HasHLSText = true;
|
||||||
|
plstr = plstr.Replace(token, HLSText);
|
||||||
|
Console.WriteLine("'{0}' pagelist", plstr);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (token.Contains(@"RO-"))
|
if (token.Contains(@"RO-"))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user