Print footnotes & separator lines for BGE Valve Sections
This commit is contained in:
parent
03385f2013
commit
7f8b048f8a
@ -75,6 +75,11 @@ namespace Volian.Print.Library
|
|||||||
int maxRnoSav = maxRNO;
|
int maxRnoSav = maxRNO;
|
||||||
foreach (ItemInfo iChildItemInfo in itemInfoList)
|
foreach (ItemInfo iChildItemInfo in itemInfoList)
|
||||||
{
|
{
|
||||||
|
if (iChildItemInfo.IsNote && iChildItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.NotesToFootnotes)
|
||||||
|
{
|
||||||
|
vlnParagraph para = new vlnParagraph(Parent, cb, iChildItemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null, yoffRight, true);
|
||||||
|
continue; // don't add it, vlnParagraph adds this item to the footnote vlntext list in ToPdf.
|
||||||
|
}
|
||||||
maxRNO = maxRnoSav;
|
maxRNO = maxRnoSav;
|
||||||
if (iChildItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.DiffContActBox && iChildItemInfo.IsHigh) bxIndex = null;
|
if (iChildItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.DiffContActBox && iChildItemInfo.IsHigh) bxIndex = null;
|
||||||
if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO)
|
if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO)
|
||||||
@ -1029,6 +1034,7 @@ namespace Volian.Print.Library
|
|||||||
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;
|
docstyle = MyItemInfo.MyDocStyle;
|
||||||
|
if (MyPageHelper.NotesToFootNotes != null) MyPageHelper.NotesToFootNotesYoffset = yLocation;
|
||||||
bool doSectionContinue = !MyItemInfo.IsSection && ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue);
|
bool doSectionContinue = !MyItemInfo.IsSection && ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue);
|
||||||
if (doSectionContinue) DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle, false);
|
if (doSectionContinue) DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle, false);
|
||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
@ -1068,6 +1074,11 @@ namespace Volian.Print.Library
|
|||||||
//_MyLog.InfoFormat("NewPage 10 blank {0}", cb.PdfWriter.CurrentPageNumber);
|
//_MyLog.InfoFormat("NewPage 10 blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (MyItemInfo.MyDocStyle.LandscapePageList)
|
||||||
|
{
|
||||||
|
System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(0, 1, -1, 0, cb.PdfDocument.PageSize.Height, 0);
|
||||||
|
cb.Transform(myMatrix);
|
||||||
|
}
|
||||||
yPageStart = yTopMargin + YTopMost;
|
yPageStart = yTopMargin + YTopMost;
|
||||||
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
||||||
|
|
||||||
@ -1109,7 +1120,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (MyPageHelper.NotesToFootNotes != null) MyPageHelper.NotesToFootNotesYoffset = yLocation;
|
||||||
DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle, doThreeContinues);
|
DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle, doThreeContinues);
|
||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
if (MyItemInfo.IsStep && ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
|
if (MyItemInfo.IsStep && ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
|
||||||
@ -1231,6 +1242,7 @@ namespace Volian.Print.Library
|
|||||||
if (!firstHighLevelStep)
|
if (!firstHighLevelStep)
|
||||||
{
|
{
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
|
if (MyPageHelper.NotesToFootNotes != null) MyPageHelper.NotesToFootNotesYoffset = yLocation;
|
||||||
cb.PdfDocument.NewPage(); // HLS (7 lpi) breakif (MyItemInfo.IsSection)
|
cb.PdfDocument.NewPage(); // HLS (7 lpi) breakif (MyItemInfo.IsSection)
|
||||||
//_MyLog.InfoFormat("NewPage 12 {0}", cb.PdfWriter.CurrentPageNumber);
|
//_MyLog.InfoFormat("NewPage 12 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
//Console.WriteLine("'b3',{0},'{1}',{2},{3},{4},{5},{6}", MyItemInfo.ItemID, MyItemInfo.ShortPath, yTopMargin, yPageStart, yLocation, YTopMost, YOffset);
|
//Console.WriteLine("'b3',{0},'{1}',{2},{3},{4},{5},{6}", MyItemInfo.ItemID, MyItemInfo.ShortPath, yTopMargin, yPageStart, yLocation, YTopMost, YOffset);
|
||||||
@ -1253,6 +1265,11 @@ namespace Volian.Print.Library
|
|||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
//_MyLog.InfoFormat("NewPage 12 lpi blank {0}", cb.PdfWriter.CurrentPageNumber);
|
//_MyLog.InfoFormat("NewPage 12 lpi blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
}
|
}
|
||||||
|
if (MyItemInfo.MyDocStyle.LandscapePageList)
|
||||||
|
{
|
||||||
|
System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(0, 1, -1, 0, cb.PdfDocument.PageSize.Height, 0);
|
||||||
|
cb.Transform(myMatrix);
|
||||||
|
}
|
||||||
|
|
||||||
// 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)
|
||||||
@ -1335,6 +1352,23 @@ namespace Volian.Print.Library
|
|||||||
Console.WriteLine("'No Header 1','{0}',{1},{2}", MyItemInfo.ShortPath, MyItemInfo.MyDocStyle.CancelSectTitle, MyItemInfo.MyDocStyle.SpecialStepsFoldout);
|
Console.WriteLine("'No Header 1','{0}',{1},{2}", MyItemInfo.ShortPath, MyItemInfo.MyDocStyle.CancelSectTitle, MyItemInfo.MyDocStyle.SpecialStepsFoldout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// see if this hls has footnotes, if so save them for vlnSvgPageHelper to put out
|
||||||
|
// and figure out yspace it takes for pagination.
|
||||||
|
if (MyItemInfo.IsHigh && MyPageHelper.NotesToFootNotesHLS.ContainsKey(MyItemInfo.ItemID))
|
||||||
|
{
|
||||||
|
List<int> myNotes = MyPageHelper.NotesToFootNotesHLS[MyItemInfo.ItemID];
|
||||||
|
foreach (int myNote in myNotes)
|
||||||
|
{
|
||||||
|
ItemInfo inote = ItemInfo.Get(myNote);
|
||||||
|
vlnText ntTxt = new vlnText(cb, null, inote.MyContent.Text, inote.MyContent.Text, (float)MyItemInfo.MyDocStyle.Layout.LeftMargin, 0, inote.FormatStepData.Font);
|
||||||
|
ntTxt.Width = (float)MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyItemInfo.MyDocStyle.Layout.LeftMargin;
|
||||||
|
if (MyPageHelper.NotesToFootNotes == null) MyPageHelper.NotesToFootNotes = new List<vlnText>();
|
||||||
|
MyPageHelper.NotesToFootNotes.Add(ntTxt);
|
||||||
|
}
|
||||||
|
MyPageHelper.NotesToFootNotesHLS.Remove(MyItemInfo.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||||
yPageStart = ChildrenLeft.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
yPageStart = ChildrenLeft.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||||
|
|
||||||
@ -2020,6 +2054,21 @@ namespace Volian.Print.Library
|
|||||||
Prefix = prefix;
|
Prefix = prefix;
|
||||||
Suffix = suffix;
|
Suffix = suffix;
|
||||||
MyItemInfo = itemInfo;
|
MyItemInfo = itemInfo;
|
||||||
|
MyContentByte = cb;
|
||||||
|
if (itemInfo.IsNote && itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.NotesToFootnotes)
|
||||||
|
{
|
||||||
|
// notestofootnoteshls may need to be a list, a hls can have more than one note
|
||||||
|
// should it be list of vlntext.
|
||||||
|
if (MyPageHelper.NotesToFootNotesHLS.ContainsKey(itemInfo.MyHLS.ItemID))
|
||||||
|
MyPageHelper.NotesToFootNotesHLS[itemInfo.MyHLS.ItemID].Add(itemInfo.ItemID);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<int> notesList = new List<int>();
|
||||||
|
notesList.Add(itemInfo.ItemID);
|
||||||
|
MyPageHelper.NotesToFootNotesHLS.Add(itemInfo.MyHLS.ItemID, notesList);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
// do some 'setup' for Calvert Alarms:
|
// do some 'setup' for Calvert Alarms:
|
||||||
if (itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
if (itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||||
{
|
{
|
||||||
@ -2055,7 +2104,7 @@ namespace Volian.Print.Library
|
|||||||
MyTopRNO = MyParent.MyTopRNO;
|
MyTopRNO = MyParent.MyTopRNO;
|
||||||
if (MyTopRNO != null) MyTopRNO.LastRNO = this;
|
if (MyTopRNO != null) MyTopRNO.LastRNO = this;
|
||||||
}
|
}
|
||||||
MyContentByte = cb;
|
|
||||||
if (!MyPageHelper.MyParagraphs.ContainsKey(itemInfo.ItemID)) MyPageHelper.MyParagraphs.Add(itemInfo.ItemID, this);
|
if (!MyPageHelper.MyParagraphs.ContainsKey(itemInfo.ItemID)) MyPageHelper.MyParagraphs.Add(itemInfo.ItemID, this);
|
||||||
|
|
||||||
// if this a continuous subsection, refresh the style.
|
// if this a continuous subsection, refresh the style.
|
||||||
@ -2856,6 +2905,13 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
YBottomMost = yoff;
|
YBottomMost = yoff;
|
||||||
|
|
||||||
|
if (MyItemInfo.IsHigh && MyItemInfo.MyDocStyle.LandscapePageList && MyItemInfo.MyDocStyle.ComponentList)
|
||||||
|
{
|
||||||
|
// put out line after step (for BGEVLV format)
|
||||||
|
float macroY = YBottomMost-(0.25f * SixLinesPerInch);
|
||||||
|
PartsLeft.Add(new vlnMacro((float)MyItemInfo.MyDocStyle.Layout.LeftMargin, macroY, "B9"));
|
||||||
|
}
|
||||||
|
|
||||||
// For Checklist, the substeps are in rows of data. The YBottomMost is the bottom most for
|
// For Checklist, the substeps are in rows of data. The YBottomMost is the bottom most for
|
||||||
// the row.
|
// the row.
|
||||||
if (savCheckListBottomMost != 0) YBottomMost = Math.Max(savCheckListBottomMost, YBottomMost);
|
if (savCheckListBottomMost != 0) YBottomMost = Math.Max(savCheckListBottomMost, YBottomMost);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user