increase PSI labels width

Add argument to fmrPDFStatusForm call for pagenum transition processing (B2015-053)
Add argument for pagenum transition processing (B2015-053)
Add panel/scroll bar for PSI that has many fields (on larger font display, could not access bottommost) (B2015-051)
Add property for tracking of pagenum transitions (B2015-053)
For section list, use section default (procedure steps) if transition format has user interface of ‘SectDefault’. (B2015-052)
Pagenum transition processing – add 3rd pass for fix. (B2015-053)
This commit is contained in:
2015-04-24 13:13:47 +00:00
parent 029fcd03f4
commit 45d311bdfe
16 changed files with 114 additions and 27 deletions

View File

@@ -165,6 +165,12 @@ namespace Volian.Print.Library
get { return _InsertBlankPages; }
set { _InsertBlankPages = value; }
}
private bool _BatchPrint = true; // flags that a batch-type print is occurring, i.e. AllProcedures or Automatic testing
public bool BatchPrint
{
get { return _BatchPrint; }
set { _BatchPrint = value; }
}
private static List<string> _TransPageNumProblems = null;
public static List<string> TransPageNumProblems
{
@@ -197,7 +203,7 @@ namespace Volian.Print.Library
get { return _MyReaderHelper; }
set { _MyReaderHelper = value; }
}
public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite, ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages)
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)
{
_MyItem = myItem;
_Rev = rev;
@@ -210,6 +216,7 @@ namespace Volian.Print.Library
_PDFFile = pdfFile;
_OriginalPageBreak = origPgBrk;
_InsertBlankPages = insertBlankPages;
_BatchPrint = batchPrint;
_MyReaderHelper = new ReaderHelper(this);
//_MyReaderHelper.LoadTree(myItem);
}
@@ -231,18 +238,50 @@ namespace Volian.Print.Library
// if the plant uses transition modifiers and/or page num in transition format,
// need to do two passes. First pass, sets the pagenumbers for each item,
// 2nd pass fills in the page numbers in transitions.
DirectoryInfo di = new DirectoryInfo(pdfFolder + @"\BeforePageNumber");
DirectoryInfo di = new DirectoryInfo(pdfFolder + @"\PageNumberPass1");
if (!di.Exists) di.Create();
string retstr = Print(_MyItem as ProcedureInfo, pdfFolder + @"\BeforePageNumber", false);
string retstr = Print(_MyItem as ProcedureInfo, pdfFolder + @"\PageNumberPass1", false);
if (retstr == null) return null;
BeforePageNumberPdf = retstr;
ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo);
_MyReaderHelper = new ReaderHelper(this);
return Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper);
retstr = Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper);
if (TransPageNumProblems.Count > 0)
{
if (BatchPrint || ( MessageBox.Show("Page Number Transitions may be fixed if a second pass is performed. Do you want to perform a second pass?", "Page Number Transition Errors", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes))
{
DirectoryInfo di1 = new DirectoryInfo(pdfFolder + @"\PageNumberPass2");
if (!di1.Exists) di1.Create();
FileInfo fi = new FileInfo(retstr);
FileInfo fidest = new FileInfo(di1.FullName + @"\" + fi.Name);
if (fidest.Exists) fidest.Delete();
fi.MoveTo(di1.FullName + @"\" + fi.Name);
ClearTransPageNumProblems();
RefreshPageNumber(_MyItem);
ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo);
_MyReaderHelper = new ReaderHelper(this);
retstr = Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper);
}
}
return retstr;
}
}
return "";
}
private void RefreshPageNumber(ItemInfo _MyItem)
{
// set all page numbers for all items under the passed in procedure item
_MyItem.PageNumber = _MyItem.PageNumberNextPass;
if (_MyItem.MyContent.ContentPartCount > 0)
{
foreach (PartInfo pi in _MyItem.MyContent.ContentParts)
{
foreach (ItemInfo ii in pi.MyItems)
RefreshPageNumber(ii);
}
}
}
internal string BuildMSWordPDF(SectionInfo section)
{
DateTime tStart = DateTime.Now;