diff --git a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs index 36fafc99..fc946623 100644 --- a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs +++ b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs @@ -37,6 +37,18 @@ namespace VEPROMS get { return txbRevNum.Text; } set { txbRevNum.Text = value; } } + public string RevNumAndDate + { + get + { + if (txbRevDate.Text == "") + return RevNum; + if (MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash) + return RevNum + "\\" + RevDate; + else + return RevNum + "/" + RevDate; + } + } public string ProcNum { get { return MyProcedure.DisplayNumber; } @@ -285,12 +297,14 @@ namespace VEPROMS ppTxbxChangeBarUserMsgTwo.Text = _DocVersionConfig.Print_UserCBMess2; ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef; bool hasReviewDate = _MyProcedure.ActiveFormat.PlantFormat.HasPageListToken("{REVIEWDATE}"); + bool usesRevDate = _MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate; if (_MyProcedure.Sections != null) { foreach (SectionInfo mysection in _MyProcedure.Sections) hasReviewDate |= mysection.ActiveFormat.PlantFormat.HasPageListToken("{REVIEWDATE}"); } lblReviewDate.Visible = txbReviewDate.Visible = !_AllProcedures && hasReviewDate; + lblRevDate.Visible = txbRevDate.Visible = !_AllProcedures && usesRevDate; } private void btnCancel_Click(object sender, EventArgs e) @@ -449,7 +463,7 @@ namespace VEPROMS MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave); GetMultiunitPDFPath(); // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. - frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum,pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom-50)); + 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)); frmStatus.CloseWhenDone = true; Application.DoEvents(); frmStatus.CancelStop = true; @@ -468,7 +482,7 @@ namespace VEPROMS // this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n); MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave); // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. - frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom-50)); + 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)); frmStatus.CloseWhenDone = true; Application.DoEvents(); frmStatus.CancelStop = true; @@ -484,7 +498,7 @@ namespace VEPROMS pbPDFsStatus.Value = i; // this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n); // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. - frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom-50)); + 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)); frmStatus.CloseWhenDone = true; Application.DoEvents(); frmStatus.CancelStop = true; @@ -542,7 +556,7 @@ namespace VEPROMS if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0) MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave); // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. - frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50)); + 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)); frmStatus.ShowDialog(); this.Close(); ShowDebugFiles(); diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 8e2e14c0..082e9f2c 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -1250,7 +1250,7 @@ namespace Volian.Print.Library if ((MySection.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate && Rev.Contains("/")) || (MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash && Rev.Contains("\\"))) { - int indx = Rev.IndexOf(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate?'/':'\\'); + int indx = Rev.IndexOf(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash ? '\\' : '/'); if (match.Value == "{REV}") return Rev.Substring(0,indx); return Rev.Substring(indx+1); }