diff --git a/PROMS/Volian.Controls.Library/DisplayFoldoutMaint.Designer.cs b/PROMS/Volian.Controls.Library/DisplayFoldoutMaint.Designer.cs
new file mode 100644
index 00000000..ee805164
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayFoldoutMaint.Designer.cs
@@ -0,0 +1,192 @@
+namespace Volian.Controls.Library
+{
+ partial class DisplayFoldoutMaint
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupFoldouts = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.listBoxFoldouts = new System.Windows.Forms.ListBox();
+ this.groupSteps = new DevComponents.DotNetBar.Controls.GroupPanel();
+ this.lvSteps = new System.Windows.Forms.ListView();
+ this.lblStepSelect = new DevComponents.DotNetBar.LabelX();
+ this.btnSave = new DevComponents.DotNetBar.ButtonX();
+ this.groupFoldouts.SuspendLayout();
+ this.groupSteps.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupFoldouts
+ //
+ this.groupFoldouts.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupFoldouts.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupFoldouts.Controls.Add(this.listBoxFoldouts);
+ this.groupFoldouts.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupFoldouts.Location = new System.Drawing.Point(0, 0);
+ this.groupFoldouts.Name = "groupFoldouts";
+ this.groupFoldouts.Size = new System.Drawing.Size(340, 154);
+ //
+ //
+ //
+ this.groupFoldouts.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupFoldouts.Style.BackColorGradientAngle = 90;
+ this.groupFoldouts.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupFoldouts.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupFoldouts.Style.BorderBottomWidth = 1;
+ this.groupFoldouts.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupFoldouts.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupFoldouts.Style.BorderLeftWidth = 1;
+ this.groupFoldouts.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupFoldouts.Style.BorderRightWidth = 1;
+ this.groupFoldouts.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupFoldouts.Style.BorderTopWidth = 1;
+ this.groupFoldouts.Style.CornerDiameter = 4;
+ this.groupFoldouts.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupFoldouts.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupFoldouts.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupFoldouts.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupFoldouts.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupFoldouts.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupFoldouts.TabIndex = 0;
+ this.groupFoldouts.Text = "Foldouts";
+ //
+ // listBoxFoldouts
+ //
+ this.listBoxFoldouts.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBoxFoldouts.FormattingEnabled = true;
+ this.listBoxFoldouts.ItemHeight = 16;
+ this.listBoxFoldouts.Location = new System.Drawing.Point(0, 0);
+ this.listBoxFoldouts.Name = "listBoxFoldouts";
+ this.listBoxFoldouts.Size = new System.Drawing.Size(334, 116);
+ this.listBoxFoldouts.TabIndex = 0;
+ this.listBoxFoldouts.SelectedIndexChanged += new System.EventHandler(this.listBoxFoldouts_SelectedIndexChanged);
+ //
+ // groupSteps
+ //
+ this.groupSteps.CanvasColor = System.Drawing.SystemColors.Control;
+ this.groupSteps.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+ this.groupSteps.Controls.Add(this.btnSave);
+ this.groupSteps.Controls.Add(this.lblStepSelect);
+ this.groupSteps.Controls.Add(this.lvSteps);
+ this.groupSteps.Location = new System.Drawing.Point(0, 142);
+ this.groupSteps.Name = "groupSteps";
+ this.groupSteps.Size = new System.Drawing.Size(337, 427);
+ //
+ //
+ //
+ this.groupSteps.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.groupSteps.Style.BackColorGradientAngle = 90;
+ this.groupSteps.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.groupSteps.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupSteps.Style.BorderBottomWidth = 1;
+ this.groupSteps.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.groupSteps.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupSteps.Style.BorderLeftWidth = 1;
+ this.groupSteps.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupSteps.Style.BorderRightWidth = 1;
+ this.groupSteps.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.groupSteps.Style.BorderTopWidth = 1;
+ this.groupSteps.Style.CornerDiameter = 4;
+ this.groupSteps.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+ this.groupSteps.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+ this.groupSteps.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+ this.groupSteps.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+ //
+ //
+ //
+ this.groupSteps.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ //
+ //
+ //
+ this.groupSteps.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.groupSteps.TabIndex = 1;
+ this.groupSteps.Text = "Steps";
+ //
+ // lvSteps
+ //
+ this.lvSteps.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.lvSteps.Location = new System.Drawing.Point(0, 80);
+ this.lvSteps.MultiSelect = false;
+ this.lvSteps.Name = "lvSteps";
+ this.lvSteps.Size = new System.Drawing.Size(331, 324);
+ this.lvSteps.TabIndex = 0;
+ this.lvSteps.UseCompatibleStateImageBehavior = false;
+ this.lvSteps.View = System.Windows.Forms.View.List;
+ this.lvSteps.SelectedIndexChanged += new System.EventHandler(this.lvSteps_SelectedIndexChanged);
+ //
+ // lblStepSelect
+ //
+ //
+ //
+ //
+ this.lblStepSelect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.lblStepSelect.Location = new System.Drawing.Point(3, 3);
+ this.lblStepSelect.Name = "lblStepSelect";
+ this.lblStepSelect.Size = new System.Drawing.Size(296, 23);
+ this.lblStepSelect.TabIndex = 1;
+ //
+ // btnSave
+ //
+ this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnSave.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnSave.FocusOnLeftMouseButtonDown = true;
+ this.btnSave.Location = new System.Drawing.Point(29, 42);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(101, 23);
+ this.btnSave.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnSave.TabIndex = 2;
+ this.btnSave.Text = "Save Selection";
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+ //
+ // DisplayFoldoutMaint
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupSteps);
+ this.Controls.Add(this.groupFoldouts);
+ this.Name = "DisplayFoldoutMaint";
+ this.Size = new System.Drawing.Size(340, 588);
+ this.groupFoldouts.ResumeLayout(false);
+ this.groupSteps.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.Controls.GroupPanel groupFoldouts;
+ private System.Windows.Forms.ListBox listBoxFoldouts;
+ private DevComponents.DotNetBar.Controls.GroupPanel groupSteps;
+ private System.Windows.Forms.ListView lvSteps;
+ private DevComponents.DotNetBar.LabelX lblStepSelect;
+ private DevComponents.DotNetBar.ButtonX btnSave;
+ }
+}
diff --git a/PROMS/Volian.Controls.Library/DisplayFoldoutMaint.cs b/PROMS/Volian.Controls.Library/DisplayFoldoutMaint.cs
new file mode 100644
index 00000000..54254f09
--- /dev/null
+++ b/PROMS/Volian.Controls.Library/DisplayFoldoutMaint.cs
@@ -0,0 +1,166 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using VEPROMS.CSLA.Library;
+
+namespace Volian.Controls.Library
+{
+ public partial class DisplayFoldoutMaint : UserControl
+ {
+ private ItemInfo _MyItemInfo;
+ public ItemInfo MyItemInfo
+ {
+ get { return _MyItemInfo; }
+ set
+ {
+ _MyItemInfo = value;
+ _MainStepSection = null;
+ FillInControls();
+ }
+ }
+ private SectionInfo _MainStepSection;
+ public SectionInfo MainStepSection
+ {
+ get
+ {
+ if (_MainStepSection == null)
+ {
+ foreach (SectionInfo si in MyItemInfo.MyProcedure.Sections)
+ {
+ SectionConfig sc = (SectionConfig)si.MyConfig;
+ if (sc.Section_OriginalSteps == "Y") _MainStepSection = si;
+ }
+ }
+ return _MainStepSection;
+ }
+ }
+ private ItemInfo _firstStep;
+ private ItemInfo _lastStep;
+ public DisplayFoldoutMaint()
+ {
+ InitializeComponent();
+ FillInControls();
+ }
+
+ private void FillInControls()
+ {
+
+
+ // for this iteminfo, get the procedure and then the list of sections. For any section, starting with
+ // Foldout, add it to list:
+ if (MyItemInfo != null)
+ {
+ ProcedureInfo pi = MyItemInfo.MyProcedure;
+ listBoxFoldouts.Items.Clear();
+ lvSteps.Items.Clear();
+ foreach (SectionInfo si in pi.Sections)
+ if (si.DisplayText.ToUpper().StartsWith("FOLDOUT"))listBoxFoldouts.Items.Add(si);
+ if (listBoxFoldouts.Items.Count > 0) listBoxFoldouts.SelectedIndex = 0;
+ else
+ {
+ listBoxFoldouts.Items.Add("No Foldouts Exist");
+ return;
+ }
+
+ // find default step section & use its steps to fill in tree.
+
+ ItemInfo startitm = MainStepSection.Steps != null && MainStepSection.Steps.Count > 0 ? MainStepSection.Steps[0] : null;
+ while (startitm != null)
+ {
+ lvSteps.Items.Add(startitm.ToString());
+ lvSteps.Items[lvSteps.Items.Count - 1].Tag = startitm;
+ startitm = (startitm.NextItem != null && startitm.NextItems.Count > 0 ? startitm.NextItems[0] : null);
+ }
+ }
+ ColorFoldoutSelection();
+ }
+ private void ColorFoldoutSelection()
+ {
+ if (MyItemInfo == null) return;
+ if (listBoxFoldouts.Items[0].ToString() == "No Foldouts Exist") return;
+ SectionInfo foldOutselected = listBoxFoldouts.Items[listBoxFoldouts.SelectedIndex] as SectionInfo;
+ ItemInfo tmpStep = null; // keep track of previous step, so can set _lastStep;
+ for (int i = 0; i
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs
index be0bb209..52018a71 100644
--- a/PROMS/Volian.Controls.Library/DisplayText.cs
+++ b/PROMS/Volian.Controls.Library/DisplayText.cs
@@ -95,6 +95,7 @@ namespace Volian.Controls.Library
get { return _textFont; }
set { _textFont = value; }
}
+ private bool PrintingSmartTemplate = false;
public string StartText;
public string OriginalText; // compare for save to see if change for links.
private FormatInfo _MyFormat;
@@ -118,7 +119,11 @@ namespace Volian.Controls.Library
_MyItemInfo = itemInfo;
OriginalText = InfoText;
TextFont = itemInfo.GetItemFont();//GetItemFont();
- string text = prefix + InfoText + suffix;
+ // if in print mode, and this is the HLS of a smart template (checklist formats), add a space before and
+ // after the HLS text - this allows for the vertical bar characters to be added.
+ if (itemInfo.IsStep && itemInfo.FormatStepData.UseSmartTemplate && epMode == E_EditPrintMode.Print) Console.WriteLine("here");
+ string addSpace = (itemInfo.IsStep && itemInfo.FormatStepData.UseSmartTemplate && epMode == E_EditPrintMode.Print) ? " " : "";
+ string text = prefix + addSpace + InfoText + addSpace + suffix;
_MyFormat = itemInfo.ActiveFormat;
bool tableShouldBeOutlined = (epMode == E_EditPrintMode.Print || vwMode == E_ViewMode.View || noEdit) &&
diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs
index 96c53366..1f10e8e8 100644
--- a/PROMS/Volian.Print.Library/Pagination.cs
+++ b/PROMS/Volian.Print.Library/Pagination.cs
@@ -199,8 +199,8 @@ namespace Volian.Print.Library
// if the HLS is part of a Smart Template (i.e. WCNCKL table), don't add in an extra line because
// that makes pagination work incorrectly because the Smart Template has a 'table' line after the
// text.
- BuildPageBreakList(yWithinMargins + SixLinesPerInch, yPageSizeNextPage + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
- //BuildPageBreakList(yWithinMargins + (MyItemInfo.FormatStepData.UseSmartTemplate?0:SixLinesPerInch), yPageSize + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
+ //BuildPageBreakList(yWithinMargins + SixLinesPerInch, yPageSizeNextPage + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
+ BuildPageBreakList(yWithinMargins + (MyItemInfo.FormatStepData.UseSmartTemplate?0:SixLinesPerInch), yPageSize + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
return 0; // Stay on this page
}
diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs
index 3bf35d68..ebc3d085 100644
--- a/PROMS/Volian.Print.Library/PromsPrinter.cs
+++ b/PROMS/Volian.Print.Library/PromsPrinter.cs
@@ -270,31 +270,32 @@ namespace Volian.Print.Library
//}
int _StepPageNumber = 0;
private VlnSvgPageHelper _MyHelper = null;
- private static PdfReader _MyFoldoutReader = null;
- private static SectionInfo _MyFoldoutSection = null;
- //private static List _MyFoldoutReader = null;
- //private static List _MyFoldoutSection = null;
+ //private static PdfReader _MyFoldoutReader = null;
+ //private static SectionInfo _MyFoldoutSection = null;
+ private static List _MyFoldoutReader = null;
+ private static List _MyFoldoutSection = null;
private string Print(ProcedureInfo myProcedure, string pdfFolder)
{
- _MyFoldoutReader = null;
- //if (_MyFoldoutReader != null) _MyFoldoutReader.Clear();
- //else _MyFoldoutReader = new List();
+ if (_MyFoldoutReader != null) _MyFoldoutReader.Clear();
+ else _MyFoldoutReader = new List();
- //if (_MyFoldoutSection != null) _MyFoldoutSection.Clear();
- //else _MyFoldoutSection = new List();
+ if (_MyFoldoutSection != null) _MyFoldoutSection.Clear();
+ else _MyFoldoutSection = new List();
if (myProcedure.Sections != null)
{
+ int cnt = 0;
foreach (SectionInfo mySection in myProcedure.Sections)
{
if (mySection.MyContent.Number.ToUpper() == "FOLDOUT"
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT")))
{
// if floating foldouts, need a list of sections & foldoutreaders. Just do first for now.
- _MyFoldoutSection = mySection;
- //_MyFoldoutSection.Add(mySection);
- string foldoutPdf = PrintProcedureOrFoldout(myProcedure, true, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\Foldout.pdf");
- _MyFoldoutReader = foldoutPdf != null ? new PdfReader(foldoutPdf) : null;
+
+ _MyFoldoutSection.Add(mySection);
+ string foldoutPdf = PrintProcedureOrFoldout(myProcedure, mySection, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\Foldout" + cnt.ToString() + @".pdf");
+ _MyFoldoutReader.Add(foldoutPdf != null ? new PdfReader(foldoutPdf) : null);
+ cnt++;
}
}
}
@@ -306,7 +307,7 @@ namespace Volian.Print.Library
if (MessageBox.Show(outputFileName + " exists. Overwrite file?", "File Exists", MessageBoxButtons.YesNo) == DialogResult.No)
return null;
}
- return PrintProcedureOrFoldout(myProcedure, false, outputFileName);
+ return PrintProcedureOrFoldout(myProcedure, null, outputFileName);
}
// Find the last section that has a Final Message defined in its format
// Return that section's itemID or a -1 if the Final Message is not defined
@@ -329,8 +330,9 @@ namespace Volian.Print.Library
get { return _AllowAllWatermarks; }
set { _AllowAllWatermarks = value; }
}
- private string PrintProcedureOrFoldout(ProcedureInfo myProcedure, bool doingFoldout, string outputFileName)
+ private string PrintProcedureOrFoldout(ProcedureInfo myProcedure, SectionInfo myFoldoutSection, string outputFileName)
{
+ bool doingFoldout = myFoldoutSection != null;
// The following line accounts for 16bit OverrideLeftMargin when the 'Absolute' attribute is used in the genmac.
// We don't want to use the OverrideLeftMargin when 'Absolute' is used in the genmac.
// It's set here because the Volian.Svg.Library cannot call back to Volian.Print.Library to get this value.
@@ -356,6 +358,7 @@ namespace Volian.Print.Library
if ((mySection.MyContent.Number.ToUpper() == "FOLDOUT"
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT")))
!= doingFoldout) continue;
+ if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue;
PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper;
PrintOverride.CompressSub = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSub;
OnStatusChanged((mySection.DisplayNumber ?? "") == "" ? mySection.DisplayText : mySection.DisplayNumber, PromsPrinterStatusType.Progress, progress++);
@@ -419,7 +422,7 @@ namespace Volian.Print.Library
// get first step to send to floading foldout indx.&& MyItemInfo.FoldoutIndex>-1)
ItemInfo firstStep = mySection.Steps[0];
if (firstStep.FoldoutIndex() > -1)
- DoFoldoutPage(cb, "Beginning of Step Section", _TextLayer, _MyHelper);
+ DoFoldoutPage(cb, "Beginning of Step Section", _TextLayer, _MyHelper, firstStep.FoldoutIndex());
}
CreateStepPdf(mySection, cb);
}
@@ -489,7 +492,7 @@ namespace Volian.Print.Library
{
int pageNumber = 1 + ii;
if (((mySection.MyDocStyle.StructureStyle.Style ?? 0) & E_DocStructStyle.UseSectionFoldout) != 0)
- DoFoldoutPage(cb, "Word Document", _TextLayer, _MyHelper);
+ DoFoldoutPage(cb, "Word Document", _TextLayer, _MyHelper, 0);
if (readerWord != null)
{
bool doimport2 = true;
@@ -508,7 +511,7 @@ namespace Volian.Print.Library
{
float yoff = 0;
if (_MyHelper.DidFirstPageDocStyle) yoff = origYoff - (float)mySection.MyDocStyle.Layout.TopMargin;
- AddImportedPageToLayer(cb.PdfWriter.DirectContent, _MSWordLayer, fgPage, 0, yoff);
+ AddImportedPageToLayer(cb.PdfWriter.DirectContent, _MSWordLayer, fgPage, (float)(mySection.MyDocStyle.Layout.MSWordXAdj??0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj??0)+yoff);
DebugPagination.WriteLine("{0},'{1}',{2}",
_MyHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber, mySection.ShortPath,pageNumber);
@@ -784,11 +787,11 @@ namespace Volian.Print.Library
PrintTextMessage(cb, "Foldout for: " + str, textLayer);
cb.PdfDocument.NewPage(); // Temporary for foldout/16bit-32bit page alignment
}
- public static void DoFoldoutPage(PdfContentByte cb, string str, PdfLayer textLayer, VlnSvgPageHelper myPageHelper)
+ public static void DoFoldoutPage(PdfContentByte cb, string str, PdfLayer textLayer, VlnSvgPageHelper myPageHelper, int foldoutindx)
{
- if (_MyFoldoutSection == null) return;
+ if (_MyFoldoutSection == null || _MyFoldoutSection.Count==0) return;
SectionInfo saveSect = myPageHelper.MySection;
- myPageHelper.MySection = _MyFoldoutSection;
+ myPageHelper.MySection = _MyFoldoutSection[foldoutindx];
myPageHelper.OnFoldoutPage = true;
if (_MyFoldoutReader != null)
{
@@ -796,7 +799,7 @@ namespace Volian.Print.Library
PdfImportedPage fgPage = null;
try
{
- fgPage = cb.PdfWriter.GetImportedPage(_MyFoldoutReader,1);
+ fgPage = cb.PdfWriter.GetImportedPage(_MyFoldoutReader[foldoutindx],1);
}
catch (Exception ex)
{
diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs
index 814cd498..8136c754 100644
--- a/PROMS/Volian.Print.Library/vlnParagraph.cs
+++ b/PROMS/Volian.Print.Library/vlnParagraph.cs
@@ -369,7 +369,7 @@ namespace Volian.Print.Library
}
// Now do the bottom line for this item.
Paragraph crossLine = new Paragraph(bottomOfTable ? bx.BXLMID : bx.BXMID, iSymblFont);
- float yloc = yPageStart - this.YBottomMost + 15;
+ float yloc = yPageStart - this.YBottomMost + 18;
Rtf2Pdf.TextAt(cb, leftLine, float.Parse(vertPos[0]) + (float)ii.MyDocStyle.Layout.LeftMargin - csize, yloc, lWidth, 100, null, yBottomMargin);
float hPos = float.Parse(vertPos[0]) + csize;
int doHorizCnt = 0;
@@ -609,7 +609,7 @@ namespace Volian.Print.Library
}
// Only do foldout page if not done for section break, i.e. check the there's a previous step.
if (MyItemInfo.MyPrevious != null && MyItemInfo.FoldoutIndex()>-1)
- PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper);
+ PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
yPageStart = yTopMargin + YTopMost;
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
MyPageHelper.YMultiplier = 1;
@@ -650,7 +650,7 @@ namespace Volian.Print.Library
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
DebugText.WriteLine("Paginate2");
if (MyItemInfo.FoldoutIndex()>-1)
- PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper); // temporary foldout
+ PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex()); // temporary foldout
// If there is a box, adjust the yTopMost to include it.
float yTopMost = YTopMost;
//if (YVeryTop < yTopMost) Console.WriteLine("{0},{1},{2}", MyItemInfo.DBSequence, yTopMost, YVeryTop);
@@ -689,7 +689,7 @@ namespace Volian.Print.Library
MyPageHelper.PageBookmarks.Add(MyItemInfo, ((si.DisplayNumber ?? "") == "" ? "" : si.DisplayNumber + " - ") + si.DisplayText, null);
}
if (MyItemInfo.FoldoutIndex() > -1)
- PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper);
+ PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
}
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.IsStepSection &&
MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
@@ -1194,20 +1194,17 @@ namespace Volian.Print.Library
PartsAbove.Add(new vlnMacro(xoff, yoff, macro));
}
}
- // If WCN checklists, the substeps are printed in a row, need to keep track of the 'longest' in
+ // If checklists, the substeps are printed in a row, need to keep track of the 'longest' in
// y direction (bottommost) across the row.
- if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) > 0))
- {
- // do I need to get max of savCheckListBottomMost & (yoff+Height+SixLinesPerInch)
+ if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) >= 0))
savCheckListBottomMost = yoff + Height + SixLinesPerInch;
- }
// Get Y offset for regular steps, or if section title is output or if not within row (not last column of
// text) for wcn checklist, i.e.
if ((!itemInfo.IsStepSection && !itemInfo.MyHLS.FormatStepData.UseSmartTemplate) // regular step
|| (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
&& !MyItemInfo.MyDocStyle.CancelSectTitle
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
- // In WCN Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
+ // In Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
|| (!itemInfo.IsStepSection && itemInfo.MyHLS.FormatStepData.UseSmartTemplate
&& ((itemInfo.Steps == null || itemInfo.Steps.Count == 0)
|| !itemInfo.Steps[0].FormatStepData.StepLayoutData.AlignWithParentTab)))
@@ -1307,9 +1304,10 @@ namespace Volian.Print.Library
}
YBottomMost = yoff;
- // For WCN 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.
- if (savCheckListBottomMost != 0 && savCheckListBottomMost > YBottomMost) YBottomMost = savCheckListBottomMost;
+ if (savCheckListBottomMost != 0 && savCheckListBottomMost > YBottomMost)
+ YBottomMost = savCheckListBottomMost;
}
private string GetMacroName(string str)
@@ -2101,7 +2099,7 @@ namespace Volian.Print.Library
int? bxIndx = itemInfo.IsStep ? formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex : null;
float? widOvrd = 0;
float xwid = 0;
- if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (xwid = GetWidthFromTemplate(itemInfo, formatInfo))>0)
+ if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (xwid = GetWidthFromTemplate(itemInfo, formatInfo)) > 0)
widOvrd = xwid;
else
widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;