C2024-003-Print-Sub-Section
This commit is contained in:
parent
77d31a4a99
commit
dcfdf5f852
@ -59,8 +59,8 @@ namespace VEPROMS
|
|||||||
get { return _Automatic; }
|
get { return _Automatic; }
|
||||||
set { _Automatic = value; }
|
set { _Automatic = value; }
|
||||||
}
|
}
|
||||||
private int _prtSectID = -1;
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
get { return _prtSectID; }
|
get { return _prtSectID; }
|
||||||
set { _prtSectID = value; }
|
set { _prtSectID = value; }
|
||||||
@ -86,7 +86,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
cbxDebugPagination.Checked = true;
|
cbxDebugPagination.Checked = true;
|
||||||
cbxDebugText.Checked = true;
|
cbxDebugText.Checked = true;
|
||||||
cbxMetaFile.Checked = true; // C2018-004 create meta file for baseline compares
|
cbxMetaFile.Checked = true; // C2018-004 create meta file for baseline compares
|
||||||
_IncludeWordSecTextInMetafile = true;
|
_IncludeWordSecTextInMetafile = true;
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
|
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
|
||||||
@ -101,7 +101,7 @@ namespace VEPROMS
|
|||||||
cbxDebug.Checked = false;
|
cbxDebug.Checked = false;
|
||||||
else if (parameter.ToUpper() == "/NM")
|
else if (parameter.ToUpper() == "/NM")
|
||||||
cbxMetaFile.Checked = false; // C2018-004 turn off create meta file for baseline compares
|
cbxMetaFile.Checked = false; // C2018-004 turn off create meta file for baseline compares
|
||||||
else if (parameter.ToUpper() == "/NW")
|
else if (parameter.ToUpper() == "/NW")
|
||||||
_IncludeWordSecTextInMetafile = false; // C2018-023 turn off putting Word attachment text in the meta file for baseline compares
|
_IncludeWordSecTextInMetafile = false; // C2018-023 turn off putting Word attachment text in the meta file for baseline compares
|
||||||
}
|
}
|
||||||
CreatePDFs();
|
CreatePDFs();
|
||||||
@ -143,7 +143,8 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
public string PDFPath
|
public string PDFPath
|
||||||
{
|
{
|
||||||
get {// B2018-069 Revert to Temporary for Baseline testing
|
get
|
||||||
|
{// B2018-069 Revert to Temporary for Baseline testing
|
||||||
if (PromsPrinter.BaselineTesting)
|
if (PromsPrinter.BaselineTesting)
|
||||||
return VlnSettings.TemporaryFolder;
|
return VlnSettings.TemporaryFolder;
|
||||||
return txbPDFLocation.Text;
|
return txbPDFLocation.Text;
|
||||||
@ -190,7 +191,7 @@ namespace VEPROMS
|
|||||||
if (_MyProcedure != null && _MyProcedure.ProcHasSupInfoData)
|
if (_MyProcedure != null && _MyProcedure.ProcHasSupInfoData)
|
||||||
{
|
{
|
||||||
swtbtnBlankPgsForDuplex.Enabled = false;
|
swtbtnBlankPgsForDuplex.Enabled = false;
|
||||||
tbBlankPage.Enabled = true; // C2019-004: Allow user to define duplex blank page text (similar changes throughout file are not commented)
|
tbBlankPage.Enabled = true; // C2019-004: Allow user to define duplex blank page text (similar changes throughout file are not commented)
|
||||||
}
|
}
|
||||||
btnCreatePDF.Text = "Create PDFs";
|
btnCreatePDF.Text = "Create PDFs";
|
||||||
HandleDocVersionSettings();
|
HandleDocVersionSettings();
|
||||||
@ -309,7 +310,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
base.OnActivated(e);
|
base.OnActivated(e);
|
||||||
if (Owner != null)
|
if (Owner != null)
|
||||||
Location = new Point(Owner.Left + Owner.Width / 2 - Width / 2, Owner.Top + Owner.Height/2 - Height/2);
|
Location = new Point(Owner.Left + Owner.Width / 2 - Width / 2, Owner.Top + Owner.Height / 2 - Height / 2);
|
||||||
}
|
}
|
||||||
private void HandleDocVersionSettings()
|
private void HandleDocVersionSettings()
|
||||||
{
|
{
|
||||||
@ -323,10 +324,10 @@ namespace VEPROMS
|
|||||||
// if the default setting is 'SelectBeforePrinting', expand the Additional Print Settings panel
|
// if the default setting is 'SelectBeforePrinting', expand the Additional Print Settings panel
|
||||||
if (_DocVersionConfig.Print_ChangeBar == PrintChangeBar.SelectBeforePrinting)
|
if (_DocVersionConfig.Print_ChangeBar == PrintChangeBar.SelectBeforePrinting)
|
||||||
{
|
{
|
||||||
swtbtnChgBar.Value = false;
|
swtbtnChgBar.Value = false;
|
||||||
cbxOvrrideDefChgBars.Checked = false;
|
cbxOvrrideDefChgBars.Checked = false;
|
||||||
expPrnSetting.Expanded = true;
|
expPrnSetting.Expanded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GetDocVersionSettings()
|
private void GetDocVersionSettings()
|
||||||
@ -373,7 +374,7 @@ namespace VEPROMS
|
|||||||
// default to using OriginalPageBreaks (16bit page breaks) if App.config is set
|
// default to using OriginalPageBreaks (16bit page breaks) if App.config is set
|
||||||
// to true:
|
// to true:
|
||||||
//cbxOrPgBrk.Visible = VlnSettings.OriginalPageBreak && VlnSettings.DebugMode;
|
//cbxOrPgBrk.Visible = VlnSettings.OriginalPageBreak && VlnSettings.DebugMode;
|
||||||
cbxOrPgBrk.Visible = false; //per Harry
|
cbxOrPgBrk.Visible = false; //per Harry
|
||||||
cbxOrPgBrk.Checked = false;
|
cbxOrPgBrk.Checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +411,7 @@ namespace VEPROMS
|
|||||||
private Timer _MyTimer;
|
private Timer _MyTimer;
|
||||||
public void SetupForProcedure() // RHM20150506 Multiline ItemID TextBox
|
public void SetupForProcedure() // RHM20150506 Multiline ItemID TextBox
|
||||||
{
|
{
|
||||||
if(_DocVersionInfo == null)this.Text = "Create PDF for " + ProcNum;
|
if (_DocVersionInfo == null) this.Text = "Create PDF for " + ProcNum;
|
||||||
// get list of previous pdf files
|
// get list of previous pdf files
|
||||||
// if no previous pdf file, then get path from frmVersionProperties
|
// if no previous pdf file, then get path from frmVersionProperties
|
||||||
// dlgSelectFile.InitialDirectory = pdf path from frmVersionProperties
|
// dlgSelectFile.InitialDirectory = pdf path from frmVersionProperties
|
||||||
@ -419,20 +420,20 @@ namespace VEPROMS
|
|||||||
//txbPDFLocation.Text = _PDFPath;
|
//txbPDFLocation.Text = _PDFPath;
|
||||||
BuildPDFFileName();
|
BuildPDFFileName();
|
||||||
ProcedureConfig pc = _MyProcedure.MyConfig as ProcedureConfig;
|
ProcedureConfig pc = _MyProcedure.MyConfig as ProcedureConfig;
|
||||||
if(SelectedSlave > 0) pc.SelectedSlave = SelectedSlave;
|
if (SelectedSlave > 0) pc.SelectedSlave = SelectedSlave;
|
||||||
if (pc != null)
|
if (pc != null)
|
||||||
{
|
{
|
||||||
//C2021-062 use the save rev number for all procedures if set, or just use the rev number in the current procedure config
|
//C2021-062 use the save rev number for all procedures if set, or just use the rev number in the current procedure config
|
||||||
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("\\")))
|
||||||
{
|
{
|
||||||
int indx = RevNum.IndexOf(_MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash ? '\\' : '/');
|
int indx = RevNum.IndexOf(_MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash ? '\\' : '/');
|
||||||
pc.Print_RevDate = RevDate = RevNum.Substring(indx + 1);
|
pc.Print_RevDate = RevDate = RevNum.Substring(indx + 1);
|
||||||
pc.Print_Rev = RevNum = RevNum.Substring(0, indx);
|
pc.Print_Rev = RevNum = RevNum.Substring(0, indx);
|
||||||
// save the RevNumber and RevDate to the procedure's config.
|
// save the RevNumber and RevDate to the procedure's config.
|
||||||
@ -529,9 +530,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;
|
||||||
@ -564,7 +565,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;
|
||||||
@ -607,7 +608,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
private void swtbtnWaterMark_ValueChanged(object sender, EventArgs e)
|
private void swtbtnWaterMark_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!swtbtnWaterMark.Value) // C2021-019: make both invisible
|
if (!swtbtnWaterMark.Value) // C2021-019: make both invisible
|
||||||
{
|
{
|
||||||
cbxWaterMark.Visible = swtbtnWaterMark.Value;
|
cbxWaterMark.Visible = swtbtnWaterMark.Value;
|
||||||
lblWaterMarkOvrd.Visible = swtbtnWaterMark.Value;
|
lblWaterMarkOvrd.Visible = swtbtnWaterMark.Value;
|
||||||
@ -634,7 +635,7 @@ namespace VEPROMS
|
|||||||
if (!Directory.Exists(PDFPath))
|
if (!Directory.Exists(PDFPath))
|
||||||
{
|
{
|
||||||
string msg = string.Format("'{0}' does not exist. \n\nCreate it?", PDFPath);
|
string msg = string.Format("'{0}' does not exist. \n\nCreate it?", PDFPath);
|
||||||
DialogResult dr= MessageBox.Show(msg, "Folder Not Found", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
DialogResult dr = MessageBox.Show(msg, "Folder Not Found", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||||
if (dr == DialogResult.Yes)
|
if (dr == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -723,18 +724,18 @@ 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;
|
||||||
pbPDFsStatus.Maximum = n;
|
pbPDFsStatus.Maximum = n;
|
||||||
pbPDFsStatus.Visible = true;
|
pbPDFsStatus.Visible = true;
|
||||||
VlnSvgPageHelper.CountInApplProcs = 1; // B2021-127: BNPPalr - Auto set of serial #, skip Front Matter as per PAL 11/1/21 (set to 1 not 0)
|
VlnSvgPageHelper.CountInApplProcs = 1; // B2021-127: BNPPalr - Auto set of serial #, skip Front Matter as per PAL 11/1/21 (set to 1 not 0)
|
||||||
this.Text = string.Format("Processing {0}", _DocVersionInfo.MyFolder.Name);
|
this.Text = string.Format("Processing {0}", _DocVersionInfo.MyFolder.Name);
|
||||||
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
|
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
|
||||||
{
|
{
|
||||||
string locpdfname = null; // get pdf file name for later merge code
|
string locpdfname = null; // get pdf file name for later merge code
|
||||||
MyProcedure = myProc;
|
MyProcedure = myProc;
|
||||||
// C2021-019: Override Watermark Text, 'waterMarkText' will have whatever watermark text should be printed
|
// C2021-019: Override Watermark Text, 'waterMarkText' will have whatever watermark text should be printed
|
||||||
ProcedureConfig procConfig = MyProcedure.MyConfig as ProcedureConfig;
|
ProcedureConfig procConfig = MyProcedure.MyConfig as ProcedureConfig;
|
||||||
@ -772,7 +773,7 @@ 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
|
||||||
@ -871,7 +872,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pbPDFsStatus.Visible = false;
|
pbPDFsStatus.Visible = false;
|
||||||
if(!Automatic)
|
if (!Automatic)
|
||||||
ShowDebugFiles();
|
ShowDebugFiles();
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
ProfileTimer.ShowTimerTable();
|
ProfileTimer.ShowTimerTable();
|
||||||
@ -943,7 +944,7 @@ namespace VEPROMS
|
|||||||
if (cbxDebugText.Checked)
|
if (cbxDebugText.Checked)
|
||||||
Volian.Base.Library.DebugText.Show();
|
Volian.Base.Library.DebugText.Show();
|
||||||
if (cbxMetaFile.Checked)// C2018-004 create meta file for baseline compares
|
if (cbxMetaFile.Checked)// C2018-004 create meta file for baseline compares
|
||||||
Volian.Base.Library.BaselineMetaFile.Show(); // baseline
|
Volian.Base.Library.BaselineMetaFile.Show(); // baseline
|
||||||
}
|
}
|
||||||
public void CreatePDF() // RHM20150506 Multiline ItemID TextBox
|
public void CreatePDF() // RHM20150506 Multiline ItemID TextBox
|
||||||
{
|
{
|
||||||
@ -958,9 +959,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;
|
||||||
@ -977,12 +978,12 @@ namespace VEPROMS
|
|||||||
Volian.Print.Library.Rtf2Pdf.PdfDebug = cbxDebug.Checked;
|
Volian.Print.Library.Rtf2Pdf.PdfDebug = cbxDebug.Checked;
|
||||||
// B2019-044 don't print the watermark if the watermark switch on the print dialog is turned off
|
// B2019-044 don't print the watermark if the watermark switch on the print dialog is turned off
|
||||||
cbxWaterMark.Visible = true;
|
cbxWaterMark.Visible = true;
|
||||||
string waterMarkText = (swtbtnWaterMark.Value) ? cbxWaterMark.Text : "None" ; // B2018-124 use text of watermark form drop down list instead of enum value
|
string waterMarkText = (swtbtnWaterMark.Value) ? cbxWaterMark.Text : "None"; // B2018-124 use text of watermark form drop down list instead of enum value
|
||||||
string watermarkColor = "Blue"; // this is the default watermark color
|
string watermarkColor = "Blue"; // this is the default watermark color
|
||||||
frmPDFStatusForm.SetUnitWatermark(MyProcedure, ref waterMarkText, ref watermarkColor); //C2022-004 Unit Designator Watermark
|
frmPDFStatusForm.SetUnitWatermark(MyProcedure, ref waterMarkText, ref watermarkColor); //C2022-004 Unit Designator Watermark
|
||||||
ProcedureConfig procConfig = MyProcedure.MyConfig as ProcedureConfig;
|
ProcedureConfig procConfig = MyProcedure.MyConfig as ProcedureConfig;
|
||||||
string waterMarkTextOverride = "";
|
string waterMarkTextOverride = "";
|
||||||
if (procConfig != null) waterMarkTextOverride = procConfig.GetValue("PSI", "WATERMARKOVERRIDE"); // C2021-019: override watermark text
|
if (procConfig != null) waterMarkTextOverride = procConfig.GetValue("PSI", "WATERMARKOVERRIDE"); // C2021-019: override watermark text
|
||||||
if (swtbtnWaterMark.Value && waterMarkTextOverride != null && waterMarkTextOverride != "") waterMarkText = waterMarkTextOverride;
|
if (swtbtnWaterMark.Value && waterMarkTextOverride != null && waterMarkTextOverride != "") waterMarkText = waterMarkTextOverride;
|
||||||
// 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.
|
||||||
@ -1199,7 +1200,7 @@ namespace VEPROMS
|
|||||||
grpDateSelector.Text = "Select Revision Date";
|
grpDateSelector.Text = "Select Revision Date";
|
||||||
grpDateSelector.Visible = calDateSelector.Visible = true;
|
grpDateSelector.Visible = calDateSelector.Visible = true;
|
||||||
//C2021-007 position the calendar to the current RevDate or if no RevDate, position to today's date
|
//C2021-007 position the calendar to the current RevDate or if no RevDate, position to today's date
|
||||||
DateTime initSelDate =(txbDate.Text != null && txbDate.Text.Length != 0)? Convert.ToDateTime(txbDate.Text) : DateTime.Today;
|
DateTime initSelDate = (txbDate.Text != null && txbDate.Text.Length != 0) ? Convert.ToDateTime(txbDate.Text) : DateTime.Today;
|
||||||
calDateSelector.DisplayMonth = calDateSelector.SelectedDate = initSelDate;
|
calDateSelector.DisplayMonth = calDateSelector.SelectedDate = initSelDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1298,11 +1299,11 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void expPrnSetting_ExpandedChanging(object sender, DevComponents.DotNetBar.ExpandedChangeEventArgs e)
|
private void expPrnSetting_ExpandedChanging(object sender, DevComponents.DotNetBar.ExpandedChangeEventArgs e)
|
||||||
{
|
{
|
||||||
if (expPrnSetting.Expanded)
|
if (expPrnSetting.Expanded)
|
||||||
//this.Size = new Size(this.Size.Width+(expPrnSetting.Size.Width-expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
|
//this.Size = new Size(this.Size.Width+(expPrnSetting.Size.Width-expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
|
||||||
//else
|
//else
|
||||||
this.Size = new Size(this.Size.Width-(expPrnSetting.Size.Width-expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
|
this.Size = new Size(this.Size.Width - (expPrnSetting.Size.Width - expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
|
||||||
//Refresh();
|
//Refresh();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1334,12 +1335,12 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
DateTime dtStart = DateTime.Now;
|
DateTime dtStart = DateTime.Now;
|
||||||
_MergedPfd = new MergedPdf(PDFPath, _DocVersionInfo);
|
_MergedPfd = new MergedPdf(PDFPath, _DocVersionInfo);
|
||||||
PromsPrinter.MergedLandscapePages = null; // B2019-152: MergedLandscapePages has data set when creating separate pdfs (DoCreatePDF)
|
PromsPrinter.MergedLandscapePages = null; // B2019-152: MergedLandscapePages has data set when creating separate pdfs (DoCreatePDF)
|
||||||
DoCreatePDF(); // create indivitual pdfs
|
DoCreatePDF(); // create indivitual pdfs
|
||||||
if (_MergedPdfPath != null && _MergedPdfPath != PDFPath) PDFPath = _MergedPfd.Folder = _MergedPdfPath;
|
if (_MergedPdfPath != null && _MergedPdfPath != PDFPath) PDFPath = _MergedPfd.Folder = _MergedPdfPath;
|
||||||
// C2021-063 pass in whether to generate Alarm Point List text when a merge is done
|
// C2021-063 pass in whether to generate Alarm Point List text when a merge is done
|
||||||
if (!_MergedPfd.DoTheMerge(PromsPrinter.MergedLandscapePages,cbxAlmPtTxt.Checked)) return; // merge them together.
|
if (!_MergedPfd.DoTheMerge(PromsPrinter.MergedLandscapePages, cbxAlmPtTxt.Checked)) return; // merge them together.
|
||||||
// if the property to show the file after printing is set (on the version dialog), display it. Otherwise do a dialog to let user know it's done
|
// if the property to show the file after printing is set (on the version dialog), display it. Otherwise do a dialog to let user know it's done
|
||||||
if (_DocVersionConfig.Print_MergedPdfsViewAfter)
|
if (_DocVersionConfig.Print_MergedPdfsViewAfter)
|
||||||
{
|
{
|
||||||
if (_MergedPfd.MergedPdfs != null && _MergedPfd.MergedPdfs.Count > 0)
|
if (_MergedPfd.MergedPdfs != null && _MergedPfd.MergedPdfs.Count > 0)
|
||||||
|
@ -91,13 +91,13 @@ namespace VEPROMS
|
|||||||
get { return _DidAll; }
|
get { return _DidAll; }
|
||||||
set { _DidAll = value; }
|
set { _DidAll = value; }
|
||||||
}
|
}
|
||||||
private int _prtSectID = -1;
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
get { return _prtSectID; }
|
get { return _prtSectID; }
|
||||||
set { _prtSectID = value; }
|
set { _prtSectID = value; }
|
||||||
}
|
}
|
||||||
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf, string watermarkColor, int PrtSectID = -1)
|
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf, string watermarkColor, int[] PrtSectID = null)
|
||||||
{
|
{
|
||||||
// B2021-088 moved this if/else from CreatePDF() so that the Approval logic will have access to this logic
|
// B2021-088 moved this if/else from CreatePDF() so that the Approval logic will have access to this logic
|
||||||
ProcedureInfo MyProcedure = myItem as ProcedureInfo;
|
ProcedureInfo MyProcedure = myItem as ProcedureInfo;
|
||||||
@ -107,7 +107,7 @@ namespace VEPROMS
|
|||||||
if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
|
if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
|
||||||
{
|
{
|
||||||
// B2023-035 Pass in the select child (selectedSlave) which may be different than docversionconfig's SelectedSlave
|
// B2023-035 Pass in the select child (selectedSlave) which may be different than docversionconfig's SelectedSlave
|
||||||
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave, allOrAuto, MyProcedure.SelectedChildToPrint);
|
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave, allOrAuto, MyProcedure.SelectedChildToPrint);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID, allOrAuto);
|
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID, allOrAuto);
|
||||||
@ -129,7 +129,7 @@ namespace VEPROMS
|
|||||||
// if the version number of PROMS is 1.0, then we are running a Demo version.
|
// if the version number of PROMS is 1.0, then we are running a Demo version.
|
||||||
// When running a Demo version, force a "Sample" watermark when printing.
|
// When running a Demo version, force a "Sample" watermark when printing.
|
||||||
// B2020-022 append a ".pdf" extension if the file name does on have one.
|
// B2020-022 append a ".pdf" extension if the file name does on have one.
|
||||||
MyPromsPrinter = new PromsPrinter(myItem, rev, (VlnSettings.ReleaseMode.Equals("DEMO")) ? "Sample" : watermark, debugOutput, origPgBrk, pdfPath + @"\Compare", false, overWrite, cbd, (pdfFile.ToUpper().EndsWith(".PDF"))?pdfFile:pdfFile+".pdf", insertBlankPages, allOrAuto,Prefix,saveLinks,removeTrailingHardReturnsAndManualPageBreaks, blankPageText, DidAll, mergedPdf, watermarkColor);
|
MyPromsPrinter = new PromsPrinter(myItem, rev, (VlnSettings.ReleaseMode.Equals("DEMO")) ? "Sample" : watermark, debugOutput, origPgBrk, pdfPath + @"\Compare", false, overWrite, cbd, (pdfFile.ToUpper().EndsWith(".PDF")) ? pdfFile : pdfFile + ".pdf", insertBlankPages, allOrAuto, Prefix, saveLinks, removeTrailingHardReturnsAndManualPageBreaks, blankPageText, DidAll, mergedPdf, watermarkColor);
|
||||||
|
|
||||||
MyPromsPrinter.PromsVersion = (showPROMSVer) ? AboutVEPROMS.PROMSVersion : ""; //C2018-009 print PROMS version
|
MyPromsPrinter.PromsVersion = (showPROMSVer) ? AboutVEPROMS.PROMSVersion : ""; //C2018-009 print PROMS version
|
||||||
|
|
||||||
@ -332,8 +332,8 @@ namespace VEPROMS
|
|||||||
if (UserInfo.CanEdit(frmVEPROMS.SMyUserInfo, MyPromsPrinter.MyItem.MyDocVersion))
|
if (UserInfo.CanEdit(frmVEPROMS.SMyUserInfo, MyPromsPrinter.MyItem.MyDocVersion))
|
||||||
{
|
{
|
||||||
// C2023-018: Clarify message on temporary/permanent removal of returns/spaces & page breaks
|
// C2023-018: Clarify message on temporary/permanent removal of returns/spaces & page breaks
|
||||||
if (FlexibleMessageBox.Show(this, "The procedure PDF file was created by temporarily removing certain hard returns,\r\ntrailing spaces, and/or manual page breaks that could affect the pagination\r\n"+
|
if (FlexibleMessageBox.Show(this, "The procedure PDF file was created by temporarily removing certain hard returns,\r\ntrailing spaces, and/or manual page breaks that could affect the pagination\r\n" +
|
||||||
"of the procedure.\r\n\r\nAfter reviewing the PDF file, do you want to permanently remove the deleted hard returns, \r\nspaces and/or manual page breaks?\r\n\r\n"+
|
"of the procedure.\r\n\r\nAfter reviewing the PDF file, do you want to permanently remove the deleted hard returns, \r\nspaces and/or manual page breaks?\r\n\r\n" +
|
||||||
"An annotation will be added to every location where data has been deleted. The locations \r\ncan be found by performing a Global Search for the \"Manual Pagination Issues\" annotation type.",
|
"An annotation will be added to every location where data has been deleted. The locations \r\ncan be found by performing a Global Search for the \"Manual Pagination Issues\" annotation type.",
|
||||||
"Confirm Pagination Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
"Confirm Pagination Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
@ -422,7 +422,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
string str = string.Format("{0} - {1} - {2}",pdffile,ex.GetType().Name,ex.Message);
|
string str = string.Format("{0} - {1} - {2}", pdffile, ex.GetType().Name, ex.Message);
|
||||||
MessageBox.Show(str, "Error Opening PDFFile", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
MessageBox.Show(str, "Error Opening PDFFile", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,8 +418,8 @@ namespace VEPROMS
|
|||||||
sbMsg.Append("\n\nPlease have your DBA update the database with the PROMSFixes.sql script file that was\ndelivered with this PROMS executable.");
|
sbMsg.Append("\n\nPlease have your DBA update the database with the PROMSFixes.sql script file that was\ndelivered with this PROMS executable.");
|
||||||
sbMsg.Append("\n\nThe PROMSFixes.sql file is included with the PROMS installation download.");
|
sbMsg.Append("\n\nThe PROMSFixes.sql file is included with the PROMS installation download.");
|
||||||
sbMsg.Append("\n\nIt can also be found in your PROMS executable folder:");
|
sbMsg.Append("\n\nIt can also be found in your PROMS executable folder:");
|
||||||
sbMsg.AppendFormat("\n\t{0}",ExeInfo.PROMSExecutableFolderPath());
|
sbMsg.AppendFormat("\n\t{0}", ExeInfo.PROMSExecutableFolderPath());
|
||||||
FlexibleMessageBox.Show(sbMsg.ToString(),"SQL Stored Procedures Version Difference");
|
FlexibleMessageBox.Show(sbMsg.ToString(), "SQL Stored Procedures Version Difference");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (string parameter in parameters)
|
foreach (string parameter in parameters)
|
||||||
@ -1178,8 +1178,8 @@ namespace VEPROMS
|
|||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.AppendLine("Could not create PDF Print");
|
sb.AppendLine("Could not create PDF Print");
|
||||||
@ -1197,7 +1197,21 @@ 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 = si2.ItemID;
|
int[] _prtSectID = new int[3];
|
||||||
|
if (si2.IsSubsection == true)
|
||||||
|
{
|
||||||
|
// If section is a subsection.
|
||||||
|
_prtSectID[0] = si2.MyParent.ItemID; // section
|
||||||
|
_prtSectID[1] = si2.ItemID; // sub section
|
||||||
|
_prtSectID[2] = Convert.ToInt32(si2.IsSubsection); // IsSubSection flag
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If section is a regular section
|
||||||
|
_prtSectID[0] = si2.ItemID; // section
|
||||||
|
_prtSectID[1] = -1; // sub section
|
||||||
|
_prtSectID[2] = Convert.ToInt32(si2.IsSubsection); // IsSubSection flag
|
||||||
|
}
|
||||||
|
|
||||||
if (si2 == null) return;
|
if (si2 == null) return;
|
||||||
|
|
||||||
@ -4446,7 +4460,7 @@ namespace VEPROMS
|
|||||||
if (!tv.Focused && tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.SelectedItemInfo != null)
|
if (!tv.Focused && tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.SelectedItemInfo != null)
|
||||||
tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo);
|
tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo);
|
||||||
|
|
||||||
VETreeNode vtn = tv.SelectedNode as VETreeNode;
|
VETreeNode vtn = tv.SelectedNode as VETreeNode;
|
||||||
if (vtn == null) return;
|
if (vtn == null) return;
|
||||||
StepInfo stpinf = vtn.VEObject as StepInfo;
|
StepInfo stpinf = vtn.VEObject as StepInfo;
|
||||||
if (stpinf == null || !stpinf.IsRNOPart) //B2017-037 is this a RNO step type element - don't allow insert before/after
|
if (stpinf == null || !stpinf.IsRNOPart) //B2017-037 is this a RNO step type element - don't allow insert before/after
|
||||||
@ -4884,7 +4898,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
private void btnUpdateFormat_Click(object sender, EventArgs e)
|
private void btnUpdateFormat_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
UpdateFormats(null);
|
UpdateFormats(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateFormats(string mypath)
|
private void UpdateFormats(string mypath)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -179,8 +179,8 @@ namespace Volian.Print.Library
|
|||||||
get { return _PDFFile; }
|
get { return _PDFFile; }
|
||||||
set { _PDFFile = value; }
|
set { _PDFFile = value; }
|
||||||
}
|
}
|
||||||
private int _prtSectID = -1;
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
get { return _prtSectID; }
|
get { return _prtSectID; }
|
||||||
set { _prtSectID = value; }
|
set { _prtSectID = value; }
|
||||||
@ -323,7 +323,7 @@ namespace Volian.Print.Library
|
|||||||
set { _MergedPdf = value; }
|
set { _MergedPdf = value; }
|
||||||
}
|
}
|
||||||
public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite,
|
public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite,
|
||||||
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, int removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf, string watermarkColor, int PrtSectID = -1)
|
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, int removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf, string watermarkColor, int[] PrtSectID = null)
|
||||||
{
|
{
|
||||||
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
||||||
_MyItem = myItem;
|
_MyItem = myItem;
|
||||||
@ -341,6 +341,7 @@ namespace Volian.Print.Library
|
|||||||
_BatchPrint = batchPrint;
|
_BatchPrint = batchPrint;
|
||||||
_MyReaderHelper = new ReaderHelper(this);
|
_MyReaderHelper = new ReaderHelper(this);
|
||||||
_SaveLinks = saveLinks;
|
_SaveLinks = saveLinks;
|
||||||
|
_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>();
|
||||||
if (removeTrailngHardReturnsAndManualPageBreaks == 2 || removeTrailngHardReturnsAndManualPageBreaks == 3) RemoveManualPageBreaks = new List<int>();
|
if (removeTrailngHardReturnsAndManualPageBreaks == 2 || removeTrailngHardReturnsAndManualPageBreaks == 3) RemoveManualPageBreaks = new List<int>();
|
||||||
@ -348,7 +349,15 @@ namespace Volian.Print.Library
|
|||||||
_DidAll = didAll;
|
_DidAll = didAll;
|
||||||
_MergeNotIncluded = false;
|
_MergeNotIncluded = false;
|
||||||
_MergedPdf = mergedPdf;
|
_MergedPdf = mergedPdf;
|
||||||
_prtSectID = PrtSectID;
|
//if(Convert.ToBoolean(PrtSectID[0]))
|
||||||
|
// {
|
||||||
|
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
|
||||||
|
// }
|
||||||
|
//_prtSectID = PrtSectID;
|
||||||
//_MyReaderHelper.LoadTree(myItem);
|
//_MyReaderHelper.LoadTree(myItem);
|
||||||
}
|
}
|
||||||
// Pass 1 PDF Name
|
// Pass 1 PDF Name
|
||||||
@ -368,7 +377,7 @@ namespace Volian.Print.Library
|
|||||||
// B2019-152: MergedLandscapePages is a dictionary whose key is the pdf file name & values are all of the page numbers
|
// B2019-152: MergedLandscapePages is a dictionary whose key is the pdf file name & values are all of the page numbers
|
||||||
// in that pdf that should have landscaped page numbers. These are added when the page is finished (onEndPage)
|
// in that pdf that should have landscaped page numbers. These are added when the page is finished (onEndPage)
|
||||||
public static Dictionary<string, List<int>> MergedLandscapePages = null;
|
public static Dictionary<string, List<int>> MergedLandscapePages = null;
|
||||||
public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary, bool makeTimeCriticalActionSummary, int PrtSectID = -1)
|
public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary, bool makeTimeCriticalActionSummary, int[] PrtSectID = null)
|
||||||
{
|
{
|
||||||
if (_MyItem is ProcedureInfo)
|
if (_MyItem is ProcedureInfo)
|
||||||
{
|
{
|
||||||
@ -804,23 +813,46 @@ 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;
|
||||||
|
if (Convert.ToBoolean(PrtSectID[2])) // If section is a CurSection retrieved the CurSection.
|
||||||
|
{
|
||||||
|
foreach (SectionInfo si2 in myProcedure.Sections)
|
||||||
|
{
|
||||||
|
if (si2.ItemID == PrtSectID[0])
|
||||||
|
{
|
||||||
|
foreach (SectionInfo subsi in si2.Sections)
|
||||||
|
{
|
||||||
|
if (subsi.ItemID == PrtSectID[1])
|
||||||
|
{
|
||||||
|
CurSection = subsi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||||
{
|
{
|
||||||
if (PrtSectID == -1 || (PrtSectID > -1 && mySection.ItemID == PrtSectID))
|
if (PrtSectID[0] == -1 || (PrtSectID[0] > -1 && mySection.ItemID == PrtSectID[0]))
|
||||||
{
|
{
|
||||||
if (!mySection.MyDocStyle.IsStepSection && !mySection.IsAutoTOCSection)
|
|
||||||
|
if (!Convert.ToBoolean(PrtSectID[2])) // If section is not a Sub Section assign the iteration variable to CurSection
|
||||||
{
|
{
|
||||||
VEPROMS.CSLA.Library.Document.ConvertWordSectionToDOCX((ItemInfo)mySection); // B2023-093 Convert a Word section to the DOCX Word format if needed before printing
|
CurSection = mySection;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CurSection.MyDocStyle.IsStepSection && !CurSection.IsAutoTOCSection)
|
||||||
|
{
|
||||||
|
VEPROMS.CSLA.Library.Document.ConvertWordSectionToDOCX((ItemInfo)CurSection); // B2023-093 Convert a Word section to the DOCX Word format if needed before printing
|
||||||
}
|
}
|
||||||
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
||||||
if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y")
|
if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (CurSection.MyConfig as SectionConfig).Section_IsFoldout == "Y")
|
||||||
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
|
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && (CurSection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
|
||||||
{
|
{
|
||||||
// if floating foldouts, need a list of sections & foldoutreaders. Just do first for now.
|
// if floating foldouts, need a list of sections & foldoutreaders. Just do first for now.
|
||||||
|
|
||||||
_MyFoldoutSection.Add(mySection);
|
_MyFoldoutSection.Add(CurSection);
|
||||||
string foldoutPdf = PrintProcedureOrFoldout(myProcedure, mySection, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\Foldout" + cnt.ToString() + @".pdf", false, false, false);
|
string foldoutPdf = PrintProcedureOrFoldout(myProcedure, CurSection, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\Foldout" + cnt.ToString() + @".pdf", false, false, false);
|
||||||
_MyFoldoutReader.Add(foldoutPdf != null ? new PdfReader(foldoutPdf) : null);
|
_MyFoldoutReader.Add(foldoutPdf != null ? new PdfReader(foldoutPdf) : null);
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
@ -951,44 +983,66 @@ 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;
|
||||||
|
if (Convert.ToBoolean(PrtSectID[2]))
|
||||||
|
{
|
||||||
|
foreach (SectionInfo si2 in myProcedure.Sections)
|
||||||
|
{
|
||||||
|
if (si2.ItemID == PrtSectID[0])
|
||||||
|
{
|
||||||
|
foreach (SectionInfo subsi in si2.Sections)
|
||||||
|
{
|
||||||
|
if (subsi.ItemID == PrtSectID[1])
|
||||||
|
{
|
||||||
|
CurSection = subsi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||||
{
|
{
|
||||||
if(PrtSectID == -1 || (PrtSectID > -1 && mySection.ItemID == PrtSectID) )
|
if (PrtSectID[0] == -1 || (PrtSectID[0] > -1 && mySection.ItemID == PrtSectID[0]))
|
||||||
{
|
{
|
||||||
// B2020-115 Calculate maximum available space on a page for figures
|
if (!Convert.ToBoolean(PrtSectID[2])) // If section is not a Sub Section assign the iteration variable to CurSection
|
||||||
vlnParagraph.hMax = ((float)mySection.MyDocStyle.Layout.PageLength);
|
{
|
||||||
vlnParagraph.wMax = ((float)mySection.MyDocStyle.Layout.PageWidth) - ((float)mySection.MyDocStyle.Layout.LeftMargin - 12);
|
CurSection = mySection;
|
||||||
|
}
|
||||||
|
|
||||||
|
// B2020-115 Calculate maximum available space on a page for figures
|
||||||
|
vlnParagraph.hMax = ((float)CurSection.MyDocStyle.Layout.PageLength);
|
||||||
|
vlnParagraph.wMax = ((float)CurSection.MyDocStyle.Layout.PageWidth) - ((float)CurSection.MyDocStyle.Layout.LeftMargin - 12);
|
||||||
NeedSupInfoBreak = true;
|
NeedSupInfoBreak = true;
|
||||||
bool isFoldoutSection = (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"; //C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
bool isFoldoutSection = (CurSection.MyConfig as SectionConfig).Section_IsFoldout == "Y"; //C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
||||||
if (((isFoldoutSection && myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts)
|
if (((isFoldoutSection && myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts)
|
||||||
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && isFoldoutSection))
|
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && isFoldoutSection))
|
||||||
!= doingFoldout) continue;
|
!= doingFoldout) continue;
|
||||||
if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue;
|
if (myFoldoutSection != null && myFoldoutSection.ItemID != CurSection.ItemID) continue;
|
||||||
PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper;
|
PrintOverride.CompressSuper = CurSection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper;
|
||||||
PrintOverride.CompressSub = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSub;
|
PrintOverride.CompressSub = CurSection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSub;
|
||||||
PrintOverride.CompressPropSubSup = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressPropSubSup;
|
PrintOverride.CompressPropSubSup = CurSection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressPropSubSup;
|
||||||
|
|
||||||
OnStatusChanged((mySection.DisplayNumber ?? "") == "" ? mySection.DisplayText : mySection.DisplayNumber, PromsPrinterStatusType.Progress, progress++);
|
OnStatusChanged((CurSection.DisplayNumber ?? "") == "" ? CurSection.DisplayText : CurSection.DisplayNumber, PromsPrinterStatusType.Progress, progress++);
|
||||||
// Set up Helper for the particular Section
|
// Set up Helper for the particular Section
|
||||||
if (_MyHelper == null)
|
if (_MyHelper == null)
|
||||||
{
|
{
|
||||||
LastFmtName = mySection.ActiveFormat.Name;
|
LastFmtName = CurSection.ActiveFormat.Name;
|
||||||
lastDocStyle = (int)mySection.MyDocStyle.Index;
|
lastDocStyle = (int)CurSection.MyDocStyle.Index;
|
||||||
string hlsText = "";
|
string hlsText = "";
|
||||||
int hlsItemId = 0;
|
int hlsItemId = 0;
|
||||||
if (mySection.IsStepSection && mySection.Steps != null && mySection.Steps.Count > 0)
|
if (CurSection.IsStepSection && CurSection.Steps != null && CurSection.Steps.Count > 0)
|
||||||
{
|
{
|
||||||
hlsItemId = mySection.Steps[0].ItemID;
|
hlsItemId = CurSection.Steps[0].ItemID;
|
||||||
hlsText = mySection.Steps[0].DisplayText; // save the High level step text for use in the page list
|
hlsText = CurSection.Steps[0].DisplayText; // save the High level step text for use in the page list
|
||||||
}
|
}
|
||||||
cb.PdfWriter.PageEvent = _MyHelper = new VlnSvgPageHelper(mySection, this, hlsText, hlsItemId, PrtSectID);
|
cb.PdfWriter.PageEvent = _MyHelper = new VlnSvgPageHelper(CurSection, this, hlsText, hlsItemId, PrtSectID);
|
||||||
_MyHelper.AllowAllWatermarks = AllowAllWatermarks;
|
_MyHelper.AllowAllWatermarks = AllowAllWatermarks;
|
||||||
_MyHelper.MyPdfWriter = cb.PdfWriter;
|
_MyHelper.MyPdfWriter = cb.PdfWriter;
|
||||||
_MyHelper.CreatingFoldoutPage = doingFoldout;
|
_MyHelper.CreatingFoldoutPage = doingFoldout;
|
||||||
_MyHelper.CreatingSupInfoPage = false;
|
_MyHelper.CreatingSupInfoPage = false;
|
||||||
_MyHelper.MyPdfContentByte = cb;
|
_MyHelper.MyPdfContentByte = cb;
|
||||||
|
|
||||||
if (!mySection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)mySection, ((mySection.DisplayNumber ?? "") == "" ? "" : mySection.DisplayNumber + " - ") + mySection.DisplayText, null);
|
if (!CurSection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)CurSection, ((CurSection.DisplayNumber ?? "") == "" ? "" : CurSection.DisplayNumber + " - ") + CurSection.DisplayText, null);
|
||||||
if (DebugOutput)
|
if (DebugOutput)
|
||||||
{
|
{
|
||||||
// 16-bit background
|
// 16-bit background
|
||||||
@ -999,7 +1053,7 @@ namespace Volian.Print.Library
|
|||||||
_MyHelper.BackgroundFile = procedureFileName;
|
_MyHelper.BackgroundFile = procedureFileName;
|
||||||
float x = 0;
|
float x = 0;
|
||||||
float y = 0;
|
float y = 0;
|
||||||
if (!(mySection.ActiveFormat.Name.ToUpper().StartsWith("WST") || _MyHelper.Back32BitPROMS)) // compare folder contains PROMS generated PDF
|
if (!(CurSection.ActiveFormat.Name.ToUpper().StartsWith("WST") || _MyHelper.Back32BitPROMS)) // compare folder contains PROMS generated PDF
|
||||||
{
|
{
|
||||||
// X value below = 16-bit pdf OverrideLeftMargin = -2 characters at the plant format's default Font's
|
// X value below = 16-bit pdf OverrideLeftMargin = -2 characters at the plant format's default Font's
|
||||||
// characters per inch.
|
// characters per inch.
|
||||||
@ -1035,29 +1089,29 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
//added by jcb to reset mygaps when changing a section. found old section gaps were carrying over to new section
|
//added by jcb to reset mygaps when changing a section. found old section gaps were carrying over to new section
|
||||||
_MyHelper.MyGaps.Clear();
|
_MyHelper.MyGaps.Clear();
|
||||||
//Console.WriteLine("'{0}' PromsPrinter", mySection.DisplayText);
|
//Console.WriteLine("'{0}' PromsPrinter", CurSection.DisplayText);
|
||||||
// if pagination is separate or we've changed the format, we have not done the first page
|
// if pagination is separate or we've changed the format, we have not done the first page
|
||||||
// (if this format has the useonfirst page docstyle flag)
|
// (if this format has the useonfirst page docstyle flag)
|
||||||
if (LastFmtName != mySection.ActiveFormat.Name || lastDocStyle != (int)mySection.MyDocStyle.Index || mySection.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate)
|
if (LastFmtName != CurSection.ActiveFormat.Name || lastDocStyle != (int)CurSection.MyDocStyle.Index || CurSection.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate)
|
||||||
{
|
{
|
||||||
_MyHelper.DidFirstPageDocStyle = false;
|
_MyHelper.DidFirstPageDocStyle = false;
|
||||||
lastDocStyle = (int)mySection.MyDocStyle.Index;
|
lastDocStyle = (int)CurSection.MyDocStyle.Index;
|
||||||
LastFmtName = mySection.ActiveFormat.Name;
|
LastFmtName = CurSection.ActiveFormat.Name;
|
||||||
}
|
}
|
||||||
if (!mySection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)mySection, ((mySection.DisplayNumber ?? "") == "" ? "" : mySection.DisplayNumber + " - ") + mySection.DisplayText, null);
|
if (!CurSection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)CurSection, ((CurSection.DisplayNumber ?? "") == "" ? "" : CurSection.DisplayNumber + " - ") + CurSection.DisplayText, null);
|
||||||
_MyHelper.MySection = mySection;
|
_MyHelper.MySection = CurSection;
|
||||||
//OnStatusChanged("After Set Svg", PromsPrinterStatusType.SetSVG);
|
//OnStatusChanged("After Set Svg", PromsPrinterStatusType.SetSVG);
|
||||||
}
|
}
|
||||||
// if this format uses phonelists, see if this section has one. We need to know the number
|
// if this format uses phonelists, see if this section has one. We need to know the number
|
||||||
//of lines to adjust the pagelength for pagination and printing.
|
//of lines to adjust the pagelength for pagination and printing.
|
||||||
_MyHelper.PhoneListHeight = 0;
|
_MyHelper.PhoneListHeight = 0;
|
||||||
if (mySection.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList)
|
if (CurSection.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList)
|
||||||
{
|
{
|
||||||
// get config for section
|
// get config for section
|
||||||
SectionConfig sc = mySection.MyConfig as SectionConfig;
|
SectionConfig sc = CurSection.MyConfig as SectionConfig;
|
||||||
if (sc.Section_PhoneList != null && sc.Section_PhoneList == "Y")
|
if (sc.Section_PhoneList != null && sc.Section_PhoneList == "Y")
|
||||||
{
|
{
|
||||||
DocVersionConfig dvc = mySection.MyDocVersion.MyConfig as DocVersionConfig;
|
DocVersionConfig dvc = CurSection.MyDocVersion.MyConfig as DocVersionConfig;
|
||||||
if (dvc != null)
|
if (dvc != null)
|
||||||
{
|
{
|
||||||
string phlist = dvc.Print_PhoneList;
|
string phlist = dvc.Print_PhoneList;
|
||||||
@ -1082,13 +1136,13 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
_MyHelper.FinalMessageSectionID = finalMessageSectionID; // set VlnSvgPageHelper with the finalMessageSectionID
|
_MyHelper.FinalMessageSectionID = finalMessageSectionID; // set VlnSvgPageHelper with the finalMessageSectionID
|
||||||
|
|
||||||
if (mySection.IsAutoTOCSection)
|
if (CurSection.IsAutoTOCSection)
|
||||||
{
|
{
|
||||||
if (((cb.PdfWriter.CurrentPageNumber % 2 == 0 && !_MyHelper.CreatingFoldoutPage) || myProcedure.ProcHasSupInfoData) && InsertBlankPages) // Bug Fix: B2016-181 - add blank page if page count is even
|
if (((cb.PdfWriter.CurrentPageNumber % 2 == 0 && !_MyHelper.CreatingFoldoutPage) || myProcedure.ProcHasSupInfoData) && InsertBlankPages) // Bug Fix: B2016-181 - add blank page if page count is even
|
||||||
{
|
{
|
||||||
InsertBlankPage(cb);
|
InsertBlankPage(cb);
|
||||||
}
|
}
|
||||||
GenerateTOC(mySection, myProcedure, cb, _TextLayer);
|
GenerateTOC(CurSection, myProcedure, cb, _TextLayer);
|
||||||
// B2020-102: extra page printing after auto TOC for summer. Retested for Farley and was successful also
|
// B2020-102: extra page printing after auto TOC for summer. Retested for Farley and was successful also
|
||||||
// F2018-033: Farley Auto TOC. If doing foldouts or supinfo facing pages, add a blank page after also:
|
// F2018-033: Farley Auto TOC. If doing foldouts or supinfo facing pages, add a blank page after also:
|
||||||
//if (myProcedure.ProcHasSupInfoData && InsertBlankPages) // Bug Fix: B2016-181 - add blank page if page count is even
|
//if (myProcedure.ProcHasSupInfoData && InsertBlankPages) // Bug Fix: B2016-181 - add blank page if page count is even
|
||||||
@ -1098,21 +1152,21 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mySection.IsStepSection)
|
if (CurSection.IsStepSection)
|
||||||
{
|
{
|
||||||
if (mySection.Steps != null && mySection.Steps.Count > 0)
|
if (CurSection.Steps != null && CurSection.Steps.Count > 0)
|
||||||
{
|
{
|
||||||
// get first step to send to floating foldout indx.&& MyItemInfo.FoldoutIndex>-1)
|
// get first step to send to floating foldout indx.&& MyItemInfo.FoldoutIndex>-1)
|
||||||
ItemInfo firstStep = mySection.Steps[0];
|
ItemInfo firstStep = CurSection.Steps[0];
|
||||||
// B2019-165 Don't print the duplex foldout (on the back of the page) if the Don't Include Duplex Foldout check box was checked in section properties
|
// B2019-165 Don't print the duplex foldout (on the back of the page) if the Don't Include Duplex Foldout check box was checked in section properties
|
||||||
if (firstStep.FoldoutIndex() > -1 && (mySection.MyPrevious == null || !((mySection.MyPrevious.MyConfig as SectionConfig).Section_DontIncludeDuplexFoldout)))
|
if (firstStep.FoldoutIndex() > -1 && (CurSection.MyPrevious == null || !((CurSection.MyPrevious.MyConfig as SectionConfig).Section_DontIncludeDuplexFoldout)))
|
||||||
DoFoldoutPage(cb, "Beginning of Step Section", _TextLayer, _MyHelper, firstStep.FoldoutIndex(), InsertBlankPages);
|
DoFoldoutPage(cb, "Beginning of Step Section", _TextLayer, _MyHelper, firstStep.FoldoutIndex(), InsertBlankPages);
|
||||||
else if (!_MyHelper.CreatingFoldoutPage && _MyFoldoutReader.Count > 0 && InsertBlankPages)
|
else if (!_MyHelper.CreatingFoldoutPage && _MyFoldoutReader.Count > 0 && InsertBlankPages)
|
||||||
{
|
{
|
||||||
// if it is continuous pagination, don't do blank page - not sure if this is correct place for this:
|
// if it is continuous pagination, don't do blank page - not sure if this is correct place for this:
|
||||||
// C2023-001 if the previous section has the flag to not insert blank pages,
|
// C2023-001 if the previous section has the flag to not insert blank pages,
|
||||||
// then don't insert a blank page between the previous section and this one
|
// then don't insert a blank page between the previous section and this one
|
||||||
if (mySection.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate && !mySection.SearchPrev.MyDocStyle.DontInsertBlankPages)
|
if (CurSection.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate && !CurSection.SearchPrev.MyDocStyle.DontInsertBlankPages)
|
||||||
{
|
{
|
||||||
// only insert a blank page if this section does not have a foldout (but the procedure as a whole does)
|
// only insert a blank page if this section does not have a foldout (but the procedure as a whole does)
|
||||||
// and the checkbox on the print dialog to add blank pages is checked
|
// and the checkbox on the print dialog to add blank pages is checked
|
||||||
@ -1124,18 +1178,18 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
// If the procedure has supplemental facing pages, but this section does not & it's the first section,
|
// If the procedure has supplemental facing pages, but this section does not & it's the first section,
|
||||||
// need a blank 'facing page'. Sections after the first will get blank 'facing page' in print's pagination logic
|
// need a blank 'facing page'. Sections after the first will get blank 'facing page' in print's pagination logic
|
||||||
if (SupInfoPrintType == E_SupInfoPrintType.Merge && !mySection.HasSupInfoSteps && firstStepSec && InsertBlankPages)
|
if (SupInfoPrintType == E_SupInfoPrintType.Merge && !CurSection.HasSupInfoSteps && firstStepSec && InsertBlankPages)
|
||||||
{
|
{
|
||||||
InsertBlankPage(cb);
|
InsertBlankPage(cb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
firstStepSec = false;
|
firstStepSec = false;
|
||||||
CreateStepPdf(mySection, cb);
|
CreateStepPdf(CurSection, cb);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CreateWordDocPdf(cb, mySection);
|
CreateWordDocPdf(cb, CurSection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_MyHelper.PrintedSectionPage = 0;
|
_MyHelper.PrintedSectionPage = 0;
|
||||||
@ -1582,19 +1636,43 @@ 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;
|
||||||
|
if (Convert.ToBoolean(PrtSectID[2]))
|
||||||
|
{
|
||||||
|
foreach (SectionInfo si2 in ii.Sections)
|
||||||
|
{
|
||||||
|
if (si2.ItemID == PrtSectID[0])
|
||||||
|
{
|
||||||
|
foreach (SectionInfo subsi in si2.Sections)
|
||||||
|
{
|
||||||
|
if (subsi.ItemID == PrtSectID[1])
|
||||||
|
{
|
||||||
|
CurSection = subsi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (SectionInfo mySection in ii.Sections)
|
foreach (SectionInfo mySection in ii.Sections)
|
||||||
{
|
{
|
||||||
if (PrtSectID == -1 || (PrtSectID > -1 && mySection.ItemID == PrtSectID))
|
|
||||||
|
if (PrtSectID[0] == -1 || (PrtSectID[0] > -1 && mySection.ItemID == PrtSectID[0]))
|
||||||
{
|
{
|
||||||
|
if (!Convert.ToBoolean(PrtSectID[2])) // If section is not a Sub Section assign the iteration variable to CurSection
|
||||||
|
{
|
||||||
|
CurSection = mySection;
|
||||||
|
}
|
||||||
|
|
||||||
sectCnt++;
|
sectCnt++;
|
||||||
SectionConfig sc = mySection.MyConfig as SectionConfig;
|
SectionConfig sc = CurSection.MyConfig as SectionConfig;
|
||||||
if ((mySection.MyDocStyle != null && mySection.MyDocStyle.IncludeInTOC && (sc == null || sc.Section_TOC != "Y"))
|
if ((CurSection.MyDocStyle != null && CurSection.MyDocStyle.IncludeInTOC && (sc == null || sc.Section_TOC != "Y"))
|
||||||
|| ((mySection.MyDocStyle == null || !mySection.MyDocStyle.IncludeInTOC) && (sc != null && sc.Section_TOC == "Y")))
|
|| ((CurSection.MyDocStyle == null || !CurSection.MyDocStyle.IncludeInTOC) && (sc != null && sc.Section_TOC == "Y")))
|
||||||
{
|
{
|
||||||
// for indenting of subsections, count up tree. Only start indenting
|
// for indenting of subsections, count up tree. Only start indenting
|
||||||
// at third level, i.e. not indent on 1.0 and 1.1, but indent on 1.1.1:
|
// at third level, i.e. not indent on 1.0 and 1.1, but indent on 1.1.1:
|
||||||
level = 0;
|
level = 0;
|
||||||
ItemInfo iilvl = mySection as ItemInfo;
|
ItemInfo iilvl = CurSection as ItemInfo;
|
||||||
while (!iilvl.IsProcedure)
|
while (!iilvl.IsProcedure)
|
||||||
{
|
{
|
||||||
level++;
|
level++;
|
||||||
@ -1636,7 +1714,7 @@ namespace Volian.Print.Library
|
|||||||
// need to do the section number, section title & page number. Page number
|
// need to do the section number, section title & page number. Page number
|
||||||
// has to be put on at end after number of page is known, so use a Template.
|
// has to be put on at end after number of page is known, so use a Template.
|
||||||
bool didGrp = false;
|
bool didGrp = false;
|
||||||
string tmptxt = mySection.MyContent.Number == null || mySection.MyContent.Number == "" ? " " : mySection.DisplayNumber;// B2017-019 - process "<u>" in section number
|
string tmptxt = CurSection.MyContent.Number == null || CurSection.MyContent.Number == "" ? " " : CurSection.DisplayNumber;// B2017-019 - process "<u>" in section number
|
||||||
if (tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCRemoveGrpNameInSects
|
if (tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCRemoveGrpNameInSects
|
||||||
&& tocGrpHeading.Length > 0 && tmptxt.ToUpper().Contains(tocGrpHeading))
|
&& tocGrpHeading.Length > 0 && tmptxt.ToUpper().Contains(tocGrpHeading))
|
||||||
{
|
{
|
||||||
@ -1665,7 +1743,7 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
// logic put in for V.C. Summer who wants to their auto table of contents to print "OPERATOR ACTIONS" (set in the format) instead of "Procedure Steps"
|
// logic put in for V.C. Summer who wants to their auto table of contents to print "OPERATOR ACTIONS" (set in the format) instead of "Procedure Steps"
|
||||||
// - note that Summer didn't want to change the section title because they want transition to say "procedure step" for the section title. 03/08/2016
|
// - note that Summer didn't want to change the section title because they want transition to say "procedure step" for the section title. 03/08/2016
|
||||||
string tocSecTitle = mySection.FormattedDisplayText;// B2017-019 - process "<u>" in section title
|
string tocSecTitle = CurSection.FormattedDisplayText;// B2017-019 - process "<u>" in section title
|
||||||
tocSecTitle = ConvertSpecialChars(tocSecTitle, ii.ActiveFormat.PlantFormat.FormatData); // B2019-172 process symbol characters
|
tocSecTitle = ConvertSpecialChars(tocSecTitle, ii.ActiveFormat.PlantFormat.FormatData); // B2019-172 process symbol characters
|
||||||
if (tocSecTitle.ToUpper() == "PROCEDURE STEPS" && tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCProcedureStepsTitle != "")
|
if (tocSecTitle.ToUpper() == "PROCEDURE STEPS" && tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCProcedureStepsTitle != "")
|
||||||
tocSecTitle = tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCProcedureStepsTitle;
|
tocSecTitle = tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCProcedureStepsTitle;
|
||||||
@ -1731,7 +1809,7 @@ namespace Volian.Print.Library
|
|||||||
// adjust ylocation for pagenumber - the ylocation will get reset if the
|
// adjust ylocation for pagenumber - the ylocation will get reset if the
|
||||||
// section title split on 2 lines and the page number needs to be on the 2nd line.
|
// section title split on 2 lines and the page number needs to be on the 2nd line.
|
||||||
// Only do this if the title is not empty (the code was meant for if title spans more than a line)
|
// Only do this if the title is not empty (the code was meant for if title spans more than a line)
|
||||||
if (retval != ttlRetval && mySection.MyContent.Text != null && mySection.MyContent.Text != "") yLocation += (retval - ttlRetval);
|
if (retval != ttlRetval && CurSection.MyContent.Text != null && CurSection.MyContent.Text != "") yLocation += (retval - ttlRetval);
|
||||||
|
|
||||||
// retval = the minimum (further down the page) between section number and
|
// retval = the minimum (further down the page) between section number and
|
||||||
// title - this accounts for multi line title.
|
// title - this accounts for multi line title.
|
||||||
@ -1739,7 +1817,7 @@ namespace Volian.Print.Library
|
|||||||
lastyLocation = retval;
|
lastyLocation = retval;
|
||||||
|
|
||||||
// check that the page number should be in the TOC (some BGE sections do not have the page number)
|
// check that the page number should be in the TOC (some BGE sections do not have the page number)
|
||||||
if (!((mySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontNumberInTOC) == E_DocStructStyle.DontNumberInTOC))
|
if (!((CurSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontNumberInTOC) == E_DocStructStyle.DontNumberInTOC))
|
||||||
{
|
{
|
||||||
// add a template for the page number:
|
// add a template for the page number:
|
||||||
// if the space character is not null & is not a space, the we've got to put out
|
// if the space character is not null & is not a space, the we've got to put out
|
||||||
@ -1790,8 +1868,8 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
// if in the pre-table of content list, just put the page number out as text.
|
// if in the pre-table of content list, just put the page number out as text.
|
||||||
// otherwise, add a template _MyHelper.MyTOCPageCounts
|
// otherwise, add a template _MyHelper.MyTOCPageCounts
|
||||||
string key = "TOC" + mySection.ItemID.ToString();
|
string key = "TOC" + CurSection.ItemID.ToString();
|
||||||
if (mySection.IsAutoTOCSection || _MyHelper.MyTOCPageNums.ContainsKey(key))
|
if (CurSection.IsAutoTOCSection || _MyHelper.MyTOCPageNums.ContainsKey(key))
|
||||||
{
|
{
|
||||||
string pnum = _MyHelper.MyTOCPageNums.ContainsKey(key) ? _MyHelper.MyTOCPageNums[key].ToString() : (_MyHelper.CurrentTOCPageNumber + 1).ToString();
|
string pnum = _MyHelper.MyTOCPageNums.ContainsKey(key) ? _MyHelper.MyTOCPageNums[key].ToString() : (_MyHelper.CurrentTOCPageNumber + 1).ToString();
|
||||||
rtfText = GetRtfToC(pnum, tOfC);
|
rtfText = GetRtfToC(pnum, tOfC);
|
||||||
@ -1805,10 +1883,10 @@ namespace Volian.Print.Library
|
|||||||
//If the format wants single spacing within subsections (2nd level and lower), then need to figure out
|
//If the format wants single spacing within subsections (2nd level and lower), then need to figure out
|
||||||
// spacing (vcb1 table of contents)
|
// spacing (vcb1 table of contents)
|
||||||
//bool dosuby = (((tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCLineSpacingSub ?? 1) > 0)
|
//bool dosuby = (((tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCLineSpacingSub ?? 1) > 0)
|
||||||
// && (mySection.MyParent.IsSection && ((mySection.Sections != null && mySection.Sections.Count > 0) || (level > 0 && mySection.NextItem != null))))
|
// && (CurSection.MyParent.IsSection && ((CurSection.Sections != null && CurSection.Sections.Count > 0) || (level > 0 && CurSection.NextItem != null))))
|
||||||
// || didGrp;
|
// || didGrp;
|
||||||
doSubY = (((tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCLineSpacingSub ?? 1) > 0)
|
doSubY = (((tocSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCLineSpacingSub ?? 1) > 0)
|
||||||
&& (mySection.MyParent.IsSection && (/* mySection.Sections == null && */ sectCnt < ii.Sections.Count))) // B2016-205
|
&& (CurSection.MyParent.IsSection && (/* CurSection.Sections == null && */ sectCnt < ii.Sections.Count))) // B2016-205
|
||||||
|| didGrp;
|
|| didGrp;
|
||||||
//float spc = (float)(tOfC.TofCLineSpacing ?? 1);
|
//float spc = (float)(tOfC.TofCLineSpacing ?? 1);
|
||||||
if (doSubY)
|
if (doSubY)
|
||||||
@ -1837,12 +1915,12 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
// C2021-015: Barakah High Level Steps in Table of Contents - check to see if we need to add the high level steps on
|
// C2021-015: Barakah High Level Steps in Table of Contents - check to see if we need to add the high level steps on
|
||||||
// table of contents for this section, format flag & section has steps:
|
// table of contents for this section, format flag & section has steps:
|
||||||
if (mySection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCAllowHLS &&
|
if (CurSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.TableOfContentsData.TofCAllowHLS &&
|
||||||
mySection.IsStepSection && mySection.Steps != null && mySection.Steps.Count > 0)
|
CurSection.IsStepSection && CurSection.Steps != null && CurSection.Steps.Count > 0)
|
||||||
yLocation = AddHLSToTOC(tocSection, mySection, tOfC, cb, yPageStart, yLocation, doSubY, level + 1, adjSecTitlePos);
|
yLocation = AddHLSToTOC(tocSection, CurSection, tOfC, cb, yPageStart, yLocation, doSubY, level + 1, adjSecTitlePos);
|
||||||
}
|
}
|
||||||
float savYLoc = yLocation;
|
float savYLoc = yLocation;
|
||||||
yLocation = AddSectionToTOC(tocSection, mySection, tOfC, cb, yPageStart, yLocation, doSubY);
|
yLocation = AddSectionToTOC(tocSection, CurSection, tOfC, cb, yPageStart, yLocation, doSubY);
|
||||||
if (savYLoc == yLocation) // nothing was outputted i.e. the subsections are not included on the TOC // B2016-205
|
if (savYLoc == yLocation) // nothing was outputted i.e. the subsections are not included on the TOC // B2016-205
|
||||||
{
|
{
|
||||||
if (doSubY && sectCnt == ii.Sections.Count)
|
if (doSubY && sectCnt == ii.Sections.Count)
|
||||||
@ -2941,11 +3019,28 @@ 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
|
||||||
foreach (SectionInfo si in ii.Sections)
|
SectionInfo SubSection = null;
|
||||||
|
if (Convert.ToBoolean(MyPromsPrinter.PrtSectID[2])) // If section is a sub section
|
||||||
{
|
{
|
||||||
if (MyPromsPrinter.PrtSectID == -1 || (MyPromsPrinter.PrtSectID > -1 && si.ItemID == MyPromsPrinter.PrtSectID))
|
foreach (SectionInfo si2 in ii.Sections)
|
||||||
{
|
{
|
||||||
if (si.IsStepSection)
|
if (si2.ItemID == MyPromsPrinter.PrtSectID[0])
|
||||||
|
{
|
||||||
|
foreach (SectionInfo subsi in si2.Sections)
|
||||||
|
{
|
||||||
|
if (subsi.ItemID == MyPromsPrinter.PrtSectID[0])
|
||||||
|
{
|
||||||
|
SubSection = subsi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (SectionInfo si in ii.Sections)
|
||||||
|
if (MyPromsPrinter.PrtSectID[0] == -1 || (MyPromsPrinter.PrtSectID[0] > -1 && si.ItemID == MyPromsPrinter.PrtSectID[0]))
|
||||||
|
{
|
||||||
|
if (si.IsStepSection)
|
||||||
{
|
{
|
||||||
if (si.Sections != null) LoadSectionTree(si);
|
if (si.Sections != null) LoadSectionTree(si);
|
||||||
}
|
}
|
||||||
@ -2986,36 +3081,36 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//public class PrintTimer
|
|
||||||
//{
|
|
||||||
// private DateTime _StartTime = DateTime.Now;
|
|
||||||
|
|
||||||
// public DateTime StartTime
|
|
||||||
// {
|
|
||||||
// get { return _StartTime; }
|
|
||||||
// set { _StartTime = value; }
|
|
||||||
// }
|
|
||||||
// private string _Description = "Start";
|
|
||||||
// public string Description
|
|
||||||
// {
|
|
||||||
// get { return _Description; }
|
|
||||||
// set
|
|
||||||
// {
|
|
||||||
// DateTime dtNext = DateTime.Now;
|
|
||||||
// //Console.WriteLine("{0},'{1}'", TimeSpan.FromTicks(dtNext.Ticks - LastTime.Ticks).TotalSeconds, Description);
|
|
||||||
// _Description = value;
|
|
||||||
// _LastTime = dtNext;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// private DateTime _LastTime = DateTime.Now;
|
|
||||||
// public DateTime LastTime
|
|
||||||
// {
|
|
||||||
// get { return _LastTime; }
|
|
||||||
// set { _LastTime = value; }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
//public class PrintTimer
|
||||||
|
//{
|
||||||
|
// private DateTime _StartTime = DateTime.Now;
|
||||||
|
|
||||||
|
// public DateTime StartTime
|
||||||
|
// {
|
||||||
|
// get { return _StartTime; }
|
||||||
|
// set { _StartTime = value; }
|
||||||
|
// }
|
||||||
|
// private string _Description = "Start";
|
||||||
|
// public string Description
|
||||||
|
// {
|
||||||
|
// get { return _Description; }
|
||||||
|
// set
|
||||||
|
// {
|
||||||
|
// DateTime dtNext = DateTime.Now;
|
||||||
|
// //Console.WriteLine("{0},'{1}'", TimeSpan.FromTicks(dtNext.Ticks - LastTime.Ticks).TotalSeconds, Description);
|
||||||
|
// _Description = value;
|
||||||
|
// _LastTime = dtNext;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// private DateTime _LastTime = DateTime.Now;
|
||||||
|
// public DateTime LastTime
|
||||||
|
// {
|
||||||
|
// get { return _LastTime; }
|
||||||
|
// set { _LastTime = value; }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ using Volian.Base.Library;
|
|||||||
|
|
||||||
namespace Volian.Print.Library
|
namespace Volian.Print.Library
|
||||||
{
|
{
|
||||||
public partial class VlnSvgPageHelper:SvgPageHelper
|
public partial class VlnSvgPageHelper : SvgPageHelper
|
||||||
{
|
{
|
||||||
private float _TableAdjustment = 0;// RHM20150525 - Table Scrunch
|
private float _TableAdjustment = 0;// RHM20150525 - Table Scrunch
|
||||||
public float TableAdjustment
|
public float TableAdjustment
|
||||||
@ -58,7 +58,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if(value == null || _BottomContent == null || _BottomContent > value)
|
if (value == null || _BottomContent == null || _BottomContent > value)
|
||||||
_BottomContent = value;
|
_BottomContent = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,43 +85,43 @@ namespace Volian.Print.Library
|
|||||||
get { return _TopMessage; }
|
get { return _TopMessage; }
|
||||||
set { _TopMessage = value; }
|
set { _TopMessage = value; }
|
||||||
}
|
}
|
||||||
private int _prtSectID = -1;
|
private int[] _prtSectID = new int[] { -1, -1, 0 };
|
||||||
public int PrtSectID
|
public int[] PrtSectID
|
||||||
{
|
{
|
||||||
get { return _prtSectID; }
|
get { return _prtSectID; }
|
||||||
set { _prtSectID = value; }
|
set { _prtSectID = value; }
|
||||||
}
|
}
|
||||||
private List<vlnText> _TopMessageRs=new List<vlnText>(); // Added if there are 2 messages, in AER AND RNO (for BGE)
|
private List<vlnText> _TopMessageRs = new List<vlnText>(); // Added if there are 2 messages, in AER AND RNO (for BGE)
|
||||||
public List<vlnText> TopMessageRs
|
public List<vlnText> TopMessageRs
|
||||||
{
|
{
|
||||||
get { return _TopMessageRs; }
|
get { return _TopMessageRs; }
|
||||||
set { _TopMessageRs = value; }
|
set { _TopMessageRs = value; }
|
||||||
}
|
}
|
||||||
private List<vlnText> _TopMessageSub1s=new List<vlnText>(); // BGE Alarms: in CONDITION/RESPONSE if break within substep
|
private List<vlnText> _TopMessageSub1s = new List<vlnText>(); // BGE Alarms: in CONDITION/RESPONSE if break within substep
|
||||||
public List<vlnText> TopMessageSub1s
|
public List<vlnText> TopMessageSub1s
|
||||||
{
|
{
|
||||||
get { return _TopMessageSub1s; }
|
get { return _TopMessageSub1s; }
|
||||||
set { _TopMessageSub1s = value; }
|
set { _TopMessageSub1s = value; }
|
||||||
}
|
}
|
||||||
private List<vlnText> _TopMessageSub2s=new List<vlnText>(); // BGE Alarms: in CONDITION/RESPONSE if break within substep
|
private List<vlnText> _TopMessageSub2s = new List<vlnText>(); // BGE Alarms: in CONDITION/RESPONSE if break within substep
|
||||||
public List<vlnText> TopMessageSub2s
|
public List<vlnText> TopMessageSub2s
|
||||||
{
|
{
|
||||||
get { return _TopMessageSub2s; }
|
get { return _TopMessageSub2s; }
|
||||||
set { _TopMessageSub2s = value; }
|
set { _TopMessageSub2s = value; }
|
||||||
}
|
}
|
||||||
private List<vlnText> _BottomMessage = new List<vlnText>(); // B2017-203) any continuous sections with end messages may have more than 1 message on a page
|
private List<vlnText> _BottomMessage = new List<vlnText>(); // B2017-203) any continuous sections with end messages may have more than 1 message on a page
|
||||||
public List<vlnText> BottomMessage
|
public List<vlnText> BottomMessage
|
||||||
{
|
{
|
||||||
get { return _BottomMessage; }
|
get { return _BottomMessage; }
|
||||||
set { _BottomMessage = value; }
|
set { _BottomMessage = value; }
|
||||||
}
|
}
|
||||||
private vlnText _BottomMessageR; // Added if there are 2 messages, in AER AND RNO (for BGE)
|
private vlnText _BottomMessageR; // Added if there are 2 messages, in AER AND RNO (for BGE)
|
||||||
public vlnText BottomMessageR
|
public vlnText BottomMessageR
|
||||||
{
|
{
|
||||||
get { return _BottomMessageR; }
|
get { return _BottomMessageR; }
|
||||||
set { _BottomMessageR = value; }
|
set { _BottomMessageR = value; }
|
||||||
}
|
}
|
||||||
private vlnText _BottomMessageA; // Added if there are 3 messages, at bottom AND in AER AND RNO (for BGEALARMS)
|
private vlnText _BottomMessageA; // Added if there are 3 messages, at bottom AND in AER AND RNO (for BGEALARMS)
|
||||||
public vlnText BottomMessageA
|
public vlnText BottomMessageA
|
||||||
{
|
{
|
||||||
get { return _BottomMessageA; }
|
get { return _BottomMessageA; }
|
||||||
@ -262,11 +262,11 @@ 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));
|
||||||
// B2019-152: Landscape page merged page numbers
|
// B2019-152: Landscape page merged page numbers
|
||||||
if (this.MySection != null && MySection.MyDocStyle.LandscapePageList) PromsPrinter.AddMergedLandscapePage(this, MyPromsPrinter.PDFFile);
|
if (this.MySection != null && MySection.MyDocStyle.LandscapePageList) PromsPrinter.AddMergedLandscapePage(this, MyPromsPrinter.PDFFile);
|
||||||
bool onBlankPage = OnBlankPage;
|
bool onBlankPage = OnBlankPage;
|
||||||
@ -287,15 +287,15 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
DrawRuler(writer.DirectContent);
|
DrawRuler(writer.DirectContent);
|
||||||
float x = MySection == null ? 555 : (float)MySection.MyDocStyle.Layout.PageWidth;
|
float x = MySection == null ? 555 : (float)MySection.MyDocStyle.Layout.PageWidth;
|
||||||
DrawBottomRuler(writer.DirectContent, x / 2 - 144); //aer column
|
DrawBottomRuler(writer.DirectContent, x / 2 - 144); //aer column
|
||||||
DrawBottomRuler(writer.DirectContent, x - 144); //rno column
|
DrawBottomRuler(writer.DirectContent, x - 144); //rno column
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
E_NumberingSequence numseq = MySection.MyDocStyle.NumberingSequence??0;
|
E_NumberingSequence numseq = MySection.MyDocStyle.NumberingSequence ?? 0;
|
||||||
// if a foldout is only printing within its section, don't do increments on pagecounts:
|
// if a foldout is only printing within its section, don't do increments on pagecounts:
|
||||||
if (numseq==E_NumberingSequence.WithinEachSection)
|
if (numseq == E_NumberingSequence.WithinEachSection)
|
||||||
MyPageCounts.CanIncrement = false;
|
MyPageCounts.CanIncrement = false;
|
||||||
else
|
else
|
||||||
MyPageCounts.CanIncrement = true;
|
MyPageCounts.CanIncrement = true;
|
||||||
@ -305,7 +305,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
// added the check for onBlankPage and Foldouts to fix bug found in V.C. Summer auto table of contents - 03/08/2016
|
// added the check for onBlankPage and Foldouts to fix bug found in V.C. Summer auto table of contents - 03/08/2016
|
||||||
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
||||||
if (!onBlankPage && (MySection.MyDocStyle.StructureStyle.Style==null || (MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0) &&
|
if (!onBlankPage && (MySection.MyDocStyle.StructureStyle.Style == null || (MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0) &&
|
||||||
!(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (MySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
|
!(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (MySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
|
||||||
CurrentTOCPageNumber++;
|
CurrentTOCPageNumber++;
|
||||||
if (MySection.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList)
|
if (MySection.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList)
|
||||||
@ -340,12 +340,12 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
if (MySection.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
if (MySection.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||||
{
|
{
|
||||||
float left = (float)MySection.MyDocStyle.Layout.LeftMargin + 4.40f - 6; // used 4.40 -6 to line up with the macro & not touch two digit sub-step tabs.
|
float left = (float)MySection.MyDocStyle.Layout.LeftMargin + 4.40f - 6; // used 4.40 -6 to line up with the macro & not touch two digit sub-step tabs.
|
||||||
float right = (float)MySection.MyDocStyle.Layout.PageWidth - .76f; // used -.76 to make bge alarm lines closest to lining up with macro
|
float right = (float)MySection.MyDocStyle.Layout.PageWidth - .76f; // used -.76 to make bge alarm lines closest to lining up with macro
|
||||||
if (AlarmYoffStart > 0)
|
if (AlarmYoffStart > 0)
|
||||||
{
|
{
|
||||||
// draw vertical - either to the alarmyoffend or bottom of page
|
// draw vertical - either to the alarmyoffend or bottom of page
|
||||||
if (AlarmYoffEnd > 0) // ends on this page.
|
if (AlarmYoffEnd > 0) // ends on this page.
|
||||||
{
|
{
|
||||||
DrawVertical(writer.DirectContent, left, AlarmYoffStart, AlarmYoffEnd);
|
DrawVertical(writer.DirectContent, left, AlarmYoffStart, AlarmYoffEnd);
|
||||||
DrawVertical(writer.DirectContent, right, AlarmYoffStart, AlarmYoffEnd);
|
DrawVertical(writer.DirectContent, right, AlarmYoffStart, AlarmYoffEnd);
|
||||||
@ -403,7 +403,7 @@ namespace Volian.Print.Library
|
|||||||
cb.LineTo(x, y);
|
cb.LineTo(x, y);
|
||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
}
|
}
|
||||||
for (float y = yBottom; y <= yTop; y += 10)
|
for (float y = yBottom; y <= yTop; y += 10)
|
||||||
{
|
{
|
||||||
float w = 10;
|
float w = 10;
|
||||||
if (i % 10 == 0) w = 30;
|
if (i % 10 == 0) w = 30;
|
||||||
@ -414,7 +414,7 @@ namespace Volian.Print.Library
|
|||||||
cb.LineTo(x, y);
|
cb.LineTo(x, y);
|
||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
}
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
cb.RestoreState();
|
cb.RestoreState();
|
||||||
cb.EndLayer();
|
cb.EndLayer();
|
||||||
@ -426,7 +426,7 @@ i = 0;
|
|||||||
if (PageListLayer != null) cb.BeginLayer(PageListLayer);
|
if (PageListLayer != null) cb.BeginLayer(PageListLayer);
|
||||||
cb.SetColorStroke(new Color(PrintOverride.SvgColor));
|
cb.SetColorStroke(new Color(PrintOverride.SvgColor));
|
||||||
cb.SetLineWidth(1.05f); // Tweak the line width to match vlnmacro
|
cb.SetLineWidth(1.05f); // Tweak the line width to match vlnmacro
|
||||||
//cb.SetColorStroke(lineColor);
|
//cb.SetColorStroke(lineColor);
|
||||||
cb.MoveTo(x, top);
|
cb.MoveTo(x, top);
|
||||||
cb.LineTo(x, bottom);
|
cb.LineTo(x, bottom);
|
||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
@ -527,7 +527,7 @@ i = 0;
|
|||||||
public void AddGap(float top, float bottom, float left, float right)
|
public void AddGap(float top, float bottom, float left, float right)
|
||||||
{
|
{
|
||||||
float center = MySection.MyDocStyle.Layout.LeftMargin + MySection.MyDocStyle.CenterLineX ?? 0;
|
float center = MySection.MyDocStyle.Layout.LeftMargin + MySection.MyDocStyle.CenterLineX ?? 0;
|
||||||
if(center == 0) return;
|
if (center == 0) return;
|
||||||
if (center > right || center < left) return;
|
if (center > right || center < left) return;
|
||||||
MyGaps.Add(top, bottom);
|
MyGaps.Add(top, bottom);
|
||||||
}
|
}
|
||||||
@ -578,7 +578,7 @@ i = 0;
|
|||||||
if ((MySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
if ((MySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("{0} ResetDocStyleAndValues", MySection.MyDocStyle.Name);
|
//Console.WriteLine("{0} ResetDocStyleAndValues", MySection.MyDocStyle.Name);
|
||||||
ItemInfo ii = (ItemInfo) MySection;
|
ItemInfo ii = (ItemInfo)MySection;
|
||||||
int indx = (int)MySection.MyDocStyle.IndexOtherThanFirstPage;
|
int indx = (int)MySection.MyDocStyle.IndexOtherThanFirstPage;
|
||||||
foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
|
foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
|
||||||
{
|
{
|
||||||
@ -614,7 +614,7 @@ i = 0;
|
|||||||
cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue));
|
cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue));
|
||||||
float yTop = (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin);
|
float yTop = (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin);
|
||||||
//Console.WriteLine("Page,yTop,yTopMargin {0},{1},{2}", cb.PdfDocument.PageNumber, yTop, YTopMargin);
|
//Console.WriteLine("Page,yTop,yTopMargin {0},{1},{2}", cb.PdfDocument.PageNumber, yTop, YTopMargin);
|
||||||
if(YTopMargin != null) yTop = (float)YTopMargin;
|
if (YTopMargin != null) yTop = (float)YTopMargin;
|
||||||
float yBottom = (float)(cb.PdfWriter.PageSize.Height - (layout.TopMargin + layout.PageLength));
|
float yBottom = (float)(cb.PdfWriter.PageSize.Height - (layout.TopMargin + layout.PageLength));
|
||||||
//Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
|
//Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
|
||||||
cb.MoveTo(x, yTop);
|
cb.MoveTo(x, yTop);
|
||||||
@ -655,14 +655,14 @@ i = 0;
|
|||||||
}
|
}
|
||||||
cb.SetLineWidth(w / 30);
|
cb.SetLineWidth(w / 30);
|
||||||
i++;
|
i++;
|
||||||
cb.MoveTo(x + w, y-1);
|
cb.MoveTo(x + w, y - 1);
|
||||||
cb.LineTo(x, y-1);
|
cb.LineTo(x, y - 1);
|
||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
}
|
}
|
||||||
cb.SetLineWidth(.1F);
|
cb.SetLineWidth(.1F);
|
||||||
cb.Rectangle((float)layout.LeftMargin, yTop, (float)layout.PageWidth - (float)layout.LeftMargin, yBottom - yTop);
|
cb.Rectangle((float)layout.LeftMargin, yTop, (float)layout.PageWidth - (float)layout.LeftMargin, yBottom - yTop);
|
||||||
float yFooter = yBottom+(float)layout.FooterLength;
|
float yFooter = yBottom + (float)layout.FooterLength;
|
||||||
cb.MoveTo((float)layout.LeftMargin,yFooter);
|
cb.MoveTo((float)layout.LeftMargin, yFooter);
|
||||||
cb.LineTo((float)layout.PageWidth, yFooter);
|
cb.LineTo((float)layout.PageWidth, yFooter);
|
||||||
float yRuler = 612;
|
float yRuler = 612;
|
||||||
cb.MoveTo(0, yRuler);
|
cb.MoveTo(0, yRuler);
|
||||||
@ -671,17 +671,17 @@ i = 0;
|
|||||||
{
|
{
|
||||||
if (x1 % 72 == 0)
|
if (x1 % 72 == 0)
|
||||||
{
|
{
|
||||||
cb.MoveTo(x1, yRuler-20);
|
cb.MoveTo(x1, yRuler - 20);
|
||||||
cb.LineTo(x1, yRuler+20);
|
cb.LineTo(x1, yRuler + 20);
|
||||||
}
|
}
|
||||||
else if (x1 % 36 == 0)
|
else if (x1 % 36 == 0)
|
||||||
{
|
{
|
||||||
cb.MoveTo(x1, yRuler-10);
|
cb.MoveTo(x1, yRuler - 10);
|
||||||
cb.LineTo(x1, yRuler+10);
|
cb.LineTo(x1, yRuler + 10);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cb.MoveTo(x1, yRuler-5);
|
cb.MoveTo(x1, yRuler - 5);
|
||||||
cb.LineTo(x1, yRuler);
|
cb.LineTo(x1, yRuler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -720,20 +720,24 @@ i = 0;
|
|||||||
foreach (PageBookmark pb in PageBookmarks)
|
foreach (PageBookmark pb in PageBookmarks)
|
||||||
{
|
{
|
||||||
int lev = pb.Level;
|
int lev = pb.Level;
|
||||||
if (MyPdfOutlines.Count < lev || lev==0)
|
if (MyPdfOutlines.Count < lev || lev == 0)
|
||||||
{
|
{
|
||||||
PdfDestination dest = new PdfDestination(PdfDestination.FIT);
|
PdfDestination dest = new PdfDestination(PdfDestination.FIT);
|
||||||
PdfOutline pdo = new PdfOutline(writer.DirectContent.RootOutline, dest, pb.Title, false);
|
PdfOutline pdo = new PdfOutline(writer.DirectContent.RootOutline, dest, pb.Title, false);
|
||||||
if (MyPdfOutlines.Count == lev)
|
if (!Convert.ToBoolean(_prtSectID[2]))
|
||||||
MyPdfOutlines.Add(pdo);
|
{
|
||||||
else
|
if (MyPdfOutlines.Count == lev)
|
||||||
MyPdfOutlines[lev] = pdo;
|
MyPdfOutlines.Add(pdo);
|
||||||
|
else
|
||||||
|
MyPdfOutlines[lev] = pdo;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PdfDestination dest =pb.PdfDestination;
|
PdfDestination dest = pb.PdfDestination;
|
||||||
if(dest==null) dest = new PdfDestination(PdfDestination.FIT);
|
if (dest == null) dest = new PdfDestination(PdfDestination.FIT);
|
||||||
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev-1], dest,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", string.Empty), false);
|
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev - 1], dest, Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", string.Empty), false);
|
||||||
if (MyPdfOutlines.Count == lev)
|
if (MyPdfOutlines.Count == lev)
|
||||||
MyPdfOutlines.Add(pdo);
|
MyPdfOutlines.Add(pdo);
|
||||||
else
|
else
|
||||||
@ -758,8 +762,8 @@ i = 0;
|
|||||||
ntfn.YTopMost = yTopMargin - myYOff;
|
ntfn.YTopMost = yTopMargin - myYOff;
|
||||||
|
|
||||||
ntfn.Processed = false; // process from here
|
ntfn.Processed = false; // process from here
|
||||||
// Only use ParagraphToPdf for printing of a single step.
|
// Only use ParagraphToPdf for printing of a single step.
|
||||||
// This is assuming that footnotes do not have child steps.
|
// This is assuming that footnotes do not have child steps.
|
||||||
ntfn.ParagraphToPdf(cb, yTopMargin, yTopMargin, tmp);
|
ntfn.ParagraphToPdf(cb, yTopMargin, yTopMargin, tmp);
|
||||||
//ntfn.ToPdf(cb, yTopMargin, ref yTopMargin, ref tmp);
|
//ntfn.ToPdf(cb, yTopMargin, ref yTopMargin, ref tmp);
|
||||||
|
|
||||||
@ -844,7 +848,7 @@ i = 0;
|
|||||||
// TODO: Pass in zeroes because topdf is inherited.
|
// TODO: Pass in zeroes because topdf is inherited.
|
||||||
vcb.ToPdf(cb, topMargin, ref tmp, ref tmp);
|
vcb.ToPdf(cb, topMargin, ref tmp, ref tmp);
|
||||||
}
|
}
|
||||||
_MyChangeBars = new List<vlnChangeBar>();
|
_MyChangeBars = new List<vlnChangeBar>();
|
||||||
}
|
}
|
||||||
#region SectionLevelData
|
#region SectionLevelData
|
||||||
private ChangeBarDefinition _ChangeBarDefinition;
|
private ChangeBarDefinition _ChangeBarDefinition;
|
||||||
@ -879,7 +883,8 @@ i = 0;
|
|||||||
DidFirstPageDocStyle = false;
|
DidFirstPageDocStyle = false;
|
||||||
if (DidFirstPageDocStyle)
|
if (DidFirstPageDocStyle)
|
||||||
forceLoadSvg = SetDocStyleAndValues(); // this method also gets the SVG (the 'else' part of this)
|
forceLoadSvg = SetDocStyleAndValues(); // this method also gets the SVG (the 'else' part of this)
|
||||||
if (_prtSectID > -1) {
|
if (_prtSectID[0] > -1)
|
||||||
|
{
|
||||||
forceLoadSvg = true;
|
forceLoadSvg = true;
|
||||||
}
|
}
|
||||||
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg);
|
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg);
|
||||||
@ -972,7 +977,7 @@ i = 0;
|
|||||||
float yChangeBarBottomExtend = prevCB.YChangeBarBottomExtend;
|
float yChangeBarBottomExtend = prevCB.YChangeBarBottomExtend;
|
||||||
prevCB.Height = Math.Max(prevCB.Height, vcb.Height);
|
prevCB.Height = Math.Max(prevCB.Height, vcb.Height);
|
||||||
prevCB.YExtendLine = prevCB.YChangeBarBottom - Math.Min(yChangeBarBottomExtend, vcb.YChangeBarBottomExtend); //Math.Max(prevCB.YExtendLine, vcb.YExtendLine);
|
prevCB.YExtendLine = prevCB.YChangeBarBottom - Math.Min(yChangeBarBottomExtend, vcb.YChangeBarBottomExtend); //Math.Max(prevCB.YExtendLine, vcb.YExtendLine);
|
||||||
// if a change bar message at this ychangebarbottom exists, see which message is used
|
// if a change bar message at this ychangebarbottom exists, see which message is used
|
||||||
if (cbmess != null && prevCB.Messages.ContainsKey(prevCB.YChangeBarBottom)) UpdateCbMessage(cbmess, prevCB, vcb.XOffset);
|
if (cbmess != null && prevCB.Messages.ContainsKey(prevCB.YChangeBarBottom)) UpdateCbMessage(cbmess, prevCB, vcb.XOffset);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -982,7 +987,7 @@ i = 0;
|
|||||||
float yChangeBarBottomExtend1 = prevCB.YChangeBarBottomExtend;
|
float yChangeBarBottomExtend1 = prevCB.YChangeBarBottomExtend;
|
||||||
prevCB.YChangeBarBottom = Math.Min(prevCB.YChangeBarBottom, vcb.YChangeBarBottom);
|
prevCB.YChangeBarBottom = Math.Min(prevCB.YChangeBarBottom, vcb.YChangeBarBottom);
|
||||||
prevCB.YExtendLine = prevCB.YChangeBarBottom - Math.Min(yChangeBarBottomExtend1, vcb.YChangeBarBottomExtend); //Math.Max(prevCB.YExtendLine, vcb.YExtendLine);
|
prevCB.YExtendLine = prevCB.YChangeBarBottom - Math.Min(yChangeBarBottomExtend1, vcb.YChangeBarBottomExtend); //Math.Max(prevCB.YExtendLine, vcb.YExtendLine);
|
||||||
// Two messages at this location, determine which one to use
|
// Two messages at this location, determine which one to use
|
||||||
if (cbmess != null && prevCB.Messages.ContainsKey(prevCB.YChangeBarBottom)) UpdateCbMessage(cbmess, prevCB, vcb.XOffset);
|
if (cbmess != null && prevCB.Messages.ContainsKey(prevCB.YChangeBarBottom)) UpdateCbMessage(cbmess, prevCB, vcb.XOffset);
|
||||||
|
|
||||||
// no message at this location, just add it.
|
// no message at this location, just add it.
|
||||||
@ -1040,7 +1045,7 @@ i = 0;
|
|||||||
set { _MyPromsPrinter = value; }
|
set { _MyPromsPrinter = value; }
|
||||||
}
|
}
|
||||||
private int _MyRomanPage = 1;
|
private int _MyRomanPage = 1;
|
||||||
public VlnSvgPageHelper(VEPROMS.CSLA.Library.SectionInfo mySection, PromsPrinter myPromsPrinter, string hlsText, int hlsItemId, int PrtSectID)
|
public VlnSvgPageHelper(VEPROMS.CSLA.Library.SectionInfo mySection, PromsPrinter myPromsPrinter, string hlsText, int hlsItemId, int[] PrtSectID = null)
|
||||||
: base()
|
: base()
|
||||||
{
|
{
|
||||||
_prtSectID = PrtSectID;
|
_prtSectID = PrtSectID;
|
||||||
@ -1171,7 +1176,7 @@ i = 0;
|
|||||||
// specific cases.
|
// specific cases.
|
||||||
string key = ((int)MySection.MyDocStyle.NumberingSequence).ToString();
|
string key = ((int)MySection.MyDocStyle.NumberingSequence).ToString();
|
||||||
|
|
||||||
E_NumberingSequence numseq = MySection.MyDocStyle.NumberingSequence??0;
|
E_NumberingSequence numseq = MySection.MyDocStyle.NumberingSequence ?? 0;
|
||||||
//Console.WriteLine("\"{0}\"\t\"{1}\"\t{2}", MySection.DisplayNumber, MySection.DisplayText, numseq);
|
//Console.WriteLine("\"{0}\"\t\"{1}\"\t{2}", MySection.DisplayNumber, MySection.DisplayText, numseq);
|
||||||
switch (numseq)
|
switch (numseq)
|
||||||
{
|
{
|
||||||
@ -1202,7 +1207,7 @@ i = 0;
|
|||||||
key = key + "." + MySection.ItemID;
|
key = key + "." + MySection.ItemID;
|
||||||
break;
|
break;
|
||||||
case E_NumberingSequence.WithinEachSectionNumber:
|
case E_NumberingSequence.WithinEachSectionNumber:
|
||||||
key = key + "." + ( MySection.DisplayNumber == string.Empty ? (MySection.ActiveParent as ItemInfo).DisplayNumber : MySection.DisplayNumber);
|
key = key + "." + (MySection.DisplayNumber == string.Empty ? (MySection.ActiveParent as ItemInfo).DisplayNumber : MySection.DisplayNumber);
|
||||||
break;
|
break;
|
||||||
case E_NumberingSequence.GroupedByLevel:
|
case E_NumberingSequence.GroupedByLevel:
|
||||||
case E_NumberingSequence.Like6_ButDoesntNeedSubsection:
|
case E_NumberingSequence.Like6_ButDoesntNeedSubsection:
|
||||||
@ -1281,7 +1286,7 @@ i = 0;
|
|||||||
{
|
{
|
||||||
// If subformat and does not have its own genmac, find an inherited genmac.
|
// If subformat and does not have its own genmac, find an inherited genmac.
|
||||||
FormatInfo tmpf = FormatInfo.Get(activeFormat.ParentID);
|
FormatInfo tmpf = FormatInfo.Get(activeFormat.ParentID);
|
||||||
while (tmpf.FormatID!=1 && (sGenMac==null||sGenMac==string.Empty))
|
while (tmpf.FormatID != 1 && (sGenMac == null || sGenMac == string.Empty))
|
||||||
{
|
{
|
||||||
sGenMac = tmpf.GenMac;
|
sGenMac = tmpf.GenMac;
|
||||||
tmpf = FormatInfo.Get(tmpf.ParentID);
|
tmpf = FormatInfo.Get(tmpf.ParentID);
|
||||||
@ -1332,7 +1337,7 @@ i = 0;
|
|||||||
SectionConfig sc = section.MyConfig as SectionConfig;
|
SectionConfig sc = section.MyConfig as SectionConfig;
|
||||||
// C2018-004 create meta file for baseline compares
|
// C2018-004 create meta file for baseline compares
|
||||||
Volian.Base.Library.BaselineMetaFile.WriteLine("SecNum=\"{0}\" SecTitle=\"{1}\" DocStyle=\"{2}\" Format=\"{3}\" ItemID={4}", section.DisplayNumber, section.DisplayText, section.MyDocStyle.Name, sc.FormatSelection, section.ItemID);
|
Volian.Base.Library.BaselineMetaFile.WriteLine("SecNum=\"{0}\" SecTitle=\"{1}\" DocStyle=\"{2}\" Format=\"{3}\" ItemID={4}", section.DisplayNumber, section.DisplayText, section.MyDocStyle.Name, sc.FormatSelection, section.ItemID);
|
||||||
Volian.Base.Library.BaselineMetaFile.WriteLine(" Pagination=\"{0}\" MSWordPgCnt={1} NumPages={2} WordMargin={3}", sc.Section_Pagination, section.MSWordPageCount, (string.IsNullOrEmpty(sc.Section_NumPages)) ? "0" : sc.Section_NumPages, (string.IsNullOrEmpty(sc.Section_WordMargin))?"N":sc.Section_WordMargin);
|
Volian.Base.Library.BaselineMetaFile.WriteLine(" Pagination=\"{0}\" MSWordPgCnt={1} NumPages={2} WordMargin={3}", sc.Section_Pagination, section.MSWordPageCount, (string.IsNullOrEmpty(sc.Section_NumPages)) ? "0" : sc.Section_NumPages, (string.IsNullOrEmpty(sc.Section_WordMargin)) ? "N" : sc.Section_WordMargin);
|
||||||
if (PgLogicals == null) PgLogicals = new Dictionary<string, bool>();
|
if (PgLogicals == null) PgLogicals = new Dictionary<string, bool>();
|
||||||
else PgLogicals.Clear();
|
else PgLogicals.Clear();
|
||||||
|
|
||||||
@ -1356,16 +1361,16 @@ i = 0;
|
|||||||
|
|
||||||
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)
|
||||||
@ -1376,7 +1381,7 @@ i = 0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
VE_Font useFontForCheckOffHeader = null;
|
VE_Font useFontForCheckOffHeader = null;
|
||||||
if (forceLoad || (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& (pageItem.Row < 0))))
|
if (forceLoad || (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag == 0) && (pageItem.Row < 0))))
|
||||||
{
|
{
|
||||||
//if (PrevRow > 0)
|
//if (PrevRow > 0)
|
||||||
//{
|
//{
|
||||||
@ -1390,12 +1395,12 @@ i = 0;
|
|||||||
// prevLPI = curLPI;
|
// prevLPI = curLPI;
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
// C2019-006 - Moved and modified the RO_Lookup() logic here, before we process the tokens in the page list
|
// C2019-006 - Moved and modified the RO_Lookup() logic here, before we process the tokens in the page list
|
||||||
// this allows us to use RO_Lookup() in a "PS=" conditional token (is usually a PSI check box)
|
// this allows us to use RO_Lookup() in a "PS=" conditional token (is usually a PSI check box)
|
||||||
// A while loop was also added to the we can have more than one call to RO_Lookup() on a pagelist line
|
// A while loop was also added to the we can have more than one call to RO_Lookup() on a pagelist line
|
||||||
// this logic was put in for Barakah Alarms
|
// this logic was put in for Barakah Alarms
|
||||||
// Note that each Alarm is defined as its own RO in the Referenced Object database, with multiple return values
|
// Note that each Alarm is defined as its own RO in the Referenced Object database, with multiple return values
|
||||||
// to define the Window ID, Alarm, Source, Setpoint, etc. for example.
|
// to define the Window ID, Alarm, Source, Setpoint, etc. for example.
|
||||||
string pltok = pageItem.Token;
|
string pltok = pageItem.Token;
|
||||||
while (pltok.Contains("RO_Lookup("))
|
while (pltok.Contains("RO_Lookup("))
|
||||||
{
|
{
|
||||||
@ -1441,7 +1446,7 @@ i = 0;
|
|||||||
int idx = procnum.IndexOf('-');
|
int idx = procnum.IndexOf('-');
|
||||||
otherChildUnit = procnum.Substring(0, idx); // we need to get RO info for the Other child applicability - this gets child's number
|
otherChildUnit = procnum.Substring(0, idx); // we need to get RO info for the Other child applicability - this gets child's number
|
||||||
}
|
}
|
||||||
ROLookupVal = ROLookup(parts[0], parts[1], string.Empty,otherChildUnit); // will return empty string if alarm point is not found in RO database
|
ROLookupVal = ROLookup(parts[0], parts[1], string.Empty, otherChildUnit); // will return empty string if alarm point is not found in RO database
|
||||||
usePSIvalue = (ROLookupVal != section.MyProcedure.DisplayNumber); // use PSI value if child alarm ID not found or does not match resolved procedure number (alarm point)
|
usePSIvalue = (ROLookupVal != section.MyProcedure.DisplayNumber); // use PSI value if child alarm ID not found or does not match resolved procedure number (alarm point)
|
||||||
}
|
}
|
||||||
// C2021-065 if usePSIvalue is true, then we know alarm point info is not in the RO database, so just use the default (PSI) value
|
// C2021-065 if usePSIvalue is true, then we know alarm point info is not in the RO database, so just use the default (PSI) value
|
||||||
@ -1482,12 +1487,12 @@ i = 0;
|
|||||||
MatchCollection matches = regexFindToken.Matches(pltok);//(pageItem.Token);
|
MatchCollection matches = regexFindToken.Matches(pltok);//(pageItem.Token);
|
||||||
if (matches.Count > 0)
|
if (matches.Count > 0)
|
||||||
{
|
{
|
||||||
string plstr = string.Empty;
|
string plstr = string.Empty;
|
||||||
// When a pagelist line (row) has more than one token that is resolved to text, each resolved token text was place on top
|
// When a pagelist line (row) has more than one token that is resolved to text, each resolved token text was place on top
|
||||||
// of each other. Use a temporary string (plstr) to process the pagelist tokens for each pagelist line (row) before adding
|
// of each other. Use a temporary string (plstr) to process the pagelist tokens for each pagelist line (row) before adding
|
||||||
// it to the svgGroup.
|
// it to the svgGroup.
|
||||||
plstr = pltok;//pageItem.Token;
|
plstr = pltok;//pageItem.Token;
|
||||||
// F2017-046: Remove the '@@' characters that were getting printed on SAMG Sup Info facing pages for Calvert (BGESAM1 format).
|
// F2017-046: Remove the '@@' characters that were getting printed on SAMG Sup Info facing pages for Calvert (BGESAM1 format).
|
||||||
if (MyPromsPrinter.DoingFacingPage && plstr.Contains("@@")) plstr = plstr.Replace("@@", string.Empty);
|
if (MyPromsPrinter.DoingFacingPage && plstr.Contains("@@")) plstr = plstr.Replace("@@", string.Empty);
|
||||||
foreach (Match match in matches)
|
foreach (Match match in matches)
|
||||||
{
|
{
|
||||||
@ -1519,8 +1524,8 @@ i = 0;
|
|||||||
if (relval == "Y")
|
if (relval == "Y")
|
||||||
{
|
{
|
||||||
//svgGroup.Add(PageItemToSvgText(pageItem.Token, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
//svgGroup.Add(PageItemToSvgText(pageItem.Token, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||||
svgGroup.Add(PageItemToSvgText(pltok, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
svgGroup.Add(PageItemToSvgText(pltok, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||||
plstr = string.Empty; // Clear it so it isn't put out twice (used below)
|
plstr = string.Empty; // Clear it so it isn't put out twice (used below)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1531,7 +1536,7 @@ i = 0;
|
|||||||
}
|
}
|
||||||
if (val != null && val != string.Empty && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
if (val != null && val != string.Empty && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||||
//if (val == null || val == string.Empty)
|
//if (val == null || val == string.Empty)
|
||||||
//val = " ";
|
//val = " ";
|
||||||
if (val == null)
|
if (val == null)
|
||||||
val = string.Empty;
|
val = string.Empty;
|
||||||
plstr = plstr.Replace(token, val);
|
plstr = plstr.Replace(token, val);
|
||||||
@ -1619,7 +1624,7 @@ i = 0;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
svgGroup.Add(PageItemToSvgText(pageItem, pltok, MySection, supInfoMargAdj));
|
svgGroup.Add(PageItemToSvgText(pageItem, pltok, MySection, supInfoMargAdj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Proms page numbering designed requires a "{PAGE}" token to increment the page counter. So the easiest way
|
// Proms page numbering designed requires a "{PAGE}" token to increment the page counter. So the easiest way
|
||||||
@ -1782,7 +1787,7 @@ i = 0;
|
|||||||
plstr = plstr.Replace(token, string.Empty);
|
plstr = plstr.Replace(token, string.Empty);
|
||||||
svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(token), supInfoMargAdj));
|
svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(token), supInfoMargAdj));
|
||||||
break;
|
break;
|
||||||
case "{PMODEBOX}": // need to set either 1 or 2 depending on number of columns
|
case "{PMODEBOX}": // need to set either 1 or 2 depending on number of columns
|
||||||
case "[PMODEBOX]":
|
case "[PMODEBOX]":
|
||||||
string box = "1";
|
string box = "1";
|
||||||
if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Four)
|
if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Four)
|
||||||
@ -1824,7 +1829,7 @@ i = 0;
|
|||||||
case "[PROCTITLE3]":
|
case "[PROCTITLE3]":
|
||||||
case "{COVERPROCTITLE}":
|
case "{COVERPROCTITLE}":
|
||||||
case "[COVERPROCTITLE]":
|
case "[COVERPROCTITLE]":
|
||||||
int tlen = (token.Contains("COVERPROCTITLE"))?(int)section.ActiveFormat.PlantFormat.FormatData.ProcData.CoverTitleLength : (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength;
|
int tlen = (token.Contains("COVERPROCTITLE")) ? (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.CoverTitleLength : (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength;
|
||||||
//float linelen = (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength * (float)pageItem.Font.CPI / 12;
|
//float linelen = (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength * (float)pageItem.Font.CPI / 12;
|
||||||
float linelen = tlen * (float)pageItem.Font.CPI / 12;
|
float linelen = tlen * (float)pageItem.Font.CPI / 12;
|
||||||
string title = section.MyProcedure.MyContent.Text;
|
string title = section.MyProcedure.MyContent.Text;
|
||||||
@ -1852,7 +1857,7 @@ i = 0;
|
|||||||
break;
|
break;
|
||||||
case "{TITLE&UNIT}":
|
case "{TITLE&UNIT}":
|
||||||
case "[TITLE&UNIT]":
|
case "[TITLE&UNIT]":
|
||||||
tlen = (token.Contains("COVERPROCTITLE"))?(int)section.ActiveFormat.PlantFormat.FormatData.ProcData.CoverTitleLength : (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength;
|
tlen = (token.Contains("COVERPROCTITLE")) ? (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.CoverTitleLength : (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength;
|
||||||
linelen = tlen * (float)pageItem.Font.CPI / 12;
|
linelen = tlen * (float)pageItem.Font.CPI / 12;
|
||||||
plstr = SplitTitleAndUnit(svgGroup, pageItem, section.MyProcedure.MyContent.Text.ToUpper(), (int)linelen, token, plstr); //,rowAdj);
|
plstr = SplitTitleAndUnit(svgGroup, pageItem, section.MyProcedure.MyContent.Text.ToUpper(), (int)linelen, token, plstr); //,rowAdj);
|
||||||
break;
|
break;
|
||||||
@ -1899,8 +1904,8 @@ i = 0;
|
|||||||
case "{PDFTime}":
|
case "{PDFTime}":
|
||||||
plstr = plstr.Replace("{PDFTime}", DateTime.Now.ToString("HH:mm:ss"));
|
plstr = plstr.Replace("{PDFTime}", DateTime.Now.ToString("HH:mm:ss"));
|
||||||
break;
|
break;
|
||||||
// F2023-087: Added PDFDate at PDFTime - note that cannot have multiple tokens in a conditional because of reg expression
|
// F2023-087: Added PDFDate at PDFTime - note that cannot have multiple tokens in a conditional because of reg expression
|
||||||
// processing.
|
// processing.
|
||||||
case "[PDFDateAtTime]":
|
case "[PDFDateAtTime]":
|
||||||
plstr = plstr.Replace("[PDFDateAtTime]", DateTime.Now.ToString("MM/dd/yyyy") + " at " + DateTime.Now.ToString("HH:mm:ss"));
|
plstr = plstr.Replace("[PDFDateAtTime]", DateTime.Now.ToString("MM/dd/yyyy") + " at " + DateTime.Now.ToString("HH:mm:ss"));
|
||||||
break;
|
break;
|
||||||
@ -1916,7 +1921,7 @@ i = 0;
|
|||||||
if (unitnum.Length > 0)
|
if (unitnum.Length > 0)
|
||||||
{
|
{
|
||||||
if (unitnum.Contains("#"))
|
if (unitnum.Contains("#"))
|
||||||
eopnum = unitnum.Replace("#", eopnum);
|
eopnum = unitnum.Replace("#", eopnum);
|
||||||
if (unitnum.Contains("!"))
|
if (unitnum.Contains("!"))
|
||||||
eopnum = unitnum.Replace("!", unitname);
|
eopnum = unitnum.Replace("!", unitname);
|
||||||
if (eopnum == string.Empty)
|
if (eopnum == string.Empty)
|
||||||
@ -1971,13 +1976,13 @@ i = 0;
|
|||||||
case "[ATTACHTITLECONT]":
|
case "[ATTACHTITLECONT]":
|
||||||
// B2020-038: incorrect pagination: Note that if PSOnlyFirst is active and pagination is set to continuous, pagination may be incorrect in printed output (no code change-just info here in case happens again)
|
// B2020-038: incorrect pagination: Note that if PSOnlyFirst is active and pagination is set to continuous, pagination may be incorrect in printed output (no code change-just info here in case happens again)
|
||||||
bool printsectlevel = ((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) != VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) ||
|
bool printsectlevel = ((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) != VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) ||
|
||||||
(((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) == VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) && PrintedSectionPage==0);
|
(((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) == VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) && PrintedSectionPage == 0);
|
||||||
// if there is 'no title' for the section, only print it if a format flag says to print it.
|
// if there is 'no title' for the section, only print it if a format flag says to print it.
|
||||||
if (printsectlevel)
|
if (printsectlevel)
|
||||||
{
|
{
|
||||||
if (section.DisplayText.ToUpper().Contains("<NO TITLE>") && !section.ActiveFormat.PlantFormat.FormatData.ProcData.PrintNoTitle) printsectlevel = false;
|
if (section.DisplayText.ToUpper().Contains("<NO TITLE>") && !section.ActiveFormat.PlantFormat.FormatData.ProcData.PrintNoTitle) printsectlevel = false;
|
||||||
}
|
}
|
||||||
if (MyPromsPrinter.DoingFacingPage) printsectlevel = false; // don't put out section title/number if doing SAMG facing pages
|
if (MyPromsPrinter.DoingFacingPage) printsectlevel = false; // don't put out section title/number if doing SAMG facing pages
|
||||||
if (printsectlevel)
|
if (printsectlevel)
|
||||||
{
|
{
|
||||||
string stitle = section.DisplayText;
|
string stitle = section.DisplayText;
|
||||||
@ -1985,7 +1990,7 @@ i = 0;
|
|||||||
&& token.Contains("ATTACHTITLECONT") && DidFirstPageDocStyle)
|
&& token.Contains("ATTACHTITLECONT") && DidFirstPageDocStyle)
|
||||||
{
|
{
|
||||||
string myMsg = section.MyDocStyle.Continue.Top.Message;
|
string myMsg = section.MyDocStyle.Continue.Top.Message;
|
||||||
if (myMsg != null && myMsg != string.Empty)stitle = stitle + myMsg;
|
if (myMsg != null && myMsg != string.Empty) stitle = stitle + myMsg;
|
||||||
}
|
}
|
||||||
// B2023-043: Beaver Valley AOP - allow attributes, such as superscript on section titles when printing
|
// B2023-043: Beaver Valley AOP - allow attributes, such as superscript on section titles when printing
|
||||||
if (section.ActiveFormat.PlantFormat.FormatData.PrintData.SectionTitleWithAttributes)
|
if (section.ActiveFormat.PlantFormat.FormatData.PrintData.SectionTitleWithAttributes)
|
||||||
@ -2004,7 +2009,7 @@ i = 0;
|
|||||||
plstr = plstr.Replace(token, string.Empty);
|
plstr = plstr.Replace(token, string.Empty);
|
||||||
//svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText));
|
//svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText));
|
||||||
break;
|
break;
|
||||||
case "{METASECTIONTITLE}": // This will print the top level section title (versus level above current) starting from a sub-section
|
case "{METASECTIONTITLE}": // This will print the top level section title (versus level above current) starting from a sub-section
|
||||||
case "[METASECTIONTITLE]":
|
case "[METASECTIONTITLE]":
|
||||||
if (section.MyParent.IsSection)
|
if (section.MyParent.IsSection)
|
||||||
{
|
{
|
||||||
@ -2054,9 +2059,9 @@ i = 0;
|
|||||||
// text starts with a ' - ' - remove it.
|
// text starts with a ' - ' - remove it.
|
||||||
else if (plstr.StartsWith(" - ") && plstr.IndexOf("{SECTIONLEVELTITLE}") == 3)
|
else if (plstr.StartsWith(" - ") && plstr.IndexOf("{SECTIONLEVELTITLE}") == 3)
|
||||||
plstr = plstr.Substring(3);
|
plstr = plstr.Substring(3);
|
||||||
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.DisplayNumber)));
|
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.DisplayNumber)));
|
||||||
break;
|
break;
|
||||||
case "{METASECTIONNUMBER}": // This will print the top level section number when starting from a sub-section
|
case "{METASECTIONNUMBER}": // This will print the top level section number when starting from a sub-section
|
||||||
case "[METASECTIONNUMBER]":
|
case "[METASECTIONNUMBER]":
|
||||||
if (section.MyParent.IsSection)
|
if (section.MyParent.IsSection)
|
||||||
{
|
{
|
||||||
@ -2118,12 +2123,12 @@ i = 0;
|
|||||||
break;
|
break;
|
||||||
case "{ATTACHNUM}":
|
case "{ATTACHNUM}":
|
||||||
case "[ATTACHNUM]":
|
case "[ATTACHNUM]":
|
||||||
plstr = plstr.Replace(token, "1"); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre)
|
plstr = plstr.Replace(token, "1"); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre)
|
||||||
break;
|
break;
|
||||||
case "{ATTACHNUM1}":
|
case "{ATTACHNUM1}":
|
||||||
case "[ATTACHNUM1]":
|
case "[ATTACHNUM1]":
|
||||||
string numAtt = GetAttachNum1();
|
string numAtt = GetAttachNum1();
|
||||||
plstr = plstr.Replace(token, numAtt); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre)
|
plstr = plstr.Replace(token, numAtt); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre)
|
||||||
break;
|
break;
|
||||||
case "{CHKOFFHEADING}":
|
case "{CHKOFFHEADING}":
|
||||||
case "[CHKOFFHEADING]":
|
case "[CHKOFFHEADING]":
|
||||||
@ -2212,7 +2217,7 @@ i = 0;
|
|||||||
// plants that have been delivered - so added special code for BGE.
|
// plants that have been delivered - so added special code for BGE.
|
||||||
if (section.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
|
if (section.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
|
||||||
{
|
{
|
||||||
if (Regex.IsMatch(procnum.Substring(0,1),"[A-Za-z]"))
|
if (Regex.IsMatch(procnum.Substring(0, 1), "[A-Za-z]"))
|
||||||
plstr = pd.ProcDescr1;
|
plstr = pd.ProcDescr1;
|
||||||
else
|
else
|
||||||
plstr = string.Empty;
|
plstr = string.Empty;
|
||||||
@ -2268,12 +2273,12 @@ i = 0;
|
|||||||
plstr = plstr.Replace(token, thisDate2.ToString("H:mm"));
|
plstr = plstr.Replace(token, thisDate2.ToString("H:mm"));
|
||||||
break;
|
break;
|
||||||
case "{HLRNO}":
|
case "{HLRNO}":
|
||||||
plstr = HLRNO==null?string.Empty:plstr.Replace(token, HLRNO);
|
plstr = HLRNO == null ? string.Empty : plstr.Replace(token, HLRNO);
|
||||||
break;
|
break;
|
||||||
case "{HLSTAB}":
|
case "{HLSTAB}":
|
||||||
if (HLSTAB.Contains("{!Clock}")) // F2022-024 replace with the clock symbol defined in GenMac format file
|
if (HLSTAB.Contains("{!Clock}")) // F2022-024 replace with the clock symbol defined in GenMac format file
|
||||||
{
|
{
|
||||||
HLSTAB = HLSTAB.Replace("{!Clock}",string.Empty).TrimStart(" ".ToCharArray());
|
HLSTAB = HLSTAB.Replace("{!Clock}", string.Empty).TrimStart(" ".ToCharArray());
|
||||||
svgGroup.Add(PageItemToSvgUse(pageItem, "Clock", supInfoMargAdj));
|
svgGroup.Add(PageItemToSvgUse(pageItem, "Clock", supInfoMargAdj));
|
||||||
}
|
}
|
||||||
plstr = plstr.Replace(token, HLSTAB);
|
plstr = plstr.Replace(token, HLSTAB);
|
||||||
@ -2392,7 +2397,7 @@ i = 0;
|
|||||||
}
|
}
|
||||||
if (token.Contains(@"RO-"))
|
if (token.Contains(@"RO-"))
|
||||||
{
|
{
|
||||||
plstr = token.Replace("{",string.Empty).Replace("}",string.Empty);
|
plstr = token.Replace("{", string.Empty).Replace("}", string.Empty);
|
||||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection, 0));
|
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection, 0));
|
||||||
}
|
}
|
||||||
if (token.Contains(@"PS-"))
|
if (token.Contains(@"PS-"))
|
||||||
@ -2407,7 +2412,7 @@ i = 0;
|
|||||||
{
|
{
|
||||||
val = procConfig.GetValue("PSI", token.Substring(4, token.Length - 5));
|
val = procConfig.GetValue("PSI", token.Substring(4, token.Length - 5));
|
||||||
// F2021-034: Resolve applicability unit tokens (not just '<u>')
|
// F2021-034: Resolve applicability unit tokens (not just '<u>')
|
||||||
if(val.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
if (val.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
||||||
{
|
{
|
||||||
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
||||||
val = unbr3 ?? string.Empty;
|
val = unbr3 ?? string.Empty;
|
||||||
@ -2418,7 +2423,7 @@ i = 0;
|
|||||||
// in the TopMargin if the PSI text split onto more than one line.
|
// in the TopMargin if the PSI text split onto more than one line.
|
||||||
if ((pageItem.MaxWidth ?? 0) > 0 || (pageItem.MaxWidthCurPage ?? 0) > 0)
|
if ((pageItem.MaxWidth ?? 0) > 0 || (pageItem.MaxWidthCurPage ?? 0) > 0)
|
||||||
{
|
{
|
||||||
int locwid = ((pageItem.MaxWidth??0)>0)?(int)pageItem.MaxWidth:(int)pageItem.MaxWidthCurPage;
|
int locwid = ((pageItem.MaxWidth ?? 0) > 0) ? (int)pageItem.MaxWidth : (int)pageItem.MaxWidthCurPage;
|
||||||
AdjustTopMarginForMultiLinePageListItems = SplitTextMaxWidth(svgGroup, pageItem, val, locwid, token, ref plstr);
|
AdjustTopMarginForMultiLinePageListItems = SplitTextMaxWidth(svgGroup, pageItem, val, locwid, token, ref plstr);
|
||||||
if ((pageItem.MaxWidthCurPage ?? 0) > 0) AdjustTopMarginForMultiLinePageListItems = 0;
|
if ((pageItem.MaxWidthCurPage ?? 0) > 0) AdjustTopMarginForMultiLinePageListItems = 0;
|
||||||
}
|
}
|
||||||
@ -2579,7 +2584,7 @@ i = 0;
|
|||||||
}
|
}
|
||||||
return Math.Max(0, yOffset);
|
return Math.Max(0, yOffset);
|
||||||
}
|
}
|
||||||
private string SplitTitle(SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, string title, int? len, string match, string plstr,int? numAndTitleLen)
|
private string SplitTitle(SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, string title, int? len, string match, string plstr, int? numAndTitleLen)
|
||||||
{
|
{
|
||||||
bool includePrecedingText = false;
|
bool includePrecedingText = false;
|
||||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty);
|
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty);
|
||||||
@ -2603,7 +2608,7 @@ i = 0;
|
|||||||
// B2022-061: don't print '\line' as part of procedure title in pagelist items.
|
// B2022-061: don't print '\line' as part of procedure title in pagelist items.
|
||||||
if (match == "{PROCTITLE}") title = title.Replace("\\line ", string.Empty);
|
if (match == "{PROCTITLE}") title = title.Replace("\\line ", string.Empty);
|
||||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty); // this would have been done in proctitle1
|
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty); // this would have been done in proctitle1
|
||||||
plstr = plstr.Replace(match, title).Replace("@@",string.Empty);
|
plstr = plstr.Replace(match, title).Replace("@@", string.Empty);
|
||||||
//svgGroup.Add(PageItemToSvgText(pageItem, title));
|
//svgGroup.Add(PageItemToSvgText(pageItem, title));
|
||||||
return plstr;
|
return plstr;
|
||||||
}
|
}
|
||||||
@ -2616,7 +2621,7 @@ i = 0;
|
|||||||
return string.Empty; // all resolved pagelist items were already added to svgGroup for printing.
|
return string.Empty; // all resolved pagelist items were already added to svgGroup for printing.
|
||||||
}
|
}
|
||||||
// Otherwise determine how many line to split the text into
|
// Otherwise determine how many line to split the text into
|
||||||
List<string>titleLines = Volian.Base.Library.RtfTools.SplitText(title,(includePrecedingText)?(int)numAndTitleLen: (int)len);
|
List<string> titleLines = Volian.Base.Library.RtfTools.SplitText(title, (includePrecedingText) ? (int)numAndTitleLen : (int)len);
|
||||||
|
|
||||||
// Adjust y location based on which pagelist token & how many lines. Proctitle1 is adjusted if
|
// Adjust y location based on which pagelist token & how many lines. Proctitle1 is adjusted if
|
||||||
// there are more than 2 lines (proctitle1 should have it's own y location that is used if there are 1 or 2 lines.)
|
// there are more than 2 lines (proctitle1 should have it's own y location that is used if there are 1 or 2 lines.)
|
||||||
@ -2687,11 +2692,11 @@ i = 0;
|
|||||||
get { return _InitialsPrinted; }
|
get { return _InitialsPrinted; }
|
||||||
set { _InitialsPrinted = value; }
|
set { _InitialsPrinted = value; }
|
||||||
}
|
}
|
||||||
public bool PrintInitials(PdfContentByte cb,float yLocation, float leftMargin)
|
public bool PrintInitials(PdfContentByte cb, float yLocation, float leftMargin)
|
||||||
{
|
{
|
||||||
if (InitialsPrinted) return false;
|
if (InitialsPrinted) return false;
|
||||||
InitialsPrinted = true;
|
InitialsPrinted = true;
|
||||||
vlnParagraph.TextAt(cb,this, PIInitials ?? LastPIInitials, yLocation, leftMargin);
|
vlnParagraph.TextAt(cb, this, PIInitials ?? LastPIInitials, yLocation, leftMargin);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
private void DoSpecialSectNumTitle(SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, string title, int? len, string match, string plstr)
|
private void DoSpecialSectNumTitle(SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, string title, int? len, string match, string plstr)
|
||||||
@ -2780,7 +2785,7 @@ i = 0;
|
|||||||
}
|
}
|
||||||
// if the token was proctitle, dont' adjust. If the token was PROCTITLE1/2 then
|
// if the token was proctitle, dont' adjust. If the token was PROCTITLE1/2 then
|
||||||
// move down 6.
|
// move down 6.
|
||||||
// int adj = pageItem.Token.Contains("1") || pageItem.Token.Contains("2") ? 0 : -6;
|
// int adj = pageItem.Token.Contains("1") || pageItem.Token.Contains("2") ? 0 : -6;
|
||||||
int adj = (titleLines.Count > 2) ? -6 : 0;
|
int adj = (titleLines.Count > 2) ? -6 : 0;
|
||||||
float yOffset = adj * (titleLines.Count - 2);
|
float yOffset = adj * (titleLines.Count - 2);
|
||||||
int lnCnt = 0;
|
int lnCnt = 0;
|
||||||
@ -2877,10 +2882,10 @@ i = 0;
|
|||||||
}
|
}
|
||||||
// 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.
|
||||||
svgText.X = new SvgMeasurement((float)lcol - colAdj16bit + supmargadj, E_MeasurementUnits.PT); // F2023-035: Add in supplemental info margin adjust
|
svgText.X = new SvgMeasurement((float)lcol - colAdj16bit + supmargadj, E_MeasurementUnits.PT); // F2023-035: Add in supplemental info margin adjust
|
||||||
svgText.Y = new SvgMeasurement(row, E_MeasurementUnits.PT);
|
svgText.Y = new SvgMeasurement(row, E_MeasurementUnits.PT);
|
||||||
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
||||||
// C2018-004 create meta file for baseline compares
|
// C2018-004 create meta file for baseline compares
|
||||||
Volian.Base.Library.BaselineMetaFile.WriteLine(" PL x {0} y {1} {2} {3} {4} \"{5}\"", svgText.X, svgText.Y, svgText.FontFamily, svgText.FontSize, svgText.SVGFontStyle, TextForBaseline.FixText(svgText.Text));
|
Volian.Base.Library.BaselineMetaFile.WriteLine(" PL x {0} y {1} {2} {3} {4} \"{5}\"", svgText.X, svgText.Y, svgText.FontFamily, svgText.FontSize, svgText.SVGFontStyle, TextForBaseline.FixText(svgText.Text));
|
||||||
return svgText;
|
return svgText;
|
||||||
}
|
}
|
||||||
@ -2968,7 +2973,7 @@ i = 0;
|
|||||||
svgText.X = new SvgMeasurement((float)lcol - colAdj16bit, E_MeasurementUnits.PT); // new SvgMeasurement((float)(pageItem.Col ?? 0), E_MeasurementUnits.PT);
|
svgText.X = new SvgMeasurement((float)lcol - colAdj16bit, E_MeasurementUnits.PT); // new SvgMeasurement((float)(pageItem.Col ?? 0), E_MeasurementUnits.PT);
|
||||||
svgText.Y = new SvgMeasurement((float)(yOffset + pageItem.Row ?? 0), E_MeasurementUnits.PT);
|
svgText.Y = new SvgMeasurement((float)(yOffset + pageItem.Row ?? 0), E_MeasurementUnits.PT);
|
||||||
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
||||||
// C2018-004 create meta file for baseline compares
|
// C2018-004 create meta file for baseline compares
|
||||||
Volian.Base.Library.BaselineMetaFile.WriteLine(" PL x {0} y {1} {2} {3} {4} \"{5}\"", svgText.X, svgText.Y, svgText.FontFamily, svgText.FontSize, svgText.SVGFontStyle, TextForBaseline.FixText(svgText.Text));
|
Volian.Base.Library.BaselineMetaFile.WriteLine(" PL x {0} y {1} {2} {3} {4} \"{5}\"", svgText.X, svgText.Y, svgText.FontFamily, svgText.FontSize, svgText.SVGFontStyle, TextForBaseline.FixText(svgText.Text));
|
||||||
return svgText;
|
return svgText;
|
||||||
}
|
}
|
||||||
@ -3015,7 +3020,7 @@ i = 0;
|
|||||||
svgText.X = new SvgMeasurement((float)lcol - colAdj16bit, E_MeasurementUnits.PT); // new SvgMeasurement((float)(pageItem.Col ?? 0), E_MeasurementUnits.PT);
|
svgText.X = new SvgMeasurement((float)lcol - colAdj16bit, E_MeasurementUnits.PT); // new SvgMeasurement((float)(pageItem.Col ?? 0), E_MeasurementUnits.PT);
|
||||||
svgText.Y = new SvgMeasurement(row, E_MeasurementUnits.PT);
|
svgText.Y = new SvgMeasurement(row, E_MeasurementUnits.PT);
|
||||||
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
||||||
// C2018-004 create meta file for baseline compares
|
// C2018-004 create meta file for baseline compares
|
||||||
Volian.Base.Library.BaselineMetaFile.WriteLine(" PL x {0} y {1} {2} {3} {4} \"{5}\"", svgText.X, svgText.Y, svgText.FontFamily, svgText.FontSize, svgText.SVGFontStyle, TextForBaseline.FixText(svgText.Text));
|
Volian.Base.Library.BaselineMetaFile.WriteLine(" PL x {0} y {1} {2} {3} {4} \"{5}\"", svgText.X, svgText.Y, svgText.FontFamily, svgText.FontSize, svgText.SVGFontStyle, TextForBaseline.FixText(svgText.Text));
|
||||||
return svgText;
|
return svgText;
|
||||||
}
|
}
|
||||||
@ -3028,7 +3033,7 @@ i = 0;
|
|||||||
return CurrentPageNumber.ToString();
|
return CurrentPageNumber.ToString();
|
||||||
case "{OF}": // Total Page Count for this section
|
case "{OF}": // Total Page Count for this section
|
||||||
return CurrentPageOf.ToString();
|
return CurrentPageOf.ToString();
|
||||||
case "{REV}": // Revision Number and/or Revision string.
|
case "{REV}": // Revision Number and/or Revision string.
|
||||||
case "{REV2}":
|
case "{REV2}":
|
||||||
// The 16bit code has a revision number & then a revision date. This revision date
|
// The 16bit code has a revision number & then a revision date. This revision date
|
||||||
// was actually either a date OR a string. The 32bit code no longer will call this
|
// was actually either a date OR a string. The 32bit code no longer will call this
|
||||||
@ -3043,10 +3048,10 @@ i = 0;
|
|||||||
|| (MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash && Rev.Contains("\\")))
|
|| (MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash && Rev.Contains("\\")))
|
||||||
{
|
{
|
||||||
int indx = Rev.IndexOf(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash ? '\\' : '/');
|
int indx = Rev.IndexOf(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash ? '\\' : '/');
|
||||||
if (match.Value == "{REV}") return Rev.Substring(0,indx);
|
if (match.Value == "{REV}") return Rev.Substring(0, indx);
|
||||||
return Rev.Substring(indx+1);
|
return Rev.Substring(indx + 1);
|
||||||
}
|
}
|
||||||
if (match.Value == "{REV}")return Rev;
|
if (match.Value == "{REV}") return Rev;
|
||||||
return System.DateTime.Today.ToShortDateString();
|
return System.DateTime.Today.ToShortDateString();
|
||||||
case "{CHKOFFHEADING}":
|
case "{CHKOFFHEADING}":
|
||||||
return PageListTopCheckOffHeader;
|
return PageListTopCheckOffHeader;
|
||||||
@ -3109,8 +3114,8 @@ i = 0;
|
|||||||
private ItemInfo _MyItemInfo;
|
private ItemInfo _MyItemInfo;
|
||||||
public ItemInfo MyItemInfo
|
public ItemInfo MyItemInfo
|
||||||
{
|
{
|
||||||
get { return _MyItemInfo; }
|
get { return _MyItemInfo; }
|
||||||
set { _MyItemInfo = value; }
|
set { _MyItemInfo = value; }
|
||||||
}
|
}
|
||||||
private string _Title;
|
private string _Title;
|
||||||
public string Title
|
public string Title
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user