Note/Caution/Warning x-offset & width adjustments; Continue message location for ‘Purpose, Entry Conditions, Precautions’
BGE: Don’t add bullet to top continue message with tab (it prints as funny character) BGE: Support for BottomSectionContinue flag in their ‘Purpose, Entry Conditions, Precautions’ sections.
This commit is contained in:
parent
34dbe75fca
commit
b78eb92448
@ -515,6 +515,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
string pTab = parTab == null ? "" : parTab;
|
string pTab = parTab == null ? "" : parTab;
|
||||||
string thisTab = itemInfo.MyTab.CleanText.Trim();
|
string thisTab = itemInfo.MyTab.CleanText.Trim();
|
||||||
|
if (thisTab != null && thisTab != "" && !char.IsLetterOrDigit(thisTab[0])) return pTab;
|
||||||
if (itemInfo.FormatStepData.NumberWithLevel) pTab = itemInfo.MyHLS.MyTab.CleanText.Trim();
|
if (itemInfo.FormatStepData.NumberWithLevel) pTab = itemInfo.MyHLS.MyTab.CleanText.Trim();
|
||||||
// if the parent tab ends with a alphanumeric and this tab is alphanumeric, add a '.' to separate them
|
// if the parent tab ends with a alphanumeric and this tab is alphanumeric, add a '.' to separate them
|
||||||
bool ms = pTab != "" && char.IsLetterOrDigit(pTab.TrimEnd()[pTab.Length - 1]); // parent tab ends with alphanumeric
|
bool ms = pTab != "" && char.IsLetterOrDigit(pTab.TrimEnd()[pTab.Length - 1]); // parent tab ends with alphanumeric
|
||||||
|
@ -857,6 +857,7 @@ namespace Volian.Print.Library
|
|||||||
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
|
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
|
||||||
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
|
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
|
||||||
bool doSectionTitleContinued = false; // will add " Continued" to the section title if format flag is set
|
bool doSectionTitleContinued = false; // will add " Continued" to the section title if format flag is set
|
||||||
|
DocStyle docstyle = null;
|
||||||
switch (paginate)
|
switch (paginate)
|
||||||
{
|
{
|
||||||
case 0: // No page break
|
case 0: // No page break
|
||||||
@ -871,6 +872,9 @@ namespace Volian.Print.Library
|
|||||||
break;
|
break;
|
||||||
case 1: // Break on High Level Step
|
case 1: // Break on High Level Step
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
|
docstyle = MyItemInfo.MyDocStyle;
|
||||||
|
bool doSectionContinue = ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue);
|
||||||
|
if (doSectionContinue) DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle);
|
||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
//_MyLog.InfoFormat("NewPage 10 {0}", cb.PdfWriter.CurrentPageNumber);
|
//_MyLog.InfoFormat("NewPage 10 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
if (MyItemInfo.IsSection && MyParent != null && MyParent.MyItemInfo.IsSection && (MyItemInfo as SectionInfo).IsSeparatePagination())
|
if (MyItemInfo.IsSection && MyParent != null && MyParent.MyItemInfo.IsSection && (MyItemInfo as SectionInfo).IsSeparatePagination())
|
||||||
@ -907,6 +911,7 @@ namespace Volian.Print.Library
|
|||||||
yPageStart = yTopMargin + YTopMost;
|
yPageStart = yTopMargin + YTopMost;
|
||||||
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
||||||
|
|
||||||
|
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle);
|
||||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||||
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||||
{
|
{
|
||||||
@ -917,105 +922,8 @@ namespace Volian.Print.Library
|
|||||||
break;
|
break;
|
||||||
case 2: // Break within a Step
|
case 2: // Break within a Step
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
DocStyle docstyle = MyItemInfo.MyDocStyle;
|
docstyle = MyItemInfo.MyDocStyle;
|
||||||
string myMsg = docstyle.Continue.Bottom.Message;
|
DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle);
|
||||||
|
|
||||||
// a format flag exists that states to only put a BOTTOM message if it is a certain type (RNO)
|
|
||||||
// check for this....
|
|
||||||
bool RNOContinueOnly = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly;
|
|
||||||
bool doBottom = !RNOContinueOnly || (MyItemInfo.IsInRNO && RNOContinueOnly);
|
|
||||||
if (doBottom && myMsg != null && myMsg != "")
|
|
||||||
{
|
|
||||||
myMsg = ReplaceStepBottomContinue(myMsg);
|
|
||||||
float msg_yLocation = 0;
|
|
||||||
if (myMsg.Contains("{par}"))
|
|
||||||
{
|
|
||||||
myMsg = myMsg.Replace("{par}", "");
|
|
||||||
msg_yLocation = -SixLinesPerInch;
|
|
||||||
}
|
|
||||||
float yBtmMarginForMsg = yBottomMargin;
|
|
||||||
|
|
||||||
// one of the format flags for FNP had an adjustment for printing the section title only
|
|
||||||
// on the first page of the section. Adjust the location of the bottom continue message
|
|
||||||
// if this adjustment was made (the current topmargin may not reflect the value within
|
|
||||||
// the document style)
|
|
||||||
if (MyPageHelper.PrintedSectionPage > 0)
|
|
||||||
{
|
|
||||||
if ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst)
|
|
||||||
{
|
|
||||||
float localYTopMargin = 792 - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.TopMargin;
|
|
||||||
yBtmMarginForMsg = Math.Max(0, localYTopMargin - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.PageLength);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// include space for phone list when determining bottom continue message location
|
|
||||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList && MyPageHelper.PhoneListHeight != 0)
|
|
||||||
yBtmMarginForMsg += (MyPageHelper.PhoneListHeight - vlnPrintObject.SixLinesPerInch);
|
|
||||||
switch (docstyle.Continue.Bottom.Location)
|
|
||||||
{
|
|
||||||
case E_ContBottomLoc.EndOfText: // place continue string at end of text
|
|
||||||
msg_yLocation = msg_yLocation + yLocation - SixLinesPerInch;
|
|
||||||
if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation)
|
|
||||||
{ // Adjusted Continue Message Y Offset
|
|
||||||
//DebugPagination.WriteLine("====>> {0},'{1}'", msg_yLocation, MyItemInfo.ShortPath);
|
|
||||||
msg_yLocation = yBottomMargin + (docstyle.Layout.FooterLength ?? 0);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
|
|
||||||
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; // (need this for IP3)
|
|
||||||
if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin;
|
|
||||||
break;
|
|
||||||
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
|
||||||
//msg_yLocation = yBottomMargin + 2 * SixLinesPerInch + (float)docstyle.Layout.FooterLength; // 2 lines above bottom margin
|
|
||||||
msg_yLocation = msg_yLocation + yBtmMarginForMsg + (float)docstyle.Layout.FooterLength;
|
|
||||||
break;
|
|
||||||
case E_ContBottomLoc.BelowBottom1:
|
|
||||||
msg_yLocation = msg_yLocation + yBtmMarginForMsg;
|
|
||||||
break;
|
|
||||||
case E_ContBottomLoc.EndOfText2: // Like EndOfText but limited within yBottomMargin
|
|
||||||
msg_yLocation = Math.Max(msg_yLocation + yLocation - SixLinesPerInch, yBottomMargin + SixLinesPerInch);
|
|
||||||
break;
|
|
||||||
case E_ContBottomLoc.BtwnTextAndBottom2:
|
|
||||||
// Like BtwnTextAndBottom but accounts for line spacing of step & is 1 line up on page (for BGE - Procedure Steps - 2 column)
|
|
||||||
float adj = (MyItemInfo.FormatStepData.StepLayoutData.EveryNLines == 1) ? SixLinesPerInch : 0;
|
|
||||||
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2) + adj + SixLinesPerInch;
|
|
||||||
if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
_MyLog.WarnFormat("**** BOTTOM CONTINUE MESSAGE NOT CODED FOR LOCATION {0}*****", docstyle.Continue.Bottom.Location);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!PageBreakOnStep)
|
|
||||||
{
|
|
||||||
float xoffB = 0;
|
|
||||||
if (RNOContinueOnly)
|
|
||||||
{
|
|
||||||
// The following line was added for McGuire APs/AP/1/5500/12, Step 13
|
|
||||||
//if (msg_yLocation < yBottomMargin + SixLinesPerInch) msg_yLocation = yBottomMargin + SixLinesPerInch;
|
|
||||||
float colR = float.Parse(MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColRTable.Split(",".ToCharArray())[MyItemInfo.ColumnMode]);
|
|
||||||
xoffB = colR + docstyle.Layout.LeftMargin + docstyle.Continue.Bottom.Margin ?? 0;
|
|
||||||
}
|
|
||||||
else if (MyItemInfo.IsInRNO && (docstyle.Continue.Bottom.MarginR ?? 0) > 0)
|
|
||||||
{
|
|
||||||
xoffB = (float)docstyle.Layout.LeftMargin + (float)docstyle.Continue.Bottom.MarginR;
|
|
||||||
MyPageHelper.BottomMessageR = new vlnText(cb, this, myMsg, myMsg, xoffB, msg_yLocation, docstyle.Continue.Bottom.Font);
|
|
||||||
xoffB = (float)docstyle.Layout.LeftMargin + (float)docstyle.Continue.Bottom.Margin;
|
|
||||||
|
|
||||||
}
|
|
||||||
// FloatingContinueMessage format flag:
|
|
||||||
// if breaking at the AER put continue message in left column,
|
|
||||||
// if breaking RNO put continue message in Right column.
|
|
||||||
else if (MyItemInfo.IsInRNO && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.FloatingContinueMessage)
|
|
||||||
{
|
|
||||||
float colR = float.Parse(MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColRTable.Split(",".ToCharArray())[MyItemInfo.ColumnMode]);
|
|
||||||
xoffB = colR + docstyle.Layout.LeftMargin + docstyle.Continue.Bottom.Margin ?? 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
xoffB = docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0;
|
|
||||||
//MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0, msg_yLocation, docstyle.Continue.Bottom.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
|
||||||
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xoffB, msg_yLocation, docstyle.Continue.Bottom.Font);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (PageBreakOnStep) MyPageHelper.BottomMessage = null;
|
|
||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
//_MyLog.InfoFormat("NewPage 11 {0}", cb.PdfWriter.CurrentPageNumber);
|
//_MyLog.InfoFormat("NewPage 11 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
||||||
@ -1052,41 +960,7 @@ namespace Volian.Print.Library
|
|||||||
yPageStart = yTopMargin + yTopMost;// -2 * SixLinesPerInch;
|
yPageStart = yTopMargin + yTopMost;// -2 * SixLinesPerInch;
|
||||||
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
||||||
if (EmptyTopMostPart) yPageStart += SixLinesPerInch;
|
if (EmptyTopMostPart) yPageStart += SixLinesPerInch;
|
||||||
myMsg = docstyle.Continue.Top.Message;
|
DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle);
|
||||||
MyPageHelper.TopMessageR = null;
|
|
||||||
if (myMsg != null && myMsg != "")
|
|
||||||
{
|
|
||||||
yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message
|
|
||||||
if (myMsg.IndexOf(@"%sR") > -1)
|
|
||||||
{
|
|
||||||
ItemInfo myAer = MyItemInfo.IsHigh?MyItemInfo:MyItemInfo.MyParent;
|
|
||||||
if (MyItemInfo.IsInRNO)
|
|
||||||
{
|
|
||||||
if (MyItemInfo.IsNote || MyItemInfo.IsCaution)
|
|
||||||
myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.MyParent.CombinedTab);
|
|
||||||
else
|
|
||||||
myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.CombinedTab);
|
|
||||||
float xor = MyTopRNO.MyTab.XOffset;
|
|
||||||
MyPageHelper.TopMessageR = new vlnText(cb, this, myMsg, myMsg, xor, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
|
||||||
// get aer message, go up parent until find aer and use its combined tab:
|
|
||||||
myAer = MyItemInfo;
|
|
||||||
while (myAer.IsInRNO) myAer = myAer.MyParent;
|
|
||||||
}
|
|
||||||
myMsg = docstyle.Continue.Top.Message.Replace(@"%sR", myAer.CombinedTab);
|
|
||||||
}
|
|
||||||
if (myMsg.IndexOf(@"%s") > -1)
|
|
||||||
myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.CombinedTab);
|
|
||||||
if (myMsg.IndexOf(@"%3d") > -1)
|
|
||||||
myMsg = myMsg.Replace(@"%3d", MyItemInfo.MyHLS.Ordinal.ToString());
|
|
||||||
if (myMsg.IndexOf(@"%d") > -1)
|
|
||||||
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim(" .".ToCharArray()));
|
|
||||||
if (myMsg.IndexOf(@"%c") > -1)
|
|
||||||
myMsg = myMsg.Replace(@"%c", " ");
|
|
||||||
if (!PageBreakOnStep)
|
|
||||||
MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Top.Margin ?? 0, yTopMargin + 0.1F, docstyle.Continue.Top.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
|
||||||
else
|
|
||||||
MyPageHelper.TopMessage = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||||
@ -1184,7 +1058,7 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
if (MyItemInfo.IsHigh && MyItemInfo.GetNextItem() == null) // last hls, add the 'end' message, if there is one
|
if (MyItemInfo.IsHigh && MyItemInfo.GetNextItem() == null) // last hls, add the 'end' message, if there is one
|
||||||
{
|
{
|
||||||
DocStyle docstyle = MyItemInfo.MyDocStyle;
|
docstyle = MyItemInfo.MyDocStyle;
|
||||||
// if the EndForSingle format flag is set to false, then we do not print an End message if the section
|
// if the EndForSingle format flag is set to false, then we do not print an End message if the section
|
||||||
// is a single column section.
|
// is a single column section.
|
||||||
//bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
|
//bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
|
||||||
@ -1246,6 +1120,153 @@ namespace Volian.Print.Library
|
|||||||
return yPageStart;
|
return yPageStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DoTopContinueMsg(PdfContentByte cb, ref float yPageStart, float yTopMargin, DocStyle docstyle)
|
||||||
|
{
|
||||||
|
string myMsg = docstyle.Continue.Top.Message;
|
||||||
|
MyPageHelper.TopMessageR = null;
|
||||||
|
if (myMsg != null && myMsg != "")
|
||||||
|
{
|
||||||
|
yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message
|
||||||
|
if (myMsg.IndexOf(@"%sR") > -1)
|
||||||
|
{
|
||||||
|
if (MyItemInfo.ItemID == 461 || MyItemInfo.ItemID == 446) Console.WriteLine("Here");
|
||||||
|
ItemInfo myAer = MyItemInfo.IsHigh ? MyItemInfo : MyItemInfo.MyParent;
|
||||||
|
if (MyItemInfo.IsInRNO)
|
||||||
|
{
|
||||||
|
if (MyItemInfo.IsNote || MyItemInfo.IsCaution)
|
||||||
|
myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.MyParent.CombinedTab);
|
||||||
|
else
|
||||||
|
myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.CombinedTab);
|
||||||
|
float xor = MyTopRNO.MyTab.XOffset;
|
||||||
|
MyPageHelper.TopMessageR = new vlnText(cb, this, myMsg, myMsg, xor, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
||||||
|
// get aer message, go up parent until find aer and use its combined tab:
|
||||||
|
myAer = MyItemInfo;
|
||||||
|
while (myAer.IsInRNO) myAer = myAer.MyParent;
|
||||||
|
}
|
||||||
|
myMsg = docstyle.Continue.Top.Message.Replace(@"%sR", myAer.CombinedTab);
|
||||||
|
}
|
||||||
|
if (myMsg.IndexOf(@"%s") > -1)
|
||||||
|
{
|
||||||
|
if (MyItemInfo.MyParent.IsSection && (docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue)
|
||||||
|
myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.MyTab.CleanText.Trim());
|
||||||
|
else
|
||||||
|
myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.CombinedTab);
|
||||||
|
}
|
||||||
|
if (myMsg.IndexOf(@"%3d") > -1)
|
||||||
|
myMsg = myMsg.Replace(@"%3d", MyItemInfo.MyHLS.Ordinal.ToString());
|
||||||
|
if (myMsg.IndexOf(@"%d") > -1)
|
||||||
|
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim(" .".ToCharArray()));
|
||||||
|
if (myMsg.IndexOf(@"%c") > -1)
|
||||||
|
myMsg = myMsg.Replace(@"%c", " ");
|
||||||
|
if (!PageBreakOnStep)
|
||||||
|
MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Top.Margin ?? 0, yTopMargin + 0.1F, docstyle.Continue.Top.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||||
|
else
|
||||||
|
MyPageHelper.TopMessage = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DoBottomContinueMsg(PdfContentByte cb, float yBottomMargin, float yLocation, DocStyle docstyle)
|
||||||
|
{
|
||||||
|
string myMsg = docstyle.Continue.Bottom.Message;
|
||||||
|
|
||||||
|
// a format flag exists that states to only put a BOTTOM message if it is a certain type (RNO)
|
||||||
|
// check for this....
|
||||||
|
bool RNOContinueOnly = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly;
|
||||||
|
bool doBottom = !RNOContinueOnly || (MyItemInfo.IsInRNO && RNOContinueOnly);
|
||||||
|
if (doBottom && myMsg != null && myMsg != "")
|
||||||
|
{
|
||||||
|
myMsg = ReplaceStepBottomContinue(myMsg);
|
||||||
|
float msg_yLocation = 0;
|
||||||
|
if (myMsg.Contains("{par}"))
|
||||||
|
{
|
||||||
|
myMsg = myMsg.Replace("{par}", "");
|
||||||
|
msg_yLocation = -SixLinesPerInch;
|
||||||
|
}
|
||||||
|
float yBtmMarginForMsg = yBottomMargin;
|
||||||
|
|
||||||
|
// one of the format flags for FNP had an adjustment for printing the section title only
|
||||||
|
// on the first page of the section. Adjust the location of the bottom continue message
|
||||||
|
// if this adjustment was made (the current topmargin may not reflect the value within
|
||||||
|
// the document style)
|
||||||
|
if (MyPageHelper.PrintedSectionPage > 0)
|
||||||
|
{
|
||||||
|
if ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst)
|
||||||
|
{
|
||||||
|
float localYTopMargin = 792 - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.TopMargin;
|
||||||
|
yBtmMarginForMsg = Math.Max(0, localYTopMargin - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.PageLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// include space for phone list when determining bottom continue message location
|
||||||
|
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList && MyPageHelper.PhoneListHeight != 0)
|
||||||
|
yBtmMarginForMsg += (MyPageHelper.PhoneListHeight - vlnPrintObject.SixLinesPerInch);
|
||||||
|
switch (docstyle.Continue.Bottom.Location)
|
||||||
|
{
|
||||||
|
case E_ContBottomLoc.EndOfText: // place continue string at end of text
|
||||||
|
msg_yLocation = msg_yLocation + yLocation - SixLinesPerInch;
|
||||||
|
if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation)
|
||||||
|
{ // Adjusted Continue Message Y Offset
|
||||||
|
//DebugPagination.WriteLine("====>> {0},'{1}'", msg_yLocation, MyItemInfo.ShortPath);
|
||||||
|
msg_yLocation = yBottomMargin + (docstyle.Layout.FooterLength ?? 0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
|
||||||
|
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; // (need this for IP3)
|
||||||
|
if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin;
|
||||||
|
break;
|
||||||
|
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
||||||
|
//msg_yLocation = yBottomMargin + 2 * SixLinesPerInch + (float)docstyle.Layout.FooterLength; // 2 lines above bottom margin
|
||||||
|
msg_yLocation = msg_yLocation + yBtmMarginForMsg + (float)docstyle.Layout.FooterLength;
|
||||||
|
break;
|
||||||
|
case E_ContBottomLoc.BelowBottom1:
|
||||||
|
msg_yLocation = msg_yLocation + yBtmMarginForMsg;
|
||||||
|
break;
|
||||||
|
case E_ContBottomLoc.EndOfText2: // Like EndOfText but limited within yBottomMargin
|
||||||
|
msg_yLocation = Math.Max(msg_yLocation + yLocation - SixLinesPerInch, yBottomMargin + SixLinesPerInch);
|
||||||
|
break;
|
||||||
|
case E_ContBottomLoc.BtwnTextAndBottom2:
|
||||||
|
// Like BtwnTextAndBottom but accounts for line spacing of step & is 1 line up on page (for BGE - Procedure Steps - 2 column)
|
||||||
|
float adj = (MyItemInfo.FormatStepData.StepLayoutData.EveryNLines == 1) ? SixLinesPerInch : 0;
|
||||||
|
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2) + adj + SixLinesPerInch;
|
||||||
|
if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
_MyLog.WarnFormat("**** BOTTOM CONTINUE MESSAGE NOT CODED FOR LOCATION {0}*****", docstyle.Continue.Bottom.Location);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!PageBreakOnStep)
|
||||||
|
{
|
||||||
|
float xoffB = 0;
|
||||||
|
if (RNOContinueOnly)
|
||||||
|
{
|
||||||
|
// The following line was added for McGuire APs/AP/1/5500/12, Step 13
|
||||||
|
//if (msg_yLocation < yBottomMargin + SixLinesPerInch) msg_yLocation = yBottomMargin + SixLinesPerInch;
|
||||||
|
float colR = float.Parse(MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColRTable.Split(",".ToCharArray())[MyItemInfo.ColumnMode]);
|
||||||
|
xoffB = colR + docstyle.Layout.LeftMargin + docstyle.Continue.Bottom.Margin ?? 0;
|
||||||
|
}
|
||||||
|
else if (MyItemInfo.IsInRNO && (docstyle.Continue.Bottom.MarginR ?? 0) > 0)
|
||||||
|
{
|
||||||
|
xoffB = (float)docstyle.Layout.LeftMargin + (float)docstyle.Continue.Bottom.MarginR;
|
||||||
|
MyPageHelper.BottomMessageR = new vlnText(cb, this, myMsg, myMsg, xoffB, msg_yLocation, docstyle.Continue.Bottom.Font);
|
||||||
|
xoffB = (float)docstyle.Layout.LeftMargin + (float)docstyle.Continue.Bottom.Margin;
|
||||||
|
|
||||||
|
}
|
||||||
|
// FloatingContinueMessage format flag:
|
||||||
|
// if breaking at the AER put continue message in left column,
|
||||||
|
// if breaking RNO put continue message in Right column.
|
||||||
|
else if (MyItemInfo.IsInRNO && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.FloatingContinueMessage)
|
||||||
|
{
|
||||||
|
float colR = float.Parse(MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColRTable.Split(",".ToCharArray())[MyItemInfo.ColumnMode]);
|
||||||
|
xoffB = colR + docstyle.Layout.LeftMargin + docstyle.Continue.Bottom.Margin ?? 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
xoffB = docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0;
|
||||||
|
//MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0, msg_yLocation, docstyle.Continue.Bottom.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||||
|
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xoffB, msg_yLocation, docstyle.Continue.Bottom.Font);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (PageBreakOnStep) MyPageHelper.BottomMessage = null;
|
||||||
|
}
|
||||||
|
|
||||||
private void RefreshDocStyle()
|
private void RefreshDocStyle()
|
||||||
{
|
{
|
||||||
MyItemInfo.ActiveSection = null;
|
MyItemInfo.ActiveSection = null;
|
||||||
|
@ -15,6 +15,8 @@ namespace fmtxml
|
|||||||
fmtdata.SectData.SectionHeader.Level0Big = "True";
|
fmtdata.SectData.SectionHeader.Level0Big = "True";
|
||||||
fmtdata.SectData.StepSectionData.StpSectLayData.ColS = 30;
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColS = 30;
|
||||||
fmtdata.SectData.StepSectionData.StpSectLayData.ColRTable = "0,192,126";
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColRTable = "0,192,126";
|
||||||
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -18;
|
||||||
|
fmtdata.SectData.StepSectionData.StpSectLayData.WidT = 442;
|
||||||
fmtdata.SectData.StepSectionData.SequentialTabFormat[4].TabFormat = "{seq})";
|
fmtdata.SectData.StepSectionData.SequentialTabFormat[4].TabFormat = "{seq})";
|
||||||
fmtdata.SectData.StepSectionData.SequentialTabFormat[4].PrintTabFormat = "{seq})";
|
fmtdata.SectData.StepSectionData.SequentialTabFormat[4].PrintTabFormat = "{seq})";
|
||||||
fmtdata.TransData.UseSpecificTransitionModifier = "true";
|
fmtdata.TransData.UseSpecificTransitionModifier = "true";
|
||||||
@ -49,6 +51,7 @@ namespace fmtxml
|
|||||||
private void AddBGEEOPDOC(ref DocStyles dcstyles)
|
private void AddBGEEOPDOC(ref DocStyles dcstyles)
|
||||||
{
|
{
|
||||||
dcstyles.DcStyles[0].TopMargin = 96;
|
dcstyles.DcStyles[0].TopMargin = 96;
|
||||||
|
dcstyles.DcStyles[0].CBLoc = 6;
|
||||||
dcstyles.DcStyles[1].PageLength = 600;
|
dcstyles.DcStyles[1].PageLength = 600;
|
||||||
dcstyles.DcStyles[1].PageWidth = 552;
|
dcstyles.DcStyles[1].PageWidth = 552;
|
||||||
dcstyles.DcStyles[1].EndMargin = 206;
|
dcstyles.DcStyles[1].EndMargin = 206;
|
||||||
@ -67,6 +70,8 @@ namespace fmtxml
|
|||||||
|
|
||||||
// Attachment Step
|
// Attachment Step
|
||||||
dcstyles.DcStyles[4].FooterLen = 0;
|
dcstyles.DcStyles[4].FooterLen = 0;
|
||||||
|
dcstyles.DcStyles[4].PageWidth = 552;
|
||||||
|
|
||||||
|
|
||||||
// EOP Placekeeper
|
// EOP Placekeeper
|
||||||
dcstyles.DcStyles[12].TopMargin = 138;
|
dcstyles.DcStyles[12].TopMargin = 138;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user