Use GetJustRoDb to reduce unnecessary data loading
Added flag to allow the section to have optional content. Optional Content flag eliminates message "No Section Content" Handle RO_Lookup Page Token
This commit is contained in:
parent
96b1edb78f
commit
398972fab1
@ -229,7 +229,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
byte[] ab = r.ReadBytes((int)fsIn.Length);
|
byte[] ab = r.ReadBytes((int)fsIn.Length);
|
||||||
fsIn.Close();
|
fsIn.Close();
|
||||||
|
|
||||||
using (RODb rodb = RODb.Get(rdi.RODbID))
|
using (RODb rodb = RODb.GetJustRoDb(rdi.RODbID))
|
||||||
{
|
{
|
||||||
using (ROImageInfoList myROImages = ROImageInfoList.GetByRODbID(rdi.RODbID))
|
using (ROImageInfoList myROImages = ROImageInfoList.GetByRODbID(rdi.RODbID))
|
||||||
{
|
{
|
||||||
|
@ -154,6 +154,18 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
#region OptionalSectionContent
|
||||||
|
[Category("Miscellaneous")]
|
||||||
|
[Description("Section Optional Content")]
|
||||||
|
private LazyLoad<bool> _OptionalSectionContent;
|
||||||
|
public bool OptionalSectionContent
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _OptionalSectionContent, "@OptionalSectionContent");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region SpecialStepsFoldout
|
#region SpecialStepsFoldout
|
||||||
[Category("Miscellaneous")]
|
[Category("Miscellaneous")]
|
||||||
[Description("Section Special Steps Foldout")]
|
[Description("Section Special Steps Foldout")]
|
||||||
|
@ -733,7 +733,7 @@ namespace Volian.Print.Library
|
|||||||
float yPageStart = yTopMargin;
|
float yPageStart = yTopMargin;
|
||||||
if (myItemInfo.HasChildren)
|
if (myItemInfo.HasChildren)
|
||||||
localYPageStart = myParagraph.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
localYPageStart = myParagraph.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||||
else
|
else if(!myItemInfo.MyDocStyle.OptionalSectionContent)
|
||||||
PrintTextMessage(cb, "No Section Content", _TextLayer);
|
PrintTextMessage(cb, "No Section Content", _TextLayer);
|
||||||
SectionConfig.SectionPagination sp = SectionConfig.SectionPagination.Separate; // always the default
|
SectionConfig.SectionPagination sp = SectionConfig.SectionPagination.Separate; // always the default
|
||||||
if ( section.NextItemCount > 0)
|
if ( section.NextItemCount > 0)
|
||||||
|
@ -746,7 +746,12 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
ProcessPaglistToken(section, svgGroup, pageItem, ref useFontForCheckOffHeader, ref plstr, token);
|
ProcessPaglistToken(section, svgGroup, pageItem, ref useFontForCheckOffHeader, ref plstr, token);
|
||||||
} // end foreach matches
|
} // end foreach matches
|
||||||
|
if (plstr.StartsWith("RO_Lookup("))
|
||||||
|
{
|
||||||
|
string parms = plstr.Substring(10,plstr.Length-11);
|
||||||
|
string[] parts = parms.Split(",".ToCharArray());
|
||||||
|
plstr = ROLookup(parts[0], parts[1], parts[2]);
|
||||||
|
}
|
||||||
if (plstr != "")
|
if (plstr != "")
|
||||||
{
|
{
|
||||||
if (useFontForCheckOffHeader != null)
|
if (useFontForCheckOffHeader != null)
|
||||||
@ -768,7 +773,18 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
if (svgGroup.Count>0) mySvg.Add(svgGroup);
|
if (svgGroup.Count>0) mySvg.Add(svgGroup);
|
||||||
}
|
}
|
||||||
|
private string ROLookup(string accpageid, string multiid, string deflt)
|
||||||
|
{
|
||||||
|
ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup;
|
||||||
|
string val = myLookup.GetROValueByAccPagID("<" + accpageid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||||
|
if (val != null)
|
||||||
|
{
|
||||||
|
if (deflt.StartsWith("[") && !val.StartsWith("[")) val = "[" + val + "]";
|
||||||
|
if (deflt.EndsWith("*")) val = val + "*";
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
return deflt;
|
||||||
|
}
|
||||||
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)
|
||||||
{
|
{
|
||||||
// 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user