diff --git a/PROMS/VEPROMS User Interface/DlgPrintProcedure.Designer.cs b/PROMS/VEPROMS User Interface/DlgPrintProcedure.Designer.cs index 110e7a0e..49ffc05c 100644 --- a/PROMS/VEPROMS User Interface/DlgPrintProcedure.Designer.cs +++ b/PROMS/VEPROMS User Interface/DlgPrintProcedure.Designer.cs @@ -96,6 +96,7 @@ namespace VEPROMS this.cbxBlankPgsForDuplex = new System.Windows.Forms.CheckBox(); this.cbxGeneratePlacekeeper = new System.Windows.Forms.CheckBox(); this.cbxPDFLinks = new System.Windows.Forms.CheckBox(); + this.cbxRemoveManualPageBreaks = new System.Windows.Forms.CheckBox(); this.cbxGenerateConActSum = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.tabControl1)).BeginInit(); this.tabControl1.SuspendLayout(); @@ -1147,7 +1148,7 @@ namespace VEPROMS this.cbxBlankPgsForDuplex.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.docVersionConfigBindingSource, "Print_AlwaysOverwritePDF", true)); this.cbxBlankPgsForDuplex.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cbxBlankPgsForDuplex.ForeColor = System.Drawing.SystemColors.ControlText; - this.cbxBlankPgsForDuplex.Location = new System.Drawing.Point(138, 332); + this.cbxBlankPgsForDuplex.Location = new System.Drawing.Point(138, 340); this.cbxBlankPgsForDuplex.Margin = new System.Windows.Forms.Padding(2); this.cbxBlankPgsForDuplex.Name = "cbxBlankPgsForDuplex"; this.cbxBlankPgsForDuplex.Size = new System.Drawing.Size(323, 19); @@ -1177,7 +1178,7 @@ namespace VEPROMS this.cbxPDFLinks.BackColor = System.Drawing.Color.Transparent; this.cbxPDFLinks.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cbxPDFLinks.ForeColor = System.Drawing.SystemColors.ControlText; - this.cbxPDFLinks.Location = new System.Drawing.Point(138, 309); + this.cbxPDFLinks.Location = new System.Drawing.Point(138, 323); this.cbxPDFLinks.Margin = new System.Windows.Forms.Padding(2); this.cbxPDFLinks.Name = "cbxPDFLinks"; this.cbxPDFLinks.Size = new System.Drawing.Size(91, 19); @@ -1185,6 +1186,21 @@ namespace VEPROMS this.cbxPDFLinks.Text = "PDF Links"; this.cbxPDFLinks.UseVisualStyleBackColor = false; // + // cbxRemoveManualPageBreaks + // + this.cbxRemoveManualPageBreaks.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.cbxRemoveManualPageBreaks.AutoSize = true; + this.cbxRemoveManualPageBreaks.BackColor = System.Drawing.Color.Transparent; + this.cbxRemoveManualPageBreaks.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbxRemoveManualPageBreaks.ForeColor = System.Drawing.SystemColors.ControlText; + this.cbxRemoveManualPageBreaks.Location = new System.Drawing.Point(138, 306); + this.cbxRemoveManualPageBreaks.Margin = new System.Windows.Forms.Padding(2); + this.cbxRemoveManualPageBreaks.Name = "cbxRemoveManualPageBreaks"; + this.cbxRemoveManualPageBreaks.Size = new System.Drawing.Size(91, 19); + this.cbxRemoveManualPageBreaks.TabIndex = 101; + this.cbxRemoveManualPageBreaks.Text = "Remove Trailing Hard Returns && Manual Page Breaks"; + this.cbxRemoveManualPageBreaks.UseVisualStyleBackColor = false; + // // cbxGenerateConActSum // this.cbxGenerateConActSum.Anchor = System.Windows.Forms.AnchorStyles.Bottom; @@ -1210,6 +1226,7 @@ namespace VEPROMS this.Controls.Add(this.cbxGenerateConActSum); this.Controls.Add(this.cbxGeneratePlacekeeper); this.Controls.Add(this.cbxPDFLinks); + this.Controls.Add(this.cbxRemoveManualPageBreaks); this.Controls.Add(this.cbxBlankPgsForDuplex); this.Controls.Add(this.cbxOrPgBrk); this.Controls.Add(this.cbxDebug); @@ -1315,6 +1332,7 @@ namespace VEPROMS private System.Windows.Forms.CheckBox cbxBlankPgsForDuplex; private System.Windows.Forms.CheckBox cbxGeneratePlacekeeper; private System.Windows.Forms.CheckBox cbxPDFLinks; + private System.Windows.Forms.CheckBox cbxRemoveManualPageBreaks; private DevComponents.DotNetBar.ButtonX btnPdfLocation; private System.Windows.Forms.CheckBox cbxGenerateConActSum; } diff --git a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs index 89bfea65..dee1ac5e 100644 --- a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs +++ b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs @@ -19,6 +19,10 @@ namespace VEPROMS { get { return cbxPDFLinks.Checked; } } + public bool RemoveTrailingHardReturnsAndManualPageBreaks + { + get { return cbxRemoveManualPageBreaks.Checked; } + } private string _Prefix = ""; // RHM20150506 Multiline ItemID TextBox public string Prefix { @@ -590,7 +594,7 @@ namespace VEPROMS // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50), - cbxBlankPgsForDuplex.Checked, _AllProcedures||Automatic,Prefix,SaveLinks); + cbxBlankPgsForDuplex.Checked, _AllProcedures||Automatic,Prefix,SaveLinks,RemoveTrailingHardReturnsAndManualPageBreaks); frmStatus.CloseWhenDone = true; Application.DoEvents(); frmStatus.CancelStop = true; @@ -612,7 +616,7 @@ namespace VEPROMS // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50), - cbxBlankPgsForDuplex.Checked, _AllProcedures || Automatic,Prefix,SaveLinks); + cbxBlankPgsForDuplex.Checked, _AllProcedures || Automatic,Prefix,SaveLinks,RemoveTrailingHardReturnsAndManualPageBreaks); frmStatus.CloseWhenDone = true; Application.DoEvents(); frmStatus.CancelStop = true; @@ -637,7 +641,7 @@ namespace VEPROMS ProfileTimer.Pop(profileDepth1); frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, - new Point(Left, Bottom - 50), cbxBlankPgsForDuplex.Checked, _AllProcedures || Automatic,Prefix,SaveLinks); + new Point(Left, Bottom - 50), cbxBlankPgsForDuplex.Checked, _AllProcedures || Automatic,Prefix,SaveLinks,RemoveTrailingHardReturnsAndManualPageBreaks); frmStatus.CloseWhenDone = true; Application.DoEvents(); frmStatus.CancelStop = true; @@ -719,7 +723,7 @@ namespace VEPROMS ProfileTimer.Pop(profileDepth2); frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50), - cbxBlankPgsForDuplex.Checked, _AllProcedures || Automatic,Prefix,SaveLinks); + cbxBlankPgsForDuplex.Checked, _AllProcedures || Automatic,Prefix,SaveLinks,RemoveTrailingHardReturnsAndManualPageBreaks); frmStatus.MakePlaceKeeper = cbxGeneratePlacekeeper.Checked; frmStatus.MakeContinuousActionSummary = cbxGenerateConActSum.Checked; if (Automatic && cbxGenerateConActSum.Checked) diff --git a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs index 5f8dbf49..75c9febd 100644 --- a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs +++ b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs @@ -1100,7 +1100,7 @@ namespace VEPROMS //ProcedureInfo myproc = pi; //frmPDFStatusForm frm = new frmPDFStatusForm(myproc, ap.RevNumber, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location); //myproc.ChangeBarDate = myDTS; - frmPDFStatusForm frm = new frmPDFStatusForm(pi, ap.RevNumAndDate, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location, pi.MyDocVersion.DocVersionConfig.Print_AddBlankPagesWhenUsingDuplexFoldouts, true,"",false); + frmPDFStatusForm frm = new frmPDFStatusForm(pi, ap.RevNumAndDate, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location, pi.MyDocVersion.DocVersionConfig.Print_AddBlankPagesWhenUsingDuplexFoldouts, true,"",false,false); frm.AllowAllWatermarks = true; frm.CloseWhenDone = !ViewPDF; frm.ShowDialog(); diff --git a/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs b/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs index 0f518938..9dd39e9b 100644 --- a/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs +++ b/PROMS/VEPROMS User Interface/frmPDFStatusForm.cs @@ -75,14 +75,14 @@ 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) + 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) { Prefix = prefix; OpenPDF = openPDF; InitializeComponent(); // 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); + MyPromsPrinter = new PromsPrinter(myItem, rev, (VlnSettings.ReleaseMode.Equals("DEMO")) ? "Sample" : watermark, debugOutput, origPgBrk, pdfPath + @"\\Compare", false, overWrite, cbd, pdfFile, insertBlankPages, allOrAuto,Prefix,saveLinks,removeTrailingHardReturnsAndManualPageBreaks); 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 a34955a0..2596abc2 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1847,6 +1847,7 @@ namespace VEPROMS if (mi.EndDate == string.Empty) { string txt = string.Format("{0} - {1}", ui.UserID, mi.MyGroup.GroupName); + txt+=" " + VEPROMS.CSLA.Library.Database.VEPROMS_SqlConnection.ConnectionString; ToolStripItem tsi = cms.Items.Add(txt, null, new EventHandler(User_Click)); tsi.Tag = ui; break; @@ -2197,6 +2198,7 @@ namespace VEPROMS } tn = (VETreeNode)tn.Parent; } + caption.Insert(0,VEPROMS.CSLA.Library.Database.DBServer + sep); this.Text = caption.ToString(); } void tv_OpenItem(object sender, vlnTreeItemInfoEventArgs args) diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs index 8f692ccb..b9c80052 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs @@ -32,6 +32,27 @@ namespace VEPROMS.CSLA.Library #region Log4Net private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); #endregion + public static string DBServer + { get + { + try + { + string server = ""; + string db = ""; + Match m = Regex.Match(Database.VEPROMS_SqlConnection.ConnectionString, "Data Source=([^;]+)(;[^;]+)*;*Initial Catalog=([^;]+)(;[^;]+)*"); + if (m.Success && m.Groups.Count > 4) + { + server = m.Groups[1].Value; + db = m.Groups[3].Value; + } + return string.Format("{0} - {1}", server, db); + } + catch (Exception) + { + return Database.VEPROMS_SqlConnection.ConnectionString; + } + } + } private static int _DefaultTimeout = 600; // 600 seconds, i.e. 10 minutes public static int DefaultTimeout diff --git a/PROMS/VEPROMS/PrintMSWord/frmPrintMsWord.cs b/PROMS/VEPROMS/PrintMSWord/frmPrintMsWord.cs index 2712b908..f3b0270d 100644 --- a/PROMS/VEPROMS/PrintMSWord/frmPrintMsWord.cs +++ b/PROMS/VEPROMS/PrintMSWord/frmPrintMsWord.cs @@ -87,7 +87,7 @@ namespace PrintMSWord changeBarData.ChangeBarMessage == "None" ? PrintChangeBarText.None : changeBarData.ChangeBarMessage == "RevNum" ? PrintChangeBarText.RevNum : PrintChangeBarText.UserDef; PromsPrinter pp = new PromsPrinter(myProcedure, tbRev.Text, cbWatermark.Text, cbDebugOutput.Checked, false, @"C:\TEMP\32Bit\Compare", openPdf, true, cbd, - myProcedure.DisplayNumber.Replace('/','_').Replace('\\','_'),false,false,"",false); + myProcedure.DisplayNumber.Replace('/','_').Replace('\\','_'),false,false,"",false,false); pp.StatusChanged += new PromsPrinterStatusEvent(pp_StatusChanged); _ElapsedTime = new Dictionary(); DateTime tStart = DateTime.Now;