B2016-134: WCNTRN format – print of section top message for sub-step with note
This commit is contained in:
parent
2f81c9c85f
commit
c92fee3ab1
@ -1094,6 +1094,7 @@ namespace Volian.Print.Library
|
|||||||
RemoveProcessedParagraphs(myList, yTopNew - yTop);
|
RemoveProcessedParagraphs(myList, yTopNew - yTop);
|
||||||
yTop = yTopNew;
|
yTop = yTopNew;
|
||||||
MyPageHelper.ParaBreaks.Add(paraBreak);
|
MyPageHelper.ParaBreaks.Add(paraBreak);
|
||||||
|
ySpaceOnNextPage1 -= paraBreak.GetSectionTopMessageSize(); // B2016-134: Account for wcntraining section top continue on substep containers (notes/cautions)
|
||||||
ySpaceOnCurPage = ySpaceOnNextPage1;
|
ySpaceOnCurPage = ySpaceOnNextPage1;
|
||||||
|
|
||||||
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||||
|
@ -1664,8 +1664,8 @@ namespace Volian.Print.Library
|
|||||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SectionTopMessage(cb, yTopMargin, yLocation);
|
addExtraLines = SectionTopMessage(cb, yTopMargin, yLocation); // this does wcntraining top section continue message
|
||||||
if (!doSectionTitleContinued || !SectionShowTitles)
|
if (!addExtraLines && (!doSectionTitleContinued || !SectionShowTitles))
|
||||||
addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null);
|
addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null);
|
||||||
|
|
||||||
if (CompressPartOfStep)
|
if (CompressPartOfStep)
|
||||||
@ -1962,16 +1962,31 @@ namespace Volian.Print.Library
|
|||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
return yPageStart;
|
return yPageStart;
|
||||||
}
|
}
|
||||||
// For WCNTRN (Wolf Creek Training format): the following prints the section number (and continued, if
|
private float GetSectionTopMessageSize()
|
||||||
// section is continued from previous page) in the Responsibility column.
|
|
||||||
private void SectionTopMessage(PdfContentByte cb, float yTopMargin, float yLocation)
|
|
||||||
{
|
{
|
||||||
|
// B2016-134: Account for wcntraining section top continue if item has container
|
||||||
|
float retval = 0;
|
||||||
if (MyItemInfo.MyDocStyle.SectTop != null && MyItemInfo.MyDocStyle.SectTop.Message != null)
|
if (MyItemInfo.MyDocStyle.SectTop != null && MyItemInfo.MyDocStyle.SectTop.Message != null)
|
||||||
{
|
{
|
||||||
float sectMsgY = CalculateYLocation(YTop, yTopMargin);
|
if (PartsContainer != null && PartsContainer.Count > 0) retval = SixLinesPerInch * 1;
|
||||||
if (MyPageHelper.YMultiplier != 1)
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
// For WCNTRN (Wolf Creek Training format): the following prints the section number (and continued, if
|
||||||
|
// section is continued from previous page) in the Responsibility column.
|
||||||
|
private bool SectionTopMessage(PdfContentByte cb, float yTopMargin, float yLocation)
|
||||||
|
{
|
||||||
|
bool addextra = false;
|
||||||
|
if (MyItemInfo.MyDocStyle.SectTop != null && MyItemInfo.MyDocStyle.SectTop.Message != null)
|
||||||
|
{
|
||||||
|
float sectMsgY = 0;
|
||||||
|
if (PartsContainer == null || PartsContainer.Count==0)
|
||||||
|
sectMsgY = CalculateYLocation(YTop, yTopMargin);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
sectMsgY = -1 + yTopMargin - (yTopMargin - yLocation) * MyPageHelper.YMultiplier;
|
// B2016-134: Account for section top continue if item has container, i.e. move section top continue message above the container
|
||||||
|
sectMsgY = CalculateYLocation(YTopMost-(SixLinesPerInch*3), yTopMargin); // 3 is # of lines: header, box, blank line moving up page
|
||||||
|
addextra = true;
|
||||||
}
|
}
|
||||||
VE_Font sctMsgFont = MyItemInfo.MyDocStyle.SectTop.Font;
|
VE_Font sctMsgFont = MyItemInfo.MyDocStyle.SectTop.Font;
|
||||||
string scttop = null;
|
string scttop = null;
|
||||||
@ -1985,6 +2000,7 @@ namespace Volian.Print.Library
|
|||||||
vlnText mySectMsg = new vlnText(cb, this, scttop, scttop, sctcntrX, sectMsgY, sctMsgFont);
|
vlnText mySectMsg = new vlnText(cb, this, scttop, scttop, sctcntrX, sectMsgY, sctMsgFont);
|
||||||
PartsLeft.Add(mySectMsg);
|
PartsLeft.Add(mySectMsg);
|
||||||
}
|
}
|
||||||
|
return addextra;
|
||||||
}
|
}
|
||||||
// Added to try to resolve a problem when printing FNP-1-FRP-I.3 Attachment 3 Table 1.
|
// Added to try to resolve a problem when printing FNP-1-FRP-I.3 Attachment 3 Table 1.
|
||||||
// May be needed to evaluate this problem in the future.
|
// May be needed to evaluate this problem in the future.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user