This commit is contained in:
@@ -316,20 +316,29 @@ namespace Volian.Print.Library
|
||||
}
|
||||
return PrintProcedureOrFoldout(myProcedure, null, outputFileName);
|
||||
}
|
||||
// Find the last section that has a Final Message defined in its format
|
||||
// Return that section's itemID or a -1 if the Final Message is not defined
|
||||
|
||||
// See if the last non Foldout Section has a Final Message.
|
||||
private int GetFinalMessageSectionID(ProcedureInfo myProcedure, bool doingFoldout)
|
||||
{
|
||||
int sectionID = -1;
|
||||
if (!doingFoldout)
|
||||
{
|
||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||
// Work backwards because we don't want to include any foldouts. Find the last section that is not
|
||||
// a foldout. If it has a final message, this is the 'last section' and should have a final message.
|
||||
// If it doesn't have a final message, then none should be printed.
|
||||
int cntSect = myProcedure.Sections.Count;
|
||||
for (int i = cntSect - 1; i >= 0; i--)
|
||||
{
|
||||
if (mySection.MyDocStyle.Final.Message != null && mySection.MyDocStyle.Final.Message.Length > 0)
|
||||
sectionID = mySection.ItemID;
|
||||
SectionInfo mySection = myProcedure.Sections[i] as SectionInfo;
|
||||
if (!mySection.DisplayText.ToUpper().Contains("FOLDOUT"))
|
||||
{
|
||||
if (mySection.MyDocStyle.Final != null && mySection.MyDocStyle.Final.Message != null && mySection.MyDocStyle.Final.Message.Length > 0)
|
||||
return mySection.ItemID;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return sectionID;
|
||||
return -1;
|
||||
}
|
||||
private bool _AllowAllWatermarks = false;
|
||||
public bool AllowAllWatermarks
|
||||
|
Reference in New Issue
Block a user