Compare commits
2 Commits
dcfdf5f852
...
72457d956e
Author | SHA1 | Date | |
---|---|---|---|
72457d956e | |||
837978da92 |
@ -59,6 +59,8 @@ namespace VEPROMS
|
|||||||
get { return _Automatic; }
|
get { return _Automatic; }
|
||||||
set { _Automatic = value; }
|
set { _Automatic = value; }
|
||||||
}
|
}
|
||||||
|
// C2024-003 parameter contains parent section, child section, issubsection flag.
|
||||||
|
// C2024-003 values needed to print section.
|
||||||
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int[] PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
@ -427,9 +429,9 @@ namespace VEPROMS
|
|||||||
RevNum = (_NewRevForAllProcs == null) ? pc.Print_Rev : _NewRevForAllProcs;
|
RevNum = (_NewRevForAllProcs == null) ? pc.Print_Rev : _NewRevForAllProcs;
|
||||||
RevDate = pc.Print_RevDate; //== null || pc.Print_RevDate=="" ? DateTime.Today : Convert.ToDateTime(pc.Print_RevDate);
|
RevDate = pc.Print_RevDate; //== null || pc.Print_RevDate=="" ? DateTime.Today : Convert.ToDateTime(pc.Print_RevDate);
|
||||||
ReviewDate = pc.Print_ReviewDate; // == null ? DateTime.Today : Convert.ToDateTime(pc.Print_ReviewDate);
|
ReviewDate = pc.Print_ReviewDate; // == null ? DateTime.Today : Convert.ToDateTime(pc.Print_ReviewDate);
|
||||||
//Now check the format flags to determine if/how the Rev string should be parsed.
|
//Now check the format flags to determine if/how the Rev string should be parsed.
|
||||||
// This will covert the old way (16-bit) of setting a RevDate (appending it to the RevNumber)
|
// This will covert the old way (16-bit) of setting a RevDate (appending it to the RevNumber)
|
||||||
// to the new way saving the RevNumber and RevDate in there own config fields
|
// to the new way saving the RevNumber and RevDate in there own config fields
|
||||||
if ((_MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate && RevNum.Contains("/"))
|
if ((_MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate && RevNum.Contains("/"))
|
||||||
|| (_MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash && RevNum.Contains("\\")))
|
|| (_MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash && RevNum.Contains("\\")))
|
||||||
{
|
{
|
||||||
@ -530,9 +532,9 @@ namespace VEPROMS
|
|||||||
PDFDTSuffix dtSuf = _DocVersionConfig.Print_PDFdtFileSuffix;
|
PDFDTSuffix dtSuf = _DocVersionConfig.Print_PDFdtFileSuffix;
|
||||||
if (dtPre != PDFDTPrefix.None) PDFFilePrefix = ""; // incase user entered prefix text but then selected a date/time (in working draft properties)
|
if (dtPre != PDFDTPrefix.None) PDFFilePrefix = ""; // incase user entered prefix text but then selected a date/time (in working draft properties)
|
||||||
if (dtSuf != PDFDTSuffix.None) PDFFileSuffix = ""; // incase user entered suffix text but then selected a date/time (in working draft properties)
|
if (dtSuf != PDFDTSuffix.None) PDFFileSuffix = ""; // incase user entered suffix text but then selected a date/time (in working draft properties)
|
||||||
// B2020-062 control the toggle of date/time prefix/suffix on pdf file name
|
// B2020-062 control the toggle of date/time prefix/suffix on pdf file name
|
||||||
// disable the date/time Prefix/Suffix switch if no date/time was selected
|
// disable the date/time Prefix/Suffix switch if no date/time was selected
|
||||||
// This switch is does not affect the use of it if the user typed in text for prefix/suffix
|
// This switch is does not affect the use of it if the user typed in text for prefix/suffix
|
||||||
if (!AllowDateTimePrefixSuffix || (dtPre == PDFDTPrefix.None && dtSuf == PDFDTSuffix.None))
|
if (!AllowDateTimePrefixSuffix || (dtPre == PDFDTPrefix.None && dtSuf == PDFDTSuffix.None))
|
||||||
{
|
{
|
||||||
swtbtnPDFdtPrefixSuffix.Value = false;
|
swtbtnPDFdtPrefixSuffix.Value = false;
|
||||||
@ -565,7 +567,7 @@ namespace VEPROMS
|
|||||||
private void SetupPrefixSuffixSwitch()
|
private void SetupPrefixSuffixSwitch()
|
||||||
{
|
{
|
||||||
if (_CreateButtonClicked) return; // B2020-062 control the toggle of date/time prefix/suffix on pdf file name
|
if (_CreateButtonClicked) return; // B2020-062 control the toggle of date/time prefix/suffix on pdf file name
|
||||||
// note that MyProcedure must be set before calling this because BuildPDFFileName() will be called when the swbtnPDFPrefixSuffix is set
|
// note that MyProcedure must be set before calling this because BuildPDFFileName() will be called when the swbtnPDFPrefixSuffix is set
|
||||||
string PDFFilePrefix = _DocVersionConfig.Print_PDFFilePrefix;
|
string PDFFilePrefix = _DocVersionConfig.Print_PDFFilePrefix;
|
||||||
string PDFFileSuffix = _DocVersionConfig.Print_PDFFileSuffix;
|
string PDFFileSuffix = _DocVersionConfig.Print_PDFFileSuffix;
|
||||||
PDFDTPrefix dtPre = _DocVersionConfig.Print_PDFdtFilePrefix;
|
PDFDTPrefix dtPre = _DocVersionConfig.Print_PDFdtFilePrefix;
|
||||||
@ -724,8 +726,8 @@ namespace VEPROMS
|
|||||||
// B2019-128: The combo box list did not include the 'None' option so the selected value was not the correct watermark (had to add 1 to the selected index)
|
// B2019-128: The combo box list did not include the 'None' option so the selected value was not the correct watermark (had to add 1 to the selected index)
|
||||||
string waterMarkText = (swtbtnWaterMark.Value) ? cbxWaterMark.Text : "None"; // C2021-019
|
string waterMarkText = (swtbtnWaterMark.Value) ? cbxWaterMark.Text : "None"; // C2021-019
|
||||||
string watermarkColor = "Blue"; // this is the default watermark color
|
string watermarkColor = "Blue"; // this is the default watermark color
|
||||||
// Determine change bar settings. First get from config & then see if override from dialog.
|
// Determine change bar settings. First get from config & then see if override from dialog.
|
||||||
// Also check that format allows override.
|
// Also check that format allows override.
|
||||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||||
int n = _DocVersionInfo.Procedures.Count;
|
int n = _DocVersionInfo.Procedures.Count;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -772,8 +774,8 @@ namespace VEPROMS
|
|||||||
|
|
||||||
string myPDFPath = GetMultiunitPDFPath();
|
string myPDFPath = GetMultiunitPDFPath();
|
||||||
_MergedPdfPath = myPDFPath; // If Slave, need its subdirectory/unit path for merging
|
_MergedPdfPath = myPDFPath; // If Slave, need its subdirectory/unit path for merging
|
||||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||||
// B2021-102 put in the using for better memory management
|
// B2021-102 put in the using for better memory management
|
||||||
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor, PrtSectID))//;//C2018-009 print PROMS version
|
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor, PrtSectID))//;//C2018-009 print PROMS version
|
||||||
@ -959,9 +961,9 @@ namespace VEPROMS
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MyProcedure.SelectedChildToPrint = SelectedSlave; // B2023-035 for BNPP Alarms save the number of the child selected to print
|
MyProcedure.SelectedChildToPrint = SelectedSlave; // B2023-035 for BNPP Alarms save the number of the child selected to print
|
||||||
// B2021-127: BNPPalr - Auto set of serial #, skip Front Matter as per PAL 11/1/21 (set to 1 not 0)
|
// B2021-127: BNPPalr - Auto set of serial #, skip Front Matter as per PAL 11/1/21 (set to 1 not 0)
|
||||||
// Only do if set has applicability, printing an individual procedure, need to determine
|
// Only do if set has applicability, printing an individual procedure, need to determine
|
||||||
// applicability count.
|
// applicability count.
|
||||||
if (MyProcedure.MyDocVersion.MultiUnitCount > 1)
|
if (MyProcedure.MyDocVersion.MultiUnitCount > 1)
|
||||||
{
|
{
|
||||||
VlnSvgPageHelper.CountInApplProcs = 1;
|
VlnSvgPageHelper.CountInApplProcs = 1;
|
||||||
|
@ -91,6 +91,8 @@ namespace VEPROMS
|
|||||||
get { return _DidAll; }
|
get { return _DidAll; }
|
||||||
set { _DidAll = value; }
|
set { _DidAll = value; }
|
||||||
}
|
}
|
||||||
|
// C2024-003 parameter contains parent section itemid, child section itemid, issubsection flag.
|
||||||
|
// C2024-003 values needed to print section.
|
||||||
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int[] PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
|
@ -1197,17 +1197,17 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
//args.Node.Parent.
|
//args.Node.Parent.
|
||||||
SectionInfo si2 = (args.Node as VETreeNode).VEObject as SectionInfo;
|
SectionInfo si2 = (args.Node as VETreeNode).VEObject as SectionInfo;
|
||||||
int[] _prtSectID = new int[3];
|
int[] _prtSectID = new int[3]; // C2024-003 parameter contains parent section itemid, child section itemid, issubsection flag.
|
||||||
if (si2.IsSubsection == true)
|
if (si2.IsSubsection == true)
|
||||||
{
|
{
|
||||||
// If section is a subsection.
|
// If section is a subsection. Assigned values are section and subsection.
|
||||||
_prtSectID[0] = si2.MyParent.ItemID; // section
|
_prtSectID[0] = si2.MyParent.ItemID; // section
|
||||||
_prtSectID[1] = si2.ItemID; // sub section
|
_prtSectID[1] = si2.ItemID; // sub section
|
||||||
_prtSectID[2] = Convert.ToInt32(si2.IsSubsection); // IsSubSection flag
|
_prtSectID[2] = Convert.ToInt32(si2.IsSubsection); // IsSubSection flag
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If section is a regular section
|
// If section is a regular section. assign values is section is not a subsection.
|
||||||
_prtSectID[0] = si2.ItemID; // section
|
_prtSectID[0] = si2.ItemID; // section
|
||||||
_prtSectID[1] = -1; // sub section
|
_prtSectID[1] = -1; // sub section
|
||||||
_prtSectID[2] = Convert.ToInt32(si2.IsSubsection); // IsSubSection flag
|
_prtSectID[2] = Convert.ToInt32(si2.IsSubsection); // IsSubSection flag
|
||||||
@ -1221,7 +1221,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(si2.MyProcedure))
|
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(si2.MyProcedure))
|
||||||
{
|
{
|
||||||
prnDlg.PrtSectID = _prtSectID;
|
prnDlg.PrtSectID = _prtSectID; // Assign Section print values to parameter used in print secetions / sub sections.
|
||||||
prnDlg.SelectedSlave = args.UnitIndex;
|
prnDlg.SelectedSlave = args.UnitIndex;
|
||||||
prnDlg.MySessionInfo = MySessionInfo;
|
prnDlg.MySessionInfo = MySessionInfo;
|
||||||
prnDlg.SetupForProcedure(); // Setup filename
|
prnDlg.SetupForProcedure(); // Setup filename
|
||||||
|
@ -2803,8 +2803,8 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
tn = new VETreeNode(_LastSectionInfo);
|
tn = new VETreeNode(_LastSectionInfo);
|
||||||
SelectedNode.Nodes.Add(tn); // add tree node to end of list.
|
SelectedNode.Nodes.Add(tn); // add tree node to end of list.
|
||||||
// if the new section was flagged as either having an enhanced link for Title or Contents, create the
|
// if the new section was flagged as either having an enhanced link for Title or Contents, create the
|
||||||
// Enhanced section:
|
// Enhanced section:
|
||||||
Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem.
|
Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem.
|
||||||
if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y")
|
if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y")
|
||||||
CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text);
|
CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text);
|
||||||
@ -2832,7 +2832,7 @@ namespace Volian.Controls.Library
|
|||||||
if (s1 != -1)
|
if (s1 != -1)
|
||||||
{
|
{
|
||||||
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
||||||
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
||||||
_LastTreeNode.ChildrenLoaded = false;
|
_LastTreeNode.ChildrenLoaded = false;
|
||||||
_LastTreeNode.RefreshNode();
|
_LastTreeNode.RefreshNode();
|
||||||
_LastTreeNode.Collapse();
|
_LastTreeNode.Collapse();
|
||||||
@ -2879,7 +2879,7 @@ namespace Volian.Controls.Library
|
|||||||
if (s2 != -1)
|
if (s2 != -1)
|
||||||
{
|
{
|
||||||
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
||||||
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
||||||
_LastTreeNode.ChildrenLoaded = false;
|
_LastTreeNode.ChildrenLoaded = false;
|
||||||
_LastTreeNode.RefreshNode();
|
_LastTreeNode.RefreshNode();
|
||||||
_LastTreeNode.Collapse();
|
_LastTreeNode.Collapse();
|
||||||
|
@ -179,6 +179,8 @@ namespace Volian.Print.Library
|
|||||||
get { return _PDFFile; }
|
get { return _PDFFile; }
|
||||||
set { _PDFFile = value; }
|
set { _PDFFile = value; }
|
||||||
}
|
}
|
||||||
|
// C2024-003 parameter contains parent section itemid, child section itemid, issubsection flag.
|
||||||
|
// C2024-003 values needed to print individual sections.
|
||||||
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int[] PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
@ -341,6 +343,7 @@ namespace Volian.Print.Library
|
|||||||
_BatchPrint = batchPrint;
|
_BatchPrint = batchPrint;
|
||||||
_MyReaderHelper = new ReaderHelper(this);
|
_MyReaderHelper = new ReaderHelper(this);
|
||||||
_SaveLinks = saveLinks;
|
_SaveLinks = saveLinks;
|
||||||
|
// C2024-003 parameter contains parent section itemid, child section itemid, issubsection flag.
|
||||||
_prtSectID = PrtSectID;
|
_prtSectID = PrtSectID;
|
||||||
// C2021-010: Remove trailing returns/spaces & manual page breaks & allow save.
|
// C2021-010: Remove trailing returns/spaces & manual page breaks & allow save.
|
||||||
if (removeTrailngHardReturnsAndManualPageBreaks == 1 || removeTrailngHardReturnsAndManualPageBreaks == 3) RemoveTrailingHardReturnsAndSpaces = new List<int>();
|
if (removeTrailngHardReturnsAndManualPageBreaks == 1 || removeTrailngHardReturnsAndManualPageBreaks == 3) RemoveTrailingHardReturnsAndSpaces = new List<int>();
|
||||||
@ -349,16 +352,7 @@ namespace Volian.Print.Library
|
|||||||
_DidAll = didAll;
|
_DidAll = didAll;
|
||||||
_MergeNotIncluded = false;
|
_MergeNotIncluded = false;
|
||||||
_MergedPdf = mergedPdf;
|
_MergedPdf = mergedPdf;
|
||||||
//if(Convert.ToBoolean(PrtSectID[0]))
|
|
||||||
// {
|
|
||||||
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
|
|
||||||
// }
|
|
||||||
//_prtSectID = PrtSectID;
|
|
||||||
//_MyReaderHelper.LoadTree(myItem);
|
|
||||||
}
|
}
|
||||||
// Pass 1 PDF Name
|
// Pass 1 PDF Name
|
||||||
private string _BeforePageNumberPdf = null;
|
private string _BeforePageNumberPdf = null;
|
||||||
@ -381,7 +375,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
if (_MyItem is ProcedureInfo)
|
if (_MyItem is ProcedureInfo)
|
||||||
{
|
{
|
||||||
_prtSectID = PrtSectID;
|
_prtSectID = PrtSectID; // C2024-003 parameter contains parent section itemid, child section itemid, issubsection flag.
|
||||||
ProcedureConfig pcfg = (ProcedureConfig)(_MyItem as ProcedureInfo).MyConfig;
|
ProcedureConfig pcfg = (ProcedureConfig)(_MyItem as ProcedureInfo).MyConfig;
|
||||||
if (DidAll && pcfg.Print_NotInMergeAll) // will be merging a pdf, so don't print this procedure if user set that on procedure propertures
|
if (DidAll && pcfg.Print_NotInMergeAll) // will be merging a pdf, so don't print this procedure if user set that on procedure propertures
|
||||||
{
|
{
|
||||||
@ -813,18 +807,18 @@ namespace Volian.Print.Library
|
|||||||
VlnItextFont.RegisterFontFolder(); //B2019-174 register the font folder so that symbols will display on auto TOC
|
VlnItextFont.RegisterFontFolder(); //B2019-174 register the font folder so that symbols will display on auto TOC
|
||||||
if (myProcedure.Sections != null)
|
if (myProcedure.Sections != null)
|
||||||
{
|
{
|
||||||
SectionInfo CurSection = null;
|
SectionInfo CurSection = null; // C2024-003 detrimine if the user in printing a sub section.
|
||||||
if (Convert.ToBoolean(PrtSectID[2])) // If section is a CurSection retrieved the CurSection.
|
if (Convert.ToBoolean(PrtSectID[2])) // If section is a CurSection retrieved the CurSection.
|
||||||
{
|
{
|
||||||
foreach (SectionInfo si2 in myProcedure.Sections)
|
foreach (SectionInfo si2 in myProcedure.Sections)
|
||||||
{
|
{
|
||||||
if (si2.ItemID == PrtSectID[0])
|
if (si2.ItemID == PrtSectID[0])
|
||||||
{
|
{
|
||||||
foreach (SectionInfo subsi in si2.Sections)
|
foreach (SectionInfo subsi in si2.Sections) // Find Parent Section
|
||||||
{
|
{
|
||||||
if (subsi.ItemID == PrtSectID[1])
|
if (subsi.ItemID == PrtSectID[1]) // Find sub section
|
||||||
{
|
{
|
||||||
CurSection = subsi;
|
CurSection = subsi; // Assign the subsection object to CurSection.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -833,12 +827,12 @@ namespace Volian.Print.Library
|
|||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||||
{
|
{
|
||||||
if (PrtSectID[0] == -1 || (PrtSectID[0] > -1 && mySection.ItemID == PrtSectID[0]))
|
if (PrtSectID[0] == -1 || (PrtSectID[0] > -1 && mySection.ItemID == PrtSectID[0])) // C2024-003 check if the user is printing a section
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!Convert.ToBoolean(PrtSectID[2])) // If section is not a Sub Section assign the iteration variable to CurSection
|
if (!Convert.ToBoolean(PrtSectID[2])) // If section is not a Sub Section assign the iteration variable to CurSection. CurSection contains any type of section.
|
||||||
{
|
{
|
||||||
CurSection = mySection;
|
CurSection = mySection; // if section is not a sub section.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CurSection.MyDocStyle.IsStepSection && !CurSection.IsAutoTOCSection)
|
if (!CurSection.MyDocStyle.IsStepSection && !CurSection.IsAutoTOCSection)
|
||||||
@ -983,18 +977,19 @@ namespace Volian.Print.Library
|
|||||||
string clr = pc.GetValue("PSI", "WATERMARKOVERRIDECLR");
|
string clr = pc.GetValue("PSI", "WATERMARKOVERRIDECLR");
|
||||||
if (clr != null && clr != "") WatermarkOverrideColor = clr.ToUpper().Contains("DEFAULT") ? "BLUE" : clr;
|
if (clr != null && clr != "") WatermarkOverrideColor = clr.ToUpper().Contains("DEFAULT") ? "BLUE" : clr;
|
||||||
}
|
}
|
||||||
SectionInfo CurSection = null;
|
|
||||||
|
SectionInfo CurSection = null; // C2024-003 detrimine if the user is printing a sub section.1639
|
||||||
if (Convert.ToBoolean(PrtSectID[2]))
|
if (Convert.ToBoolean(PrtSectID[2]))
|
||||||
{
|
{
|
||||||
foreach (SectionInfo si2 in myProcedure.Sections)
|
foreach (SectionInfo si2 in myProcedure.Sections) // Find parent section.
|
||||||
{
|
{
|
||||||
if (si2.ItemID == PrtSectID[0])
|
if (si2.ItemID == PrtSectID[0])
|
||||||
{
|
{
|
||||||
foreach (SectionInfo subsi in si2.Sections)
|
foreach (SectionInfo subsi in si2.Sections) // Find selected sub section.
|
||||||
{
|
{
|
||||||
if (subsi.ItemID == PrtSectID[1])
|
if (subsi.ItemID == PrtSectID[1])
|
||||||
{
|
{
|
||||||
CurSection = subsi;
|
CurSection = subsi; // Assign sub section object to CurSection.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1636,18 +1631,19 @@ namespace Volian.Print.Library
|
|||||||
// C2018-004 create meta file for baseline compares
|
// C2018-004 create meta file for baseline compares
|
||||||
Volian.Base.Library.BaselineMetaFile.WriteLine("TOC Ystart {0} LeftMar {1} ScNmPos {2} ScTtlPos {3} ScPgPos {4}", yPageStart, leftMargin, secNumPos, secTitlePos, secPagePos);
|
Volian.Base.Library.BaselineMetaFile.WriteLine("TOC Ystart {0} LeftMar {1} ScNmPos {2} ScTtlPos {3} ScPgPos {4}", yPageStart, leftMargin, secNumPos, secTitlePos, secPagePos);
|
||||||
bool inGroup = false;
|
bool inGroup = false;
|
||||||
SectionInfo CurSection = null;
|
|
||||||
|
SectionInfo CurSection = null; // C2024-003 detrimine determine if the user in printing a sub section.
|
||||||
if (Convert.ToBoolean(PrtSectID[2]))
|
if (Convert.ToBoolean(PrtSectID[2]))
|
||||||
{
|
{
|
||||||
foreach (SectionInfo si2 in ii.Sections)
|
foreach (SectionInfo si2 in ii.Sections) // Find parent section.
|
||||||
{
|
{
|
||||||
if (si2.ItemID == PrtSectID[0])
|
if (si2.ItemID == PrtSectID[0])
|
||||||
{
|
{
|
||||||
foreach (SectionInfo subsi in si2.Sections)
|
foreach (SectionInfo subsi in si2.Sections) // Find sub section.
|
||||||
{
|
{
|
||||||
if (subsi.ItemID == PrtSectID[1])
|
if (subsi.ItemID == PrtSectID[1])
|
||||||
{
|
{
|
||||||
CurSection = subsi;
|
CurSection = subsi; // Assigned sub section object to CurSection.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3019,18 +3015,19 @@ namespace Volian.Print.Library
|
|||||||
private void LoadSectionTree(ItemInfo ii)
|
private void LoadSectionTree(ItemInfo ii)
|
||||||
{
|
{
|
||||||
if (ii.Sections == null) return; // B2021-067 crash on null reference
|
if (ii.Sections == null) return; // B2021-067 crash on null reference
|
||||||
SectionInfo SubSection = null;
|
SectionInfo CurSection = null;
|
||||||
if (Convert.ToBoolean(MyPromsPrinter.PrtSectID[2])) // If section is a sub section
|
if (Convert.ToBoolean(MyPromsPrinter.PrtSectID[2])) // C2024-003 determine if the user is printing a sub section. If so assign it to CurSection.
|
||||||
{
|
{
|
||||||
foreach (SectionInfo si2 in ii.Sections)
|
foreach (SectionInfo si2 in ii.Sections) // Find parent section
|
||||||
{
|
{
|
||||||
if (si2.ItemID == MyPromsPrinter.PrtSectID[0])
|
if (si2.ItemID == MyPromsPrinter.PrtSectID[0])
|
||||||
{
|
{
|
||||||
foreach (SectionInfo subsi in si2.Sections)
|
foreach (SectionInfo subsi in si2.Sections) // Find sub section.
|
||||||
{
|
{
|
||||||
if (subsi.ItemID == MyPromsPrinter.PrtSectID[0])
|
if (subsi.ItemID == MyPromsPrinter.PrtSectID[1])
|
||||||
{
|
{
|
||||||
SubSection = subsi;
|
CurSection = subsi; // Assign sub section object to CurSection.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3040,13 +3037,17 @@ namespace Volian.Print.Library
|
|||||||
foreach (SectionInfo si in ii.Sections)
|
foreach (SectionInfo si in ii.Sections)
|
||||||
if (MyPromsPrinter.PrtSectID[0] == -1 || (MyPromsPrinter.PrtSectID[0] > -1 && si.ItemID == MyPromsPrinter.PrtSectID[0]))
|
if (MyPromsPrinter.PrtSectID[0] == -1 || (MyPromsPrinter.PrtSectID[0] > -1 && si.ItemID == MyPromsPrinter.PrtSectID[0]))
|
||||||
{
|
{
|
||||||
if (si.IsStepSection)
|
if (!Convert.ToBoolean(MyPromsPrinter.PrtSectID[2])) // If section is not a Sub Section assign the iteration variable to CurSection
|
||||||
{
|
{
|
||||||
if (si.Sections != null) LoadSectionTree(si);
|
CurSection = si;
|
||||||
|
}
|
||||||
|
if (CurSection.IsStepSection)
|
||||||
|
{
|
||||||
|
if (CurSection.Sections != null) LoadSectionTree(CurSection);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MyPdfFile = _MyPromsPrinter.BuildMSWordPDF(si);
|
MyPdfFile = _MyPromsPrinter.BuildMSWordPDF(CurSection);
|
||||||
if (MyPdfFile != null)
|
if (MyPdfFile != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -3055,18 +3056,18 @@ namespace Volian.Print.Library
|
|||||||
if (fi.Length == 0) // B2017-218 Handle invalid word sections
|
if (fi.Length == 0) // B2017-218 Handle invalid word sections
|
||||||
{
|
{
|
||||||
if (!PromsPrinter.BaselineTesting) //B2018-071 Output a message box unless baseline testing is being performed.
|
if (!PromsPrinter.BaselineTesting) //B2018-071 Output a message box unless baseline testing is being performed.
|
||||||
MessageBox.Show(si.DisplayNumber + " " + si.DisplayText + " is not valid", "Invalid Word Section", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
MessageBox.Show(CurSection.DisplayNumber + " " + CurSection.DisplayText + " is not valid", "Invalid Word Section", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MyReader = MyPdfFile != null ? new PdfReader(MyPdfFile) : null;
|
MyReader = MyPdfFile != null ? new PdfReader(MyPdfFile) : null;
|
||||||
string key = string.Empty;
|
string key = string.Empty;
|
||||||
for (int i = 1; i <= MyReader.NumberOfPages; i++)
|
for (int i = 1; i <= MyReader.NumberOfPages; i++)
|
||||||
{
|
{
|
||||||
key = string.Format("{0}.{1}", si.ItemID, i);
|
key = string.Format("{0}.{1}", CurSection.ItemID, i);
|
||||||
dicPage.Add(key, MyPromsPrinter.MyContentByte.PdfWriter.GetImportedPage(MyReader, i));
|
dicPage.Add(key, MyPromsPrinter.MyContentByte.PdfWriter.GetImportedPage(MyReader, i));
|
||||||
iTextSharp.text.Rectangle rectgl = MyReader.GetPageSizeWithRotation(i);
|
iTextSharp.text.Rectangle rectgl = MyReader.GetPageSizeWithRotation(i);
|
||||||
// If the word page is set to landscape, but the document style is not landscape, then flip the height and width (put back to portrait)
|
// If the word page is set to landscape, but the document style is not landscape, then flip the height and width (put back to portrait)
|
||||||
if (!((si.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_WordContentLandscaped) == E_DocStructStyle.DSS_WordContentLandscaped) && rectgl.Height < rectgl.Width)
|
if (!((CurSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_WordContentLandscaped) == E_DocStructStyle.DSS_WordContentLandscaped) && rectgl.Height < rectgl.Width)
|
||||||
rectgl = new iTextSharp.text.Rectangle(rectgl.Height, rectgl.Width);
|
rectgl = new iTextSharp.text.Rectangle(rectgl.Height, rectgl.Width);
|
||||||
dicSize.Add(key, rectgl);
|
dicSize.Add(key, rectgl);
|
||||||
//dicSize.Add(key, MyReader.GetPageSizeWithRotation(i));
|
//dicSize.Add(key, MyReader.GetPageSizeWithRotation(i));
|
||||||
@ -3076,7 +3077,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
if (_MyPromsPrinter.DocReplace == null)
|
if (_MyPromsPrinter.DocReplace == null)
|
||||||
MessageBox.Show(ex.Message, ex.GetType().FullName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(ex.Message, ex.GetType().FullName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
_MyLog.Warn(string.Format("Error in LoadSectionTree [{0}],{1}.{2}", si.ItemID, si.DisplayNumber, si.DisplayText), ex);
|
_MyLog.Warn(string.Format("Error in LoadSectionTree [{0}],{1}.{2}", CurSection.ItemID, CurSection.DisplayNumber, CurSection.DisplayText), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,8 @@ namespace Volian.Print.Library
|
|||||||
get { return _TopMessage; }
|
get { return _TopMessage; }
|
||||||
set { _TopMessage = value; }
|
set { _TopMessage = value; }
|
||||||
}
|
}
|
||||||
|
// C2024-003 parameter contains parent section itemid, child section itemid, issubsection flag.
|
||||||
|
// C2024-003 values needed to print section.
|
||||||
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int[] PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
@ -262,8 +264,8 @@ namespace Volian.Print.Library
|
|||||||
public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document)
|
public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document)
|
||||||
{
|
{
|
||||||
TableAdjustment = 0;// RHM20150525 - Table Scrunch
|
TableAdjustment = 0;// RHM20150525 - Table Scrunch
|
||||||
//string path = Volian.Base.Library.vlnStackTrace.StackToStringLocal(3, 1);
|
//string path = Volian.Base.Library.vlnStackTrace.StackToStringLocal(3, 1);
|
||||||
//Console.WriteLine("End {0}",path);
|
//Console.WriteLine("End {0}",path);
|
||||||
int profileDepth = ProfileTimer.Push(">>>> OnEndPage");
|
int profileDepth = ProfileTimer.Push(">>>> OnEndPage");
|
||||||
InitialsPrinted = false;
|
InitialsPrinted = false;
|
||||||
MyPromsPrinter.OnStatusChanged(string.Format("Page {0}", CurrentPageNumber + 1));
|
MyPromsPrinter.OnStatusChanged(string.Format("Page {0}", CurrentPageNumber + 1));
|
||||||
@ -1361,16 +1363,16 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
bool usePSIvalue = false; // C2021-065 used with ROLkUpMatch pagelist flag (Barakah Alarms)
|
bool usePSIvalue = false; // C2021-065 used with ROLkUpMatch pagelist flag (Barakah Alarms)
|
||||||
string otherChildUnit = string.Empty; // C2021-065 used when OTHER applicability information is used for the ROLookUp
|
string otherChildUnit = string.Empty; // C2021-065 used when OTHER applicability information is used for the ROLookUp
|
||||||
// F2023-035: WCN - allow for change in left margin for supplemental information pages by
|
// F2023-035: WCN - allow for change in left margin for supplemental information pages by
|
||||||
// setting a value in the DocStyle for the adjustment.
|
// setting a value in the DocStyle for the adjustment.
|
||||||
float supInfoMargAdj = 0;
|
float supInfoMargAdj = 0;
|
||||||
if (CreatingSupInfoPage || MyPromsPrinter.DoingFacingPage) supInfoMargAdj = MySection.MyDocStyle.SupInfoMargAdj == null ? 0 : (float)MySection.MyDocStyle.SupInfoMargAdj;
|
if (CreatingSupInfoPage || MyPromsPrinter.DoingFacingPage) supInfoMargAdj = MySection.MyDocStyle.SupInfoMargAdj == null ? 0 : (float)MySection.MyDocStyle.SupInfoMargAdj;
|
||||||
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
||||||
{
|
{
|
||||||
if (pageItem.Token == null) continue; // can be null if token is dependent on PSI lookup!
|
if (pageItem.Token == null) continue; // can be null if token is dependent on PSI lookup!
|
||||||
DidHLSText = false; // reset to false for this group of tokens.
|
DidHLSText = false; // reset to false for this group of tokens.
|
||||||
//if (pageItem.Token.Contains("HLSTEXT"))
|
//if (pageItem.Token.Contains("HLSTEXT"))
|
||||||
// Console.WriteLine("{0} - PageList Token", pageItem.Token);
|
// Console.WriteLine("{0} - PageList Token", pageItem.Token);
|
||||||
|
|
||||||
// the pagelist 'justify="{PSNotFirst}"' flag only puts item out if not on first page of section, check for this
|
// the pagelist 'justify="{PSNotFirst}"' flag only puts item out if not on first page of section, check for this
|
||||||
if (((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSNotFirst) == VEPROMS.CSLA.Library.E_Justify.PSNotFirst)
|
if (((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSNotFirst) == VEPROMS.CSLA.Library.E_Justify.PSNotFirst)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
//using System.Drawing;
|
//using System.Drawing;
|
||||||
@ -268,7 +268,7 @@ namespace Volian.Print.Library
|
|||||||
// F2021-038: SHE/SHEA format - Less space after boxes
|
// F2021-038: SHE/SHEA format - Less space after boxes
|
||||||
if (didSeparateBoxChgYAdjust && childItemInfo.IsStep && childItemInfo.FormatStepData.NoYBxAdjust) yoff -= vlnPrintObject.SixLinesPerInch;
|
if (didSeparateBoxChgYAdjust && childItemInfo.IsStep && childItemInfo.FormatStepData.NoYBxAdjust) yoff -= vlnPrintObject.SixLinesPerInch;
|
||||||
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
||||||
//if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
//if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
||||||
if (childItemInfo.MixCautionNotesDiffType()) ln += 2;
|
if (childItemInfo.MixCautionNotesDiffType()) ln += 2;
|
||||||
box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch);
|
box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch);
|
||||||
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
||||||
@ -419,9 +419,9 @@ namespace Volian.Print.Library
|
|||||||
if (box != null && box.MyBox != null)
|
if (box != null && box.MyBox != null)
|
||||||
{
|
{
|
||||||
box.Height = yoff - box.YOffset; // new height, with children
|
box.Height = yoff - box.YOffset; // new height, with children
|
||||||
// C2017-024 Wolf Creek wanted a hold point with out text and no extra blank lines in the caution/note box
|
// C2017-024 Wolf Creek wanted a hold point with out text and no extra blank lines in the caution/note box
|
||||||
// so if they put only a hard space in for the text, then we will print the note/caution box with only the tab text
|
// so if they put only a hard space in for the text, then we will print the note/caution box with only the tab text
|
||||||
// B2018-077 added check for parts under the note (ex. a table off of the note text) fix for Calvert OI-27B 6.11.B and 6.12.B
|
// B2018-077 added check for parts under the note (ex. a table off of the note text) fix for Calvert OI-27B 6.11.B and 6.12.B
|
||||||
if (box.MyParent.MyItemInfo.MyContent.Text.StartsWith(@"\u160?") && box.MyParent.MyItemInfo.DisplayText.Length == 1 && box.MyParent.MyItemInfo.MyContent.ContentPartCount == 0)
|
if (box.MyParent.MyItemInfo.MyContent.Text.StartsWith(@"\u160?") && box.MyParent.MyItemInfo.DisplayText.Length == 1 && box.MyParent.MyItemInfo.MyContent.ContentPartCount == 0)
|
||||||
{
|
{
|
||||||
box.Height -= 3 * vlnPrintObject.SixLinesPerInch;
|
box.Height -= 3 * vlnPrintObject.SixLinesPerInch;
|
||||||
@ -765,8 +765,8 @@ namespace Volian.Print.Library
|
|||||||
int countLine = 0;
|
int countLine = 0;
|
||||||
string preSuf_Fix = (ii.FormatStepData.Prefix != null && ii.FormatStepData.Prefix != "") ? ii.FormatStepData.Prefix : null;
|
string preSuf_Fix = (ii.FormatStepData.Prefix != null && ii.FormatStepData.Prefix != "") ? ii.FormatStepData.Prefix : null;
|
||||||
if (preSuf_Fix != null) countLine++; // account for a line of prefix (if no \par)
|
if (preSuf_Fix != null) countLine++; // account for a line of prefix (if no \par)
|
||||||
// if this is a proportional font, need to 'draw' the prefix/suffix. NOTE that the suffix should
|
// if this is a proportional font, need to 'draw' the prefix/suffix. NOTE that the suffix should
|
||||||
// just list the headers and the prefix can be 'empty'.
|
// just list the headers and the prefix can be 'empty'.
|
||||||
if (ii.FormatStepData.Font.FontIsProportional())
|
if (ii.FormatStepData.Font.FontIsProportional())
|
||||||
{
|
{
|
||||||
float yLocVertLine = yLocation + (lpi * 1.5F); // +(lpi / 2);
|
float yLocVertLine = yLocation + (lpi * 1.5F); // +(lpi / 2);
|
||||||
@ -959,7 +959,7 @@ namespace Volian.Print.Library
|
|||||||
//if (MyItemInfo.InList(11019,11024,111026)) // RHM20150507 Table Scrunch
|
//if (MyItemInfo.InList(11019,11024,111026)) // RHM20150507 Table Scrunch
|
||||||
// Console.WriteLine("here");
|
// Console.WriteLine("here");
|
||||||
float heightBefore = (MyGrid.Height + 4) * MyPageHelper.YMultiplier; // B2020-014 added parenthesis was calculating wrong for 7lpi Callaway FSG-7 Attachment 7
|
float heightBefore = (MyGrid.Height + 4) * MyPageHelper.YMultiplier; // B2020-014 added parenthesis was calculating wrong for 7lpi Callaway FSG-7 Attachment 7
|
||||||
// B2018-033 Account for bottom continue message when seeing if a scrunched table will fit
|
// B2018-033 Account for bottom continue message when seeing if a scrunched table will fit
|
||||||
float ySizeBtmCtnMess = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
|
float ySizeBtmCtnMess = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
|
||||||
// B2018-085 Ignore the bottom continue message if the Table is the last part of the step.
|
// B2018-085 Ignore the bottom continue message if the Table is the last part of the step.
|
||||||
if (ySizeBtmCtnMess > 0 && MyParent.MyItemInfo.IsHigh && YBottomMost == MyParent.YBottomMost) ySizeBtmCtnMess = 0;
|
if (ySizeBtmCtnMess > 0 && MyParent.MyItemInfo.IsHigh && YBottomMost == MyParent.YBottomMost) ySizeBtmCtnMess = 0;
|
||||||
@ -974,7 +974,7 @@ namespace Volian.Print.Library
|
|||||||
MyPageHelper.TableAdjustment += (heightBefore - heightAfter);
|
MyPageHelper.TableAdjustment += (heightBefore - heightAfter);
|
||||||
MyPageHelper.AdjustedTable = this; // B2020-059 - save the information of the table that is being compressed (used in RTF2PDF.cs TextAt())
|
MyPageHelper.AdjustedTable = this; // B2020-059 - save the information of the table that is being compressed (used in RTF2PDF.cs TextAt())
|
||||||
MyPageHelper.AdjustedTableYtop = yLocation; // B2020-059 save the top location of the compressed table (used in RTF2PDF.cs TextAt())
|
MyPageHelper.AdjustedTableYtop = yLocation; // B2020-059 save the top location of the compressed table (used in RTF2PDF.cs TextAt())
|
||||||
//B2018-092 Determine if the Table is too big by checking it including either 6 LPI or 7 LPI as appropriate
|
//B2018-092 Determine if the Table is too big by checking it including either 6 LPI or 7 LPI as appropriate
|
||||||
if (heightAfter * MyPageHelper.YMultiplier < (yLocation - yBottomMargin - ySizeBtmCtnMess))
|
if (heightAfter * MyPageHelper.YMultiplier < (yLocation - yBottomMargin - ySizeBtmCtnMess))
|
||||||
{
|
{
|
||||||
// B2018-081 - Removed error log message if the code was able to properly adjust the table
|
// B2018-081 - Removed error log message if the code was able to properly adjust the table
|
||||||
@ -1122,11 +1122,11 @@ namespace Volian.Print.Library
|
|||||||
if (MyItemInfo.MyContent.Text.ToUpper().Contains("LINK:TR") && MyItemInfo.MyContent.ContentTransitionCount == 0)
|
if (MyItemInfo.MyContent.Text.ToUpper().Contains("LINK:TR") && MyItemInfo.MyContent.ContentTransitionCount == 0)
|
||||||
Console.WriteLine("Missing Transition {0}", MyItemInfo.ItemID);
|
Console.WriteLine("Missing Transition {0}", MyItemInfo.ItemID);
|
||||||
chk1.SetLocalDestination(string.Format("ItemID={0}", MyItemInfo.ItemID)); // Destination
|
chk1.SetLocalDestination(string.Format("ItemID={0}", MyItemInfo.ItemID)); // Destination
|
||||||
// B2019-052: If multiple ROs/Transitions within a step, each should have a their own link rather than all linking to same thing.
|
// B2019-052: If multiple ROs/Transitions within a step, each should have a their own link rather than all linking to same thing.
|
||||||
// Note the pdf link code that was here was moved to Rtf2iTextSharp.cs in DoVisitText so that each 'chunk' could have a link.
|
// Note the pdf link code that was here was moved to Rtf2iTextSharp.cs in DoVisitText so that each 'chunk' could have a link.
|
||||||
// The code that remained here was the code that marks the destination for each step & the code that does the pdf links for
|
// The code that remained here was the code that marks the destination for each step & the code that does the pdf links for
|
||||||
// enhanced steps.
|
// enhanced steps.
|
||||||
// Also, the method GetDefaultItemInfo was moved to Rtf2iTextSharp.cs also - it was only called from code that was moved.
|
// Also, the method GetDefaultItemInfo was moved to Rtf2iTextSharp.cs also - it was only called from code that was moved.
|
||||||
|
|
||||||
StepConfig sc = new StepConfig(MyItemInfo.MyContent.Config);
|
StepConfig sc = new StepConfig(MyItemInfo.MyContent.Config);
|
||||||
DVEnhancedDocuments dveds = MyItemInfo.MyDocVersion.DocVersionConfig.MyEnhancedDocuments;
|
DVEnhancedDocuments dveds = MyItemInfo.MyDocVersion.DocVersionConfig.MyEnhancedDocuments;
|
||||||
@ -1208,7 +1208,7 @@ namespace Volian.Print.Library
|
|||||||
int fontStyle = 0;
|
int fontStyle = 0;
|
||||||
bool underline = false;
|
bool underline = false;
|
||||||
if (pi == null) // The header for the signoffs is missing in the current section format.
|
if (pi == null) // The header for the signoffs is missing in the current section format.
|
||||||
// An Example can currently be found in Calvert OI-34
|
// An Example can currently be found in Calvert OI-34
|
||||||
{
|
{
|
||||||
if (!MissingInitials) // Only show this once.
|
if (!MissingInitials) // Only show this once.
|
||||||
{
|
{
|
||||||
@ -1454,9 +1454,9 @@ namespace Volian.Print.Library
|
|||||||
private void ResetDocStyleAndValues(ref float yTopMargin, ref float yBottomMargin)
|
private void ResetDocStyleAndValues(ref float yTopMargin, ref float yBottomMargin)
|
||||||
{
|
{
|
||||||
float _PointsPerPage = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize); // C2020-002 paper size is now set in the format files
|
float _PointsPerPage = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize); // C2020-002 paper size is now set in the format files
|
||||||
// if this document style has another style that is for pages other than first, we need to
|
// if this document style has another style that is for pages other than first, we need to
|
||||||
// reset the document style off of this section AND reset docstyle values used.
|
// reset the document style off of this section AND reset docstyle values used.
|
||||||
// C2018-003 fixed use of getting the active section
|
// C2018-003 fixed use of getting the active section
|
||||||
if (MyItemInfo.ActiveSection != null && (MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
if (MyItemInfo.ActiveSection != null && (MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
||||||
{
|
{
|
||||||
ItemInfo ii = (ItemInfo)MyItemInfo.ActiveSection;
|
ItemInfo ii = (ItemInfo)MyItemInfo.ActiveSection;
|
||||||
@ -1501,9 +1501,9 @@ namespace Volian.Print.Library
|
|||||||
ItemInfo itemInfo = tmp;
|
ItemInfo itemInfo = tmp;
|
||||||
if (itemInfo.IsCautionOrNotePart) itemInfo = itemInfo.ActiveParent as ItemInfo; // if caution/note get to its associated step
|
if (itemInfo.IsCautionOrNotePart) itemInfo = itemInfo.ActiveParent as ItemInfo; // if caution/note get to its associated step
|
||||||
itemInfo = itemInfo.ActiveParent as ItemInfo; // don't want this one in the combined tab, start at parent
|
itemInfo = itemInfo.ActiveParent as ItemInfo; // don't want this one in the combined tab, start at parent
|
||||||
// B2018-084: continue message had bullets in it that didn't have correct font. The message should not have had bullets at
|
// B2018-084: continue message had bullets in it that didn't have correct font. The message should not have had bullets at
|
||||||
// all - in the following line, there was an 'if' rather than a 'while' - go up parents until find the correct step type
|
// all - in the following line, there was an 'if' rather than a 'while' - go up parents until find the correct step type
|
||||||
// don't just go up 1 level.
|
// don't just go up 1 level.
|
||||||
while (!itemInfo.IsHigh && !itemInfo.IsSequential && !itemInfo.IsSection) itemInfo = itemInfo.ActiveParent as ItemInfo;
|
while (!itemInfo.IsHigh && !itemInfo.IsSequential && !itemInfo.IsSection) itemInfo = itemInfo.ActiveParent as ItemInfo;
|
||||||
string prTab = "";
|
string prTab = "";
|
||||||
string thisTab = itemInfo.MyTab.CleanText.Trim();
|
string thisTab = itemInfo.MyTab.CleanText.Trim();
|
||||||
@ -2081,8 +2081,8 @@ namespace Volian.Print.Library
|
|||||||
YTopMost = OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
YTopMost = OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
||||||
MyPromsPrinter.NewPage(); // HLS (7 lpi) breakif (MyItemInfo.IsSection)
|
MyPromsPrinter.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);
|
||||||
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
||||||
//Console.WriteLine("'a3',{0},'{1}',{2},{3},{4},{5},{6}", MyItemInfo.ItemID, MyItemInfo.ShortPath, yTopMargin, yPageStart, yLocation, YTopMost, YOffset);
|
//Console.WriteLine("'a3',{0},'{1}',{2},{3},{4},{5},{6}", MyItemInfo.ItemID, MyItemInfo.ShortPath, yTopMargin, yPageStart, yLocation, YTopMost, YOffset);
|
||||||
DebugText.WriteLine("Paginate3");
|
DebugText.WriteLine("Paginate3");
|
||||||
@ -2970,9 +2970,9 @@ namespace Volian.Print.Library
|
|||||||
float colPos = docstyle.Layout.LeftMargin + docstyle.Continue.Top.Margin ?? 0;
|
float colPos = docstyle.Layout.LeftMargin + docstyle.Continue.Top.Margin ?? 0;
|
||||||
if (!docstyle.Continue.Top.PlaceAtLeftMargin) //F2019-033 when true position with respect only to the left margin
|
if (!docstyle.Continue.Top.PlaceAtLeftMargin) //F2019-033 when true position with respect only to the left margin
|
||||||
colPos += XOffsetBox; //XOffsetbox get set when the tables, figures & equations were beyond the border and needed repositioned
|
colPos += XOffsetBox; //XOffsetbox get set when the tables, figures & equations were beyond the border and needed repositioned
|
||||||
// C2019-044 for BNPP, put the top continue message on the same row as the checkoff/signoff heading
|
// C2019-044 for BNPP, put the top continue message on the same row as the checkoff/signoff heading
|
||||||
// RowOverride specifies the position of the top continue message
|
// RowOverride specifies the position of the top continue message
|
||||||
// For BNPP, RowOverride is set to the same row as the checkoff header is set to in the pagelist
|
// For BNPP, RowOverride is set to the same row as the checkoff header is set to in the pagelist
|
||||||
if (docstyle.Continue.Top.RowOverride != null)
|
if (docstyle.Continue.Top.RowOverride != null)
|
||||||
{
|
{
|
||||||
float adjRowPosition = (float)docstyle.Layout.TopMargin - (float)docstyle.Continue.Top.RowOverride;
|
float adjRowPosition = (float)docstyle.Layout.TopMargin - (float)docstyle.Continue.Top.RowOverride;
|
||||||
@ -3054,8 +3054,8 @@ namespace Volian.Print.Library
|
|||||||
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; // (need this for IP3)
|
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; // (need this for IP3)
|
||||||
msg_yLocation = Math.Max(msg_yLocation, yBottomMargin + SixLinesPerInch);
|
msg_yLocation = Math.Max(msg_yLocation, yBottomMargin + SixLinesPerInch);
|
||||||
break;
|
break;
|
||||||
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
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 = yBottomMargin + 2 * SixLinesPerInch + (float)docstyle.Layout.FooterLength; // 2 lines above bottom margin
|
||||||
msg_yLocation = msg_yLocation + yBtmMarginForMsg + (float)docstyle.Layout.FooterLength;
|
msg_yLocation = msg_yLocation + yBtmMarginForMsg + (float)docstyle.Layout.FooterLength;
|
||||||
// if (MyPageHelper.YMultiplier != 1.0F) msg_yLocation = msg_yLocation / MyPageHelper.YMultiplier;
|
// if (MyPageHelper.YMultiplier != 1.0F) msg_yLocation = msg_yLocation / MyPageHelper.YMultiplier;
|
||||||
break;
|
break;
|
||||||
@ -3999,10 +3999,10 @@ namespace Volian.Print.Library
|
|||||||
if (YOffset != 0 && MyItemInfo.FormatStepData != null &&
|
if (YOffset != 0 && MyItemInfo.FormatStepData != null &&
|
||||||
MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove && (!MyItemInfo.IsNote || MyItemInfo.MyParent.Cautions == null))
|
MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove && (!MyItemInfo.IsNote || MyItemInfo.MyParent.Cautions == null))
|
||||||
addExtraSpace = 24; // already has one blank line above, added two more
|
addExtraSpace = 24; // already has one blank line above, added two more
|
||||||
//if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0)
|
//if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0)
|
||||||
// addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace;
|
// addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace;
|
||||||
// if this plant has the AlwaysUseExtraLines and there are notes/cautions above the hls, don't add in the
|
// if this plant has the AlwaysUseExtraLines and there are notes/cautions above the hls, don't add in the
|
||||||
// extra space:
|
// extra space:
|
||||||
if (itemInfo.IsHigh && (itemInfo.Cautions != null || itemInfo.Notes != null))
|
if (itemInfo.IsHigh && (itemInfo.Cautions != null || itemInfo.Notes != null))
|
||||||
{
|
{
|
||||||
if ((itemInfo.Cautions != null && itemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (itemInfo.Notes != null && itemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines))
|
if ((itemInfo.Cautions != null && itemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (itemInfo.Notes != null && itemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines))
|
||||||
@ -4078,7 +4078,7 @@ namespace Volian.Print.Library
|
|||||||
yoff = YOffset = yoff + (2 * SixLinesPerInch);
|
yoff = YOffset = yoff + (2 * SixLinesPerInch);
|
||||||
CheckOff co = itemInfo.GetCheckOffStep();
|
CheckOff co = itemInfo.GetCheckOffStep();
|
||||||
float yForCheckoff = yoff; //0; - default checkoff row is same as FIRST line of text
|
float yForCheckoff = yoff; //0; - default checkoff row is same as FIRST line of text
|
||||||
// if dropCheckoff is true, then the checkoff is place on the same of row as the LAST line of text
|
// if dropCheckoff is true, then the checkoff is place on the same of row as the LAST line of text
|
||||||
bool dropCheckoff = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.DropCheckOff
|
bool dropCheckoff = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.DropCheckOff
|
||||||
|| (co != null && co.DropCheckOff);
|
|| (co != null && co.DropCheckOff);
|
||||||
if (itemInfo.MyContent.MyGrid != null)
|
if (itemInfo.MyContent.MyGrid != null)
|
||||||
@ -4490,10 +4490,10 @@ namespace Volian.Print.Library
|
|||||||
if (MyTab != null) MyTab.YOffset = ChildrenRight[0].YOffset;
|
if (MyTab != null) MyTab.YOffset = ChildrenRight[0].YOffset;
|
||||||
if (PartsRight.Count > 0) PartsRight[0].YOffset = ChildrenRight[0].YOffset;
|
if (PartsRight.Count > 0) PartsRight[0].YOffset = ChildrenRight[0].YOffset;
|
||||||
//B2020-160 use YTopMost instead of Yoffset if there are children above.
|
//B2020-160 use YTopMost instead of Yoffset if there are children above.
|
||||||
// Get the minimun value between the AER and RNO YtopMost.
|
// Get the minimun value between the AER and RNO YtopMost.
|
||||||
// example. Calvert AOP-7E/XIII/Step A5.h Unit 2 Approved set
|
// example. Calvert AOP-7E/XIII/Step A5.h Unit 2 Approved set
|
||||||
//B2021-027 use YOffset if there isn't any children above (AER).
|
//B2021-027 use YOffset if there isn't any children above (AER).
|
||||||
// example: Catawba Unit 1 APs; AP/1/A/5500/050; Enclosure 8 step 1
|
// example: Catawba Unit 1 APs; AP/1/A/5500/050; Enclosure 8 step 1
|
||||||
if (ChildrenAbove.Count == 0)
|
if (ChildrenAbove.Count == 0)
|
||||||
YTopMost = ChildrenRight[0].ChildrenAbove[0].YOffset; //B2021-027
|
YTopMost = ChildrenRight[0].ChildrenAbove[0].YOffset; //B2021-027
|
||||||
else
|
else
|
||||||
@ -4871,7 +4871,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
results.Add(responsStr.Substring(start, lastspace - start).Trim(" ".ToCharArray()) + "\r\n");
|
results.Add(responsStr.Substring(start, lastspace - start).Trim(" ".ToCharArray()) + "\r\n");
|
||||||
start = lastspace + (spFound ? 1 : 0); // increment start based on whether a space is found, i.e. if no space keep at 'indx'
|
start = lastspace + (spFound ? 1 : 0); // increment start based on whether a space is found, i.e. if no space keep at 'indx'
|
||||||
// width either is equal to width of text after the last space, or is zero if at the maxlen of width:
|
// width either is equal to width of text after the last space, or is zero if at the maxlen of width:
|
||||||
width = (indx - lastspace - 1) > 0 ? indx - lastspace - 1 : 0;
|
width = (indx - lastspace - 1) > 0 ? indx - lastspace - 1 : 0;
|
||||||
lastspace = 0;
|
lastspace = 0;
|
||||||
}
|
}
|
||||||
@ -5375,7 +5375,7 @@ namespace Volian.Print.Library
|
|||||||
XOffset -= (XOffset - (XOffset * (float)MyItemInfo.FormatStepData.Font.CPI / 12));
|
XOffset -= (XOffset - (XOffset * (float)MyItemInfo.FormatStepData.Font.CPI / 12));
|
||||||
}
|
}
|
||||||
XOffset -= 12; // This makes the 16bit & 32bit align very closely.
|
XOffset -= 12; // This makes the 16bit & 32bit align very closely.
|
||||||
// if outside of the page margins then center within the page margins
|
// if outside of the page margins then center within the page margins
|
||||||
float xOffset2 = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
|
float xOffset2 = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
|
||||||
float xWidth2 = (float)itemInfo.MyDocStyle.Layout.PageWidth;
|
float xWidth2 = (float)itemInfo.MyDocStyle.Layout.PageWidth;
|
||||||
if (XOffset + Width > xOffset2 + xWidth2)
|
if (XOffset + Width > xOffset2 + xWidth2)
|
||||||
@ -5802,19 +5802,19 @@ namespace Volian.Print.Library
|
|||||||
xoff = XOffset + (para.Width / 2) + (hdrWidth / 2); // XOffset has left margin included
|
xoff = XOffset + (para.Width / 2) + (hdrWidth / 2); // XOffset has left margin included
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xoff = XOffset; // XOffset has left margin included
|
xoff = XOffset; // XOffset has left margin included
|
||||||
// KEEP: This may be needed in the future to fix location of 'OR's when Separator location="0"
|
// KEEP: This may be needed in the future to fix location of 'OR's when Separator location="0"
|
||||||
// the following code would place the 'OR' at the location of the tab rather than text. This
|
// the following code would place the 'OR' at the location of the tab rather than text. This
|
||||||
// is how 16bit was. However, a number of plants had been sent out with the xoffset at the xlocation
|
// is how 16bit was. However, a number of plants had been sent out with the xoffset at the xlocation
|
||||||
// of text (does not match 16bit) when this was found for BGE OI3/OI-1B/6.1.B.4. Previous releases
|
// of text (does not match 16bit) when this was found for BGE OI3/OI-1B/6.1.B.4. Previous releases
|
||||||
// went to CAT, MCG, FPL, NSP.
|
// went to CAT, MCG, FPL, NSP.
|
||||||
//{
|
//{
|
||||||
// if (this.MyTab != null)
|
// if (this.MyTab != null)
|
||||||
// xoff = this.MyTab.XOffset;
|
// xoff = this.MyTab.XOffset;
|
||||||
// else
|
// else
|
||||||
// xoff = XOffset;
|
// xoff = XOffset;
|
||||||
//}
|
//}
|
||||||
// B2018-096 AEP 082.002CD Note Box overlapping Step Box
|
// B2018-096 AEP 082.002CD Note Box overlapping Step Box
|
||||||
vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff + AdjustHeader + _MyBoxLeftAdj, YOffset, itemInfo.MyHeader.MyFont);
|
vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff + AdjustHeader + _MyBoxLeftAdj, YOffset, itemInfo.MyHeader.MyFont);
|
||||||
PartsAbove.Add(myHeader);
|
PartsAbove.Add(myHeader);
|
||||||
//return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? SixLinesPerInch : 0);
|
//return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? SixLinesPerInch : 0);
|
||||||
@ -6251,9 +6251,9 @@ namespace Volian.Print.Library
|
|||||||
//Adjust Indent for Wolf Creek Background format flag
|
//Adjust Indent for Wolf Creek Background format flag
|
||||||
float indentBG2 = itemInfo.IsPartOfBackgroundStep() ? itemInfo.FormatStepData.Font.CharsToTwips * 2 : 0;
|
float indentBG2 = itemInfo.IsPartOfBackgroundStep() ? itemInfo.FormatStepData.Font.CharsToTwips * 2 : 0;
|
||||||
XOffset = childindent + MyParent.XOffset + indentBG2;//(itemInfo.FormatStepData.Font.CharsToTwips * 2);
|
XOffset = childindent + MyParent.XOffset + indentBG2;//(itemInfo.FormatStepData.Font.CharsToTwips * 2);
|
||||||
// B2016-164: Added the following 'if' so that the width is not recalculated if in the alarm format & the parent has a template
|
// B2016-164: Added the following 'if' so that the width is not recalculated if in the alarm format & the parent has a template
|
||||||
// B2016-168: The fix for 164 broke deviation document printing. The if statement was fixed for both:
|
// B2016-168: The fix for 164 broke deviation document printing. The if statement was fixed for both:
|
||||||
// B2019-057 Added a check to see if there is a width override for this step element (Robinson AOP Backgrounds - paragraphs)
|
// B2019-057 Added a check to see if there is a width override for this step element (Robinson AOP Backgrounds - paragraphs)
|
||||||
float wdthovrd = (itemInfo.FormatStepData.WidthOverride == null) ? 0 : (float)ToInt(itemInfo.FormatStepData.WidthOverride, maxRNO);
|
float wdthovrd = (itemInfo.FormatStepData.WidthOverride == null) ? 0 : (float)ToInt(itemInfo.FormatStepData.WidthOverride, maxRNO);
|
||||||
if ((!itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || !UseTemplateWidthOrXOff(itemInfo.MyParent)) && wdthovrd == 0)
|
if ((!itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || !UseTemplateWidthOrXOff(itemInfo.MyParent)) && wdthovrd == 0)
|
||||||
Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin - indentBG2;
|
Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin - indentBG2;
|
||||||
@ -7272,3 +7272,4 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user