B2016-134: WCNTRN format – print of section top message for sub-step with note
This commit is contained in:
		@@ -1094,6 +1094,7 @@ namespace Volian.Print.Library
 | 
			
		||||
				RemoveProcessedParagraphs(myList, yTopNew - yTop);
 | 
			
		||||
				yTop = yTopNew;
 | 
			
		||||
				MyPageHelper.ParaBreaks.Add(paraBreak);
 | 
			
		||||
				ySpaceOnNextPage1 -= paraBreak.GetSectionTopMessageSize();	// B2016-134: Account for wcntraining section top continue on substep containers (notes/cautions)
 | 
			
		||||
				ySpaceOnCurPage = ySpaceOnNextPage1;
 | 
			
		||||
 | 
			
		||||
				//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;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					SectionTopMessage(cb, yTopMargin, yLocation);
 | 
			
		||||
					if (!doSectionTitleContinued || !SectionShowTitles)
 | 
			
		||||
					addExtraLines = SectionTopMessage(cb, yTopMargin, yLocation);		// this does wcntraining top section continue message
 | 
			
		||||
					if (!addExtraLines && (!doSectionTitleContinued || !SectionShowTitles))
 | 
			
		||||
						addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null);
 | 
			
		||||
 | 
			
		||||
					if (CompressPartOfStep)
 | 
			
		||||
@@ -1962,16 +1962,31 @@ namespace Volian.Print.Library
 | 
			
		||||
			ProfileTimer.Pop(profileDepth);
 | 
			
		||||
			return yPageStart;
 | 
			
		||||
		}
 | 
			
		||||
		// 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 void SectionTopMessage(PdfContentByte cb, float yTopMargin, float yLocation)
 | 
			
		||||
		private float GetSectionTopMessageSize()
 | 
			
		||||
		{
 | 
			
		||||
			// 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)
 | 
			
		||||
			{
 | 
			
		||||
				float sectMsgY = CalculateYLocation(YTop, yTopMargin);
 | 
			
		||||
				if (MyPageHelper.YMultiplier != 1)
 | 
			
		||||
				if (PartsContainer != null && PartsContainer.Count > 0) retval = SixLinesPerInch * 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;
 | 
			
		||||
				string scttop = null;
 | 
			
		||||
@@ -1985,6 +2000,7 @@ namespace Volian.Print.Library
 | 
			
		||||
				vlnText mySectMsg = new vlnText(cb, this, scttop, scttop, sctcntrX, sectMsgY, sctMsgFont);
 | 
			
		||||
				PartsLeft.Add(mySectMsg);
 | 
			
		||||
			}
 | 
			
		||||
			return addextra;
 | 
			
		||||
		}
 | 
			
		||||
		// 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.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user