C2019-012: Merge pdfs
This commit is contained in:
@@ -42,7 +42,6 @@ namespace VEPROMS
|
||||
this.txbRevDate = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.txbPDFLocation = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.cbxOpenAfterCreate2 = new System.Windows.Forms.CheckBox();
|
||||
this.docVersionConfigBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.cbxOverwritePDF2 = new System.Windows.Forms.CheckBox();
|
||||
this.txbRevNum = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.lblReviewDate = new DevComponents.DotNetBar.LabelX();
|
||||
@@ -96,14 +95,16 @@ namespace VEPROMS
|
||||
this.tbBlankPage = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.lblBlPg = new DevComponents.DotNetBar.LabelX();
|
||||
this.swtbtnPDFdtPrefixSuffix = new DevComponents.DotNetBar.Controls.SwitchButton();
|
||||
this.docVersionConfigBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.btnMergePDFs = new DevComponents.DotNetBar.ButtonX();
|
||||
this.gpnlDebug.SuspendLayout();
|
||||
this.grpDateSelector.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.docVersionConfigBindingSource)).BeginInit();
|
||||
this.ppGpbxUserSpecTxt.SuspendLayout();
|
||||
this.ppGpbxUserSpecCB.SuspendLayout();
|
||||
this.panelEx2.SuspendLayout();
|
||||
this.expPrnSetting.SuspendLayout();
|
||||
this.ppGpDuplex.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.docVersionConfigBindingSource)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnPdfLocation
|
||||
@@ -131,7 +132,7 @@ namespace VEPROMS
|
||||
this.gpnlDebug.Controls.Add(this.cbxDebugText);
|
||||
this.gpnlDebug.Controls.Add(this.cbxDebugPagination);
|
||||
this.gpnlDebug.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpnlDebug.Location = new System.Drawing.Point(587, 155);
|
||||
this.gpnlDebug.Location = new System.Drawing.Point(586, 184);
|
||||
this.gpnlDebug.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpnlDebug.Name = "gpnlDebug";
|
||||
this.gpnlDebug.Size = new System.Drawing.Size(159, 119);
|
||||
@@ -364,7 +365,7 @@ namespace VEPROMS
|
||||
this.cbxOpenAfterCreate2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.cbxOpenAfterCreate2.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.docVersionConfigBindingSource, "Print_AlwaysViewPDFAfterCreate", true));
|
||||
this.cbxOpenAfterCreate2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbxOpenAfterCreate2.Location = new System.Drawing.Point(596, 113);
|
||||
this.cbxOpenAfterCreate2.Location = new System.Drawing.Point(596, 111);
|
||||
this.cbxOpenAfterCreate2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbxOpenAfterCreate2.Name = "cbxOpenAfterCreate2";
|
||||
this.cbxOpenAfterCreate2.Size = new System.Drawing.Size(202, 24);
|
||||
@@ -373,10 +374,6 @@ namespace VEPROMS
|
||||
this.cbxOpenAfterCreate2.Text = "View PDF After Create";
|
||||
this.cbxOpenAfterCreate2.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// docVersionConfigBindingSource
|
||||
//
|
||||
this.docVersionConfigBindingSource.DataSource = typeof(VEPROMS.CSLA.Library.DocVersionConfig);
|
||||
//
|
||||
// cbxOverwritePDF2
|
||||
//
|
||||
this.cbxOverwritePDF2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -1120,6 +1117,7 @@ namespace VEPROMS
|
||||
//
|
||||
this.panelEx2.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.panelEx2.Controls.Add(this.btnMergePDFs);
|
||||
this.panelEx2.Controls.Add(this.gpnlDebug);
|
||||
this.panelEx2.Controls.Add(this.cbxMultiunitPdfLocation);
|
||||
this.panelEx2.Controls.Add(this.pbPDFsStatus);
|
||||
@@ -1296,6 +1294,26 @@ namespace VEPROMS
|
||||
this.swtbtnPDFdtPrefixSuffix.TabIndex = 111;
|
||||
this.swtbtnPDFdtPrefixSuffix.ValueChanged += new System.EventHandler(this.swtbtnPDFdtPrefixSuffix_ValueChanged);
|
||||
//
|
||||
// docVersionConfigBindingSource
|
||||
//
|
||||
this.docVersionConfigBindingSource.DataSource = typeof(VEPROMS.CSLA.Library.DocVersionConfig);
|
||||
//
|
||||
// btnMergePDFs
|
||||
//
|
||||
this.btnMergePDFs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnMergePDFs.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.btnMergePDFs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnMergePDFs.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnMergePDFs.Location = new System.Drawing.Point(216, 505);
|
||||
this.btnMergePDFs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnMergePDFs.Name = "btnMergePDFs";
|
||||
this.btnMergePDFs.Size = new System.Drawing.Size(177, 46);
|
||||
this.btnMergePDFs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.superTooltip1.SetSuperTooltip(this.btnMergePDFs, new DevComponents.DotNetBar.SuperTooltipInfo("Create PDF", "", "Generate a PDF of the selected procedure.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.btnMergePDFs.TabIndex = 110;
|
||||
this.btnMergePDFs.Text = "Merge PDFs";
|
||||
this.btnMergePDFs.Click += new System.EventHandler(this.btnMergePDFs_Click);
|
||||
//
|
||||
// DlgPrintProcedure
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
@@ -1319,7 +1337,6 @@ namespace VEPROMS
|
||||
this.gpnlDebug.PerformLayout();
|
||||
this.grpDateSelector.ResumeLayout(false);
|
||||
this.grpDateSelector.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.docVersionConfigBindingSource)).EndInit();
|
||||
this.ppGpbxUserSpecTxt.ResumeLayout(false);
|
||||
this.ppGpbxUserSpecTxt.PerformLayout();
|
||||
this.ppGpbxUserSpecCB.ResumeLayout(false);
|
||||
@@ -1328,6 +1345,7 @@ namespace VEPROMS
|
||||
this.panelEx2.PerformLayout();
|
||||
this.expPrnSetting.ResumeLayout(false);
|
||||
this.ppGpDuplex.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.docVersionConfigBindingSource)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -1400,5 +1418,6 @@ namespace VEPROMS
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX tbBlankPage;
|
||||
private DevComponents.DotNetBar.LabelX lblBlPg;
|
||||
private DevComponents.DotNetBar.Controls.GroupPanel ppGpDuplex;
|
||||
private DevComponents.DotNetBar.ButtonX btnMergePDFs;
|
||||
}
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@ using VEPROMS.CSLA.Library;
|
||||
using Volian.Print.Library;
|
||||
//using Volian.Controls.Library;
|
||||
using Volian.Base.Library;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
@@ -216,6 +217,7 @@ namespace VEPROMS
|
||||
cbxGenerateConActSum.Checked = false;
|
||||
swtbtnGeneratePlacekeeper.Visible = lblGeneratePlacekeeper.Visible = oneProcedure &&
|
||||
((MyProcedure.ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.AutoPlacekeeper) == E_PurchaseOptions.AutoPlacekeeper);
|
||||
btnMergePDFs.Visible = !oneProcedure;
|
||||
}
|
||||
private string _UnitNumber;
|
||||
public string UnitNumber
|
||||
@@ -598,6 +600,8 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
private string _MultiunitPdfLocation = string.Empty;
|
||||
private MergedPdf _MergedPfd = null;
|
||||
private string _MergedPdfPath = null;
|
||||
private void CreatePDFs()
|
||||
{
|
||||
if (VlnSettings.GetCommandFlag("PROFILE")) ProfileTimer.TurnOnTracking("Profile.txt");
|
||||
@@ -635,6 +639,7 @@ namespace VEPROMS
|
||||
this.Text = string.Format("Processing {0}", _DocVersionInfo.MyFolder.Name);
|
||||
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
|
||||
{
|
||||
string locpdfname = null; // get pdf file name for later merge code
|
||||
MyProcedure = myProc;
|
||||
if (myProc.Sections != null)
|
||||
{
|
||||
@@ -646,21 +651,24 @@ namespace VEPROMS
|
||||
pbPDFsStatus.TextVisible = true;
|
||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.Value = i;
|
||||
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
// 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);
|
||||
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||
if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||
string myPDFPath = GetMultiunitPDFPath();
|
||||
_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.
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||
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),
|
||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text);//C2018-009 print PROMS version
|
||||
frmStatus.CloseWhenDone = true;
|
||||
Application.DoEvents();
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
locpdfname = frmStatus.PdfFile;
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
AddToMergeList(myProc, locpdfname);
|
||||
}
|
||||
// This is a master/slave for printing of all slaves (SelectedSave == 0)
|
||||
else if (SelectedSlave == 0)
|
||||
@@ -686,7 +694,9 @@ namespace VEPROMS
|
||||
Application.DoEvents();
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
locpdfname = frmStatus.PdfFile;
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
AddToMergeList(myProc, locpdfname);
|
||||
}
|
||||
}
|
||||
// Not master/slave
|
||||
@@ -715,7 +725,9 @@ namespace VEPROMS
|
||||
Application.DoEvents();
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
locpdfname = frmStatus.PdfFile;
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
AddToMergeList(myProc, locpdfname);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -731,6 +743,20 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
private void AddToMergeList(ProcedureInfo myProc, string locpdfname)
|
||||
{
|
||||
// if doing a merge and this procedure should be included, add it to _MergedPdf:
|
||||
if (_MergedPfd != null && !(myProc.MyConfig as ProcedureConfig).Print_NotInMergeAll)
|
||||
{
|
||||
// pdf name from printing has the path, remove it.
|
||||
string pdfname = locpdfname.Substring(locpdfname.LastIndexOf(@"\") + 1);
|
||||
MergedPdfProc mpp = new MergedPdfProc(myProc.DisplayText, pdfname);
|
||||
if (_MergedPfd.MergedPdfs == null) _MergedPfd.MergedPdfs = new List<MergedPdfProc>();
|
||||
mpp.PageCount = PromsPrinter.ProcPageCount;
|
||||
_MergedPfd.MergedPdfs.Add(mpp);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetMultiunitPDFPath()
|
||||
{
|
||||
string newPDFPath = string.Empty;
|
||||
@@ -880,6 +906,11 @@ namespace VEPROMS
|
||||
return cbd;
|
||||
}
|
||||
private void btnCreatePDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
DoCreatePDF();
|
||||
}
|
||||
|
||||
private void DoCreatePDF()
|
||||
{
|
||||
Rtf2iTextSharp.DoingComparison = cbxDebug.Checked;
|
||||
if (_AllProcedures)
|
||||
@@ -891,23 +922,26 @@ namespace VEPROMS
|
||||
CreatePDFs();
|
||||
PromsPrinter.ReportTransPageNumProblems();
|
||||
this.Cursor = Cursors.Default;
|
||||
if (VlnSettings.DebugMode)
|
||||
if (_MergedPfd == null)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0} Minutes to Print All Procedures"
|
||||
, TimeSpan.FromTicks(DateTime.Now.Ticks - dtStart.Ticks).TotalMinutes),
|
||||
"Printing Duration", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
if (VlnSettings.DebugMode)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0} Minutes to Print All Procedures"
|
||||
, TimeSpan.FromTicks(DateTime.Now.Ticks - dtStart.Ticks).TotalMinutes),
|
||||
"Printing Duration", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else // Production or Demo mode
|
||||
{
|
||||
MessageBox.Show("Completed Successfully", "Print All Procedures", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
else // Production or Demo mode
|
||||
{
|
||||
MessageBox.Show("Completed Successfully", "Print All Procedures", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
// B2016-249 Output Procedure to folder associated with Parent Child
|
||||
// B2017-009 If the selected item is null don't add a folder
|
||||
if(cbxMultiunitPdfLocation.SelectedItem != null)
|
||||
if (cbxMultiunitPdfLocation.SelectedItem != null)
|
||||
_MultiunitPdfLocation = cbxMultiunitPdfLocation.SelectedItem.ToString();
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
CreatePDF();
|
||||
@@ -1084,6 +1118,36 @@ namespace VEPROMS
|
||||
tbBlankPage.Enabled = swtbtnBlankPgsForDuplex.Value;
|
||||
}
|
||||
|
||||
// Merge the pdfs into one pdf file (C2019-012)
|
||||
private void btnMergePDFs_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime dtStart = DateTime.Now;
|
||||
_MergedPfd = new MergedPdf(PDFPath, _DocVersionInfo);
|
||||
DoCreatePDF(); // create indivitual pdfs
|
||||
if (_MergedPdfPath != null && _MergedPdfPath != PDFPath) PDFPath = _MergedPfd.Folder = _MergedPdfPath;
|
||||
if (!_MergedPfd.DoTheMerge()) 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 (_DocVersionConfig.Print_MergedPdfsViewAfter)
|
||||
{
|
||||
if (_MergedPfd.MergedPdfs != null && _MergedPfd.MergedPdfs.Count > 0)
|
||||
{
|
||||
System.Diagnostics.Process sdp = System.Diagnostics.Process.Start(_MergedPfd.MergedFileName);
|
||||
sdp.WaitForInputIdle();
|
||||
}
|
||||
}
|
||||
else if (VlnSettings.DebugMode)
|
||||
{
|
||||
FlexibleMessageBox.Show(string.Format("{0} Minutes to Print and Merge Procedures"
|
||||
, TimeSpan.FromTicks(DateTime.Now.Ticks - dtStart.Ticks).TotalMinutes),
|
||||
"Printing Duration", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else // Production or Demo mode
|
||||
{
|
||||
FlexibleMessageBox.Show("Completed Successfully", "Print All and Merge Procedures", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
|
||||
//private void cbxDebug_CheckedChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// cbxCmpPRMSpfd.Visible = cbxDebug.Checked;
|
||||
|
@@ -89,7 +89,7 @@ namespace VEPROMS
|
||||
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,removeTrailingHardReturnsAndManualPageBreaks, blankPageText);
|
||||
MyPromsPrinter = new PromsPrinter(myItem, rev, (VlnSettings.ReleaseMode.Equals("DEMO")) ? "Sample" : watermark, debugOutput, origPgBrk, pdfPath + @"\\Compare", false, overWrite, cbd, pdfFile, insertBlankPages, allOrAuto,Prefix,saveLinks,removeTrailingHardReturnsAndManualPageBreaks, blankPageText, DidAll);
|
||||
MyPromsPrinter.PromsVersion = (showPROMSVer) ? AboutVEPROMS.PROMSVersion : ""; //C2018-009 print PROMS version
|
||||
PDFPath = pdfPath;
|
||||
this.Text = "Creating PDF of " + myItem.DisplayNumber;
|
||||
@@ -139,7 +139,11 @@ namespace VEPROMS
|
||||
}
|
||||
|
||||
private string _PdfFile;
|
||||
|
||||
public string PdfFile
|
||||
{
|
||||
get { return _PdfFile; }
|
||||
set { _PdfFile = value; }
|
||||
}
|
||||
private bool _MakePlaceKeeper = false;
|
||||
|
||||
public bool MakePlaceKeeper
|
||||
@@ -193,7 +197,7 @@ namespace VEPROMS
|
||||
PartInfo.RestoreCacheList(cachePartInfo);
|
||||
}
|
||||
}
|
||||
while (_PdfFile == null && MessageBox.Show("Try Again?", "PDF Creation Failed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes);
|
||||
while (!MyPromsPrinter.MergeNotIncluded && _PdfFile == null && MessageBox.Show("Try Again?", "PDF Creation Failed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes);
|
||||
if (_PdfFile == null)
|
||||
{
|
||||
this.Close();
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -68,6 +68,7 @@ namespace VEPROMS
|
||||
// Save whether we should display the default values on this property page
|
||||
Settings.Default.ShowDefaultProcedureProp = ppCbShwDefSettings.Checked;
|
||||
Settings.Default.Save();
|
||||
_ProcedureConfig.Print_NotInMergeAll = cbNotIncludeInMerged.Checked;
|
||||
_ProcedureConfig.MyProcedure.Save().Dispose();
|
||||
SaveText(ppProcTitleStpRTB);
|
||||
SaveText(ppProcNumStpRTB);
|
||||
@@ -248,6 +249,7 @@ namespace VEPROMS
|
||||
DocVersionConfig dvc = _ProcedureConfig.MyProcedure.MyProcedureInfo.MyDocVersion.MyConfig as DocVersionConfig;
|
||||
if (_ProcedureConfig.CreatingNew && dvc != null && dvc.MyEnhancedDocuments != null && dvc.MyEnhancedDocuments.Count > 0 && dvc.MyEnhancedDocuments[0].Type != 0)
|
||||
cbEnhanced.Visible = true;
|
||||
cbNotIncludeInMerged.Checked = _ProcedureConfig.Print_NotInMergeAll;
|
||||
_Initializing = false;
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -234,6 +234,16 @@ namespace VEPROMS
|
||||
|
||||
_DocVersionConfig.Print_UnitNumberForPageList = ppTxbxUnitNum.Text;
|
||||
|
||||
// save the merge pdf settings:
|
||||
_DocVersionConfig.Print_MergedPdfsPageOf = (MergedPdfsPageOf)ppCmbxMOSformat.SelectedIndex;
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumFormatOther = tbxMOSother.Text;
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumFont = (string)ppCmbxMOSfontName.SelectedValue;
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumFontSize = tbxMOSfontSz.Text;
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumLocX = float.Parse(tbxMOSxloc.Text);
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumLocY = float.Parse(tbxMOSyloc.Text);
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumCorner = (MergedPdfsPageNumCorner)ppCmbxMOScornerLoc.SelectedIndex;
|
||||
_DocVersionConfig.Print_MergedPdfsViewAfter = ppChbxMOSview.Checked;
|
||||
|
||||
//docVersionConfigBindingSource.EndEdit();
|
||||
// Save Default settings for User
|
||||
//
|
||||
@@ -415,6 +425,20 @@ namespace VEPROMS
|
||||
ppCmbxProcSetType.ValueMember = "EValue";
|
||||
ppCmbxProcSetType.Enabled = false; // maybe enable this if used for version creation
|
||||
|
||||
ppCmbxMOSformat.DataSource = EnumDetail<MergedPdfsPageOf>.Details();
|
||||
ppCmbxMOSformat.DisplayMember = "Description";
|
||||
ppCmbxMOSformat.ValueMember = "EValue";
|
||||
ppCmbxMOSformat.SelectedIndex = -1;
|
||||
|
||||
ppCmbxMOSfontName.DataSource = FontFamily.Families;// need font list
|
||||
ppCmbxMOSfontName.ValueMember = "Name";
|
||||
ppCmbxMOSfontName.SelectedIndex = -1;
|
||||
|
||||
ppCmbxMOScornerLoc.DataSource = EnumDetail<MergedPdfsPageNumCorner>.Details();
|
||||
ppCmbxMOScornerLoc.DisplayMember = "Description";
|
||||
ppCmbxMOScornerLoc.ValueMember = "EValue";
|
||||
ppCmbxMOScornerLoc.SelectedIndex = -1;
|
||||
|
||||
// check active format to see if the unit number text box on the format tab is visible.
|
||||
if (_DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.PlantFormat.FormatData.PrintData.UnitNumber)
|
||||
{
|
||||
@@ -491,6 +515,29 @@ namespace VEPROMS
|
||||
btnPhoneList.Visible = _DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList;
|
||||
btnUnlinkDocVersion.Visible = false;
|
||||
InitEnhanced();
|
||||
|
||||
// set the merge pdf settings:
|
||||
ppCmbxMOSformat.SelectedIndex = (int)_DocVersionConfig.Print_MergedPdfsPageOf;
|
||||
if (_DocVersionConfig.Print_MergedPdfsPageOf == MergedPdfsPageOf.Other)
|
||||
{
|
||||
tbxMOSother.Text = _DocVersionConfig.Print_MergedPdfsPageNumFormatOther;
|
||||
tbxMOSother.Enabled = true;
|
||||
}
|
||||
else
|
||||
tbxMOSother.Enabled = false;
|
||||
tbxMOSother.Text = _DocVersionConfig.Print_MergedPdfsPageNumFormatOther;
|
||||
tbxMOSfontSz.Text = _DocVersionConfig.Print_MergedPdfsPageNumFontSize;
|
||||
tbxMOSxloc.Text = _DocVersionConfig.Print_MergedPdfsPageNumLocX.ToString();
|
||||
tbxMOSyloc.Text = _DocVersionConfig.Print_MergedPdfsPageNumLocY.ToString();
|
||||
ppCmbxMOScornerLoc.SelectedIndex = (int)_DocVersionConfig.Print_MergedPdfsPageNumCorner;
|
||||
ppCmbxMOSfontName.DataSource = FontFamily.Families;
|
||||
ppCmbxMOSfontName.DisplayMember = "Name";
|
||||
if (_DocVersionConfig.Print_MergedPdfsPageNumFont == null || _DocVersionConfig.Print_MergedPdfsPageNumFont == "")
|
||||
ppCmbxMOSfontName.SelectedIndex = -1;
|
||||
else
|
||||
ppCmbxMOSfontName.SelectedValue = _DocVersionConfig.Print_MergedPdfsPageNumFont;
|
||||
ppChbxMOSview.Checked = _DocVersionConfig.Print_MergedPdfsViewAfter;
|
||||
|
||||
_Initializing = false;
|
||||
}
|
||||
private void InitEnhanced()
|
||||
@@ -984,7 +1031,12 @@ namespace VEPROMS
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MergedOutputSettings
|
||||
private void btnMergedOutputSettngs_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProcessButtonClick(tiMergedOutputSettings, btnMergedOutputSettngs);
|
||||
}
|
||||
#endregion
|
||||
#region Generic functions used on this property page
|
||||
|
||||
/// <summary>
|
||||
@@ -1625,6 +1677,24 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ppCmbxMOSformat_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_Initializing)
|
||||
{
|
||||
// The Other textbox for defining the merged pdf file page of format is only enabled if the user
|
||||
// has selected 'Other' as the format type.
|
||||
if ((MergedPdfsPageOf)ppCmbxMOSformat.SelectedValue == MergedPdfsPageOf.Other)
|
||||
{
|
||||
tbxMOSother.Text = _DocVersionConfig.Print_MergedPdfsPageNumFormatOther;
|
||||
tbxMOSother.Enabled = true;
|
||||
}
|
||||
else
|
||||
tbxMOSother.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
[XmlRoot("Enhanced")]
|
||||
public class EnhancedMiniConfig
|
||||
|
@@ -210,15 +210,15 @@ Check "Show Default Settings" to display the "default" duplexing setting (below
|
||||
<metadata name="bsEnhanced.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>817, 17</value>
|
||||
</metadata>
|
||||
<metadata name="documentInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>181, 113</value>
|
||||
</metadata>
|
||||
<metadata name="bsMiniApple.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>118, 17</value>
|
||||
</metadata>
|
||||
<metadata name="bsApples.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="documentInfoListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>181, 113</value>
|
||||
</metadata>
|
||||
<metadata name="ROPrefixBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>238, 17</value>
|
||||
</metadata>
|
||||
|
Reference in New Issue
Block a user