Adjust HLS width (checklist header) and DocStyle:page length for pagination

Display message box after formats/genmacs are copied
Improve checklist pagination
Improve checklist pagination & right checklist box line alignment
This commit is contained in:
2014-09-24 14:47:36 +00:00
parent 2c6eeee66c
commit 881cbe5bdd
4 changed files with 48 additions and 14 deletions

View File

@@ -101,9 +101,12 @@ namespace Volian.Print.Library
float mySize = YSize * MyPageHelper.YMultiplier;
vlnParagraph firstChild = ChildrenBelow.Count > 0 ? ChildrenBelow[0] : null;
// Steps that have the smart template (the WCNCKL format for example), always include two children.
if (MyItemInfo.IsHigh && MyItemInfo.FormatStepData.UseSmartTemplate && ChildrenBelow.Count > 1)
firstChild = ChildrenBelow[1];
if (firstChild != null && firstChild.MyItemInfo != null && !firstChild.MyItemInfo.IsNumbered) // If not numbered get the last child
if (MyItemInfo.IsHigh && MyItemInfo.FormatStepData.UseSmartTemplate) //
{
if (ChildrenBelow.Count > 1)
firstChild = ChildrenBelow[1];
}
else if (firstChild != null && firstChild.MyItemInfo != null && !firstChild.MyItemInfo.IsNumbered) // If not numbered get the last child
firstChild = firstChild.MyParent.ChildrenBelow[firstChild.MyParent.ChildrenBelow.Count - 1];
float ySizeIncludingFirst = firstChild == null ? YSize : firstChild.YSize + (firstChild.YTopMost - YTopMost);
bool KeepStepsOnPage = MyItemInfo.ActiveFormat.MyStepSectionLayoutData.KeepStepsOnPage;
@@ -490,7 +493,17 @@ namespace Volian.Print.Library
// OR there are page breaks for HLS/cautions/notes remaining, typically for backgrounds (PageBreakOnStepList.Count > 0)
vlnParagraph paraBreak = null;
float accountForCalvertAlarmConditionResponseFooter = 0;
//if (MyItemInfo.InList(122358,122610,125485,125613)) Console.WriteLine("here");
// The following code determines space required by the Checklist header (Wolf Creek) if a break occurs
// Their 2 HLS that define the checklists have 'UseSmartTemplate'.
float accountForSmartTemplateHeader = 0;
if (MyItemInfo.FormatStepData.UseSmartTemplate)
{
if (((MyItemInfo.MyDocStyle.End.Message ?? "") == "") || MyItemInfo.MyHLS.GetNextItem() != null)
ySpaceOnCurPage += SixLinesPerInch;
accountForSmartTemplateHeader = Height - (2 * SixLinesPerInch);
}
while (((YSize - yTop) > (ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter)) || PageBreakOnStepList.Count > 0)
{
float ySpaceOnCurPageSave = ySpaceOnCurPage;
@@ -500,8 +513,8 @@ namespace Volian.Print.Library
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
//Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release
if (lastBreak != null && lastBreak.MyItemInfo.InList(80091))
Console.WriteLine("After 80091 {0}",paraBreak.ToString());
//if (lastBreak != null && lastBreak.MyItemInfo.InList(80091, 1985))
// Console.WriteLine("After 80091 {0}",paraBreak.ToString());
if (paraBreak == null)
{
if (DebugPagination.IsOpen) DebugPagination.WriteLine("<<< ERROR >>> Cannot find a place to break ==>,{0},'{1}','{2}',{3},{4}"
@@ -666,6 +679,8 @@ namespace Volian.Print.Library
yTop = yTopNew;
MyPageHelper.ParaBreaks.Add(paraBreak);
ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
ySpaceOnCurPage -= accountForSmartTemplateHeader;
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
//if (paraBreak.YTopMost != paraBreak.YVeryTop && MyPageHelper.TopMessage == null && MyPageHelper.BottomMessage == null)
// ySpaceOnCurPage = yPageSize;