From 6732591fc5706e11a5be3373dc7774ffcabea665 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 12 Apr 2018 20:29:31 +0000 Subject: [PATCH] C2018-009 logic to pass the PROMS version number down to the iTechSharp C2018-004 Close the DebugMeta.txt file after printing C2018-004 Added class for generate a DebugMeta file. --- .../VEPROMS User Interface/frmPDFStatusForm.cs | 3 ++- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 3 +++ PROMS/Volian.Base.Library/DebugPrint.cs | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs b/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs index 9cc56998..0fc95fe9 100644 --- a/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs +++ b/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs @@ -75,7 +75,7 @@ namespace VEPROMS get { return _OnlyShowContinuousActionSummary; } set { _OnlyShowContinuousActionSummary = 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, bool removeTrailingHardReturnsAndManualPageBreaks) + 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, bool removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer) { Prefix = prefix; OpenPDF = openPDF; @@ -83,6 +83,7 @@ namespace VEPROMS // 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. MyPromsPrinter = new PromsPrinter(myItem, rev, (VlnSettings.ReleaseMode.Equals("DEMO")) ? "Sample" : watermark, debugOutput, origPgBrk, pdfPath + @"\\Compare", false, overWrite, cbd, pdfFile, insertBlankPages, allOrAuto,Prefix,saveLinks,removeTrailingHardReturnsAndManualPageBreaks); + MyPromsPrinter.PromsVersion = (showPROMSVer) ? AboutVEPROMS.PROMSVersion : ""; //C2018-009 print PROMS version PDFPath = pdfPath; this.Text = "Creating PDF of " + myItem.DisplayNumber; _NewLocation = newLocation; diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 801ce70e..36fb077d 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -536,6 +536,7 @@ namespace VEPROMS { string msg = string.Empty; bool ok = MySessionInfo.CanCheckOutItem(fi.FolderID, CheckOutType.Session, ref msg); + //bool ok = MySessionInfo.CanCheckOutItem(fi.FolderID, (args.Index == 0)? CheckOutType.Folder : CheckOutType.Session, ref msg); if (!ok) { if (args.Index == 0) @@ -546,6 +547,7 @@ namespace VEPROMS else { int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, CheckOutType.Session); + //int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, (args.Index == 0) ? CheckOutType.Folder : CheckOutType.Session); dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this);//Added frmVEPROMS Parameter dlg.ShowDialog(this); MySessionInfo.CheckInItem(ownerid); @@ -1222,6 +1224,7 @@ namespace VEPROMS //Settings.Default.Save(); Volian.Base.Library.DebugPagination.Close(); Volian.Base.Library.DebugText.Close(); + Volian.Base.Library.BaselineMetaFile.Close(); // C2018-004 create meta file for baseline compares } } void frmVEPROMS_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) diff --git a/PROMS/Volian.Base.Library/DebugPrint.cs b/PROMS/Volian.Base.Library/DebugPrint.cs index 9ea40365..6afc39fa 100644 --- a/PROMS/Volian.Base.Library/DebugPrint.cs +++ b/PROMS/Volian.Base.Library/DebugPrint.cs @@ -144,4 +144,21 @@ namespace Volian.Base.Library public static bool IsOpen { get { return _MyDebugPrint.IsOpen; } } } + // C2018-004 create meta file for baseline compares + public static class BaselineMetaFile + { + private static DebugPrint _MyDebugPrint = new DebugPrint(); + public static void Open(string fileName) + { _MyDebugPrint.Open(fileName); } + public static void Close() + { _MyDebugPrint.Close(); } + public static void Write(string format, params object[] args) + { _MyDebugPrint.Write(format, args); } + public static void WriteLine(string format, params object[] args) + { _MyDebugPrint.WriteLine(format, args); } + public static void Show() + { _MyDebugPrint.Show(); } + public static bool IsOpen + { get { return _MyDebugPrint.IsOpen; } } + } }