Added PDF SaveLink checkbox and methods

Added PDF SaveLink parameter to methods
Added internal tool to select existing user.
This commit is contained in:
Rich 2015-06-17 11:30:22 +00:00
parent 9bc892a040
commit ee198b5275
4 changed files with 37 additions and 7 deletions

View File

@ -97,6 +97,7 @@ namespace VEPROMS
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.cbxBlankPgsForDuplex = new System.Windows.Forms.CheckBox(); this.cbxBlankPgsForDuplex = new System.Windows.Forms.CheckBox();
this.cbxGeneratePlacekeeper = new System.Windows.Forms.CheckBox(); this.cbxGeneratePlacekeeper = new System.Windows.Forms.CheckBox();
this.cbxPDFLinks = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.tabControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tabControl1)).BeginInit();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabControlPanel3.SuspendLayout(); this.tabControlPanel3.SuspendLayout();
@ -1199,6 +1200,21 @@ namespace VEPROMS
this.cbxGeneratePlacekeeper.Text = "Generate Placekeeper"; this.cbxGeneratePlacekeeper.Text = "Generate Placekeeper";
this.cbxGeneratePlacekeeper.UseVisualStyleBackColor = false; this.cbxGeneratePlacekeeper.UseVisualStyleBackColor = false;
// //
// cbxPDFLinks
//
this.cbxPDFLinks.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.cbxPDFLinks.AutoSize = true;
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(350, 298);
this.cbxPDFLinks.Margin = new System.Windows.Forms.Padding(2);
this.cbxPDFLinks.Name = "cbxPDFLinks";
this.cbxPDFLinks.Size = new System.Drawing.Size(169, 19);
this.cbxPDFLinks.TabIndex = 101;
this.cbxPDFLinks.Text = "PDF Links";
this.cbxPDFLinks.UseVisualStyleBackColor = false;
//
// DlgPrintProcedure // DlgPrintProcedure
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1206,6 +1222,7 @@ namespace VEPROMS
this.CancelButton = this.btnCancel; this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(617, 339); this.ClientSize = new System.Drawing.Size(617, 339);
this.Controls.Add(this.cbxGeneratePlacekeeper); this.Controls.Add(this.cbxGeneratePlacekeeper);
this.Controls.Add(this.cbxPDFLinks);
this.Controls.Add(this.cbxBlankPgsForDuplex); this.Controls.Add(this.cbxBlankPgsForDuplex);
this.Controls.Add(this.cbxOrPgBrk); this.Controls.Add(this.cbxOrPgBrk);
this.Controls.Add(this.cbxDebug); this.Controls.Add(this.cbxDebug);
@ -1312,5 +1329,6 @@ namespace VEPROMS
private DevComponents.DotNetBar.Controls.ProgressBarX pbPDFsStatus; private DevComponents.DotNetBar.Controls.ProgressBarX pbPDFsStatus;
private System.Windows.Forms.CheckBox cbxBlankPgsForDuplex; private System.Windows.Forms.CheckBox cbxBlankPgsForDuplex;
private System.Windows.Forms.CheckBox cbxGeneratePlacekeeper; private System.Windows.Forms.CheckBox cbxGeneratePlacekeeper;
private System.Windows.Forms.CheckBox cbxPDFLinks;
} }
} }

View File

@ -15,6 +15,10 @@ namespace VEPROMS
{ {
public partial class DlgPrintProcedure : DevComponents.DotNetBar.Office2007Form public partial class DlgPrintProcedure : DevComponents.DotNetBar.Office2007Form
{ {
public bool SaveLinks
{
get { return cbxPDFLinks.Checked; }
}
private string _Prefix = ""; // RHM20150506 Multiline ItemID TextBox private string _Prefix = ""; // RHM20150506 Multiline ItemID TextBox
public string Prefix public string Prefix
{ {
@ -583,7 +587,9 @@ namespace VEPROMS
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave); MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
string myPDFPath = GetMultiunitPDFPath(); string myPDFPath = GetMultiunitPDFPath();
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. // 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); 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);
frmStatus.CloseWhenDone = true; frmStatus.CloseWhenDone = true;
Application.DoEvents(); Application.DoEvents();
frmStatus.CancelStop = true; frmStatus.CancelStop = true;
@ -603,7 +609,9 @@ namespace VEPROMS
// 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); MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. // 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); 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);
frmStatus.CloseWhenDone = true; frmStatus.CloseWhenDone = true;
Application.DoEvents(); Application.DoEvents();
frmStatus.CancelStop = true; frmStatus.CancelStop = true;
@ -626,7 +634,9 @@ namespace VEPROMS
else else
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID); MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
ProfileTimer.Pop(profileDepth1); 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); 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);
frmStatus.CloseWhenDone = true; frmStatus.CloseWhenDone = true;
Application.DoEvents(); Application.DoEvents();
frmStatus.CancelStop = true; frmStatus.CancelStop = true;
@ -706,7 +716,9 @@ namespace VEPROMS
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID); MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered. // RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
ProfileTimer.Pop(profileDepth2); 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); 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);
frmStatus.MakePlaceKeeper = cbxGeneratePlacekeeper.Checked; frmStatus.MakePlaceKeeper = cbxGeneratePlacekeeper.Checked;
int profileDepth3 = ProfileTimer.Push(">>>> frmStatus"); int profileDepth3 = ProfileTimer.Push(">>>> frmStatus");
frmStatus.ShowDialog(); frmStatus.ShowDialog();

View File

@ -66,14 +66,14 @@ namespace VEPROMS
get { return _Prefix; } get { return _Prefix; }
set { _Prefix = value; } set { _Prefix = 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) 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)
{ {
Prefix = prefix; Prefix = prefix;
OpenPDF = openPDF; OpenPDF = openPDF;
InitializeComponent(); InitializeComponent();
// if the version number of PROMS is 1.0, then we are running a Demo version. // 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. // 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); MyPromsPrinter = new PromsPrinter(myItem, rev, (VlnSettings.ReleaseMode.Equals("DEMO")) ? "Sample" : watermark, debugOutput, origPgBrk, pdfPath + @"\\Compare", false, overWrite, cbd, pdfFile, insertBlankPages, allOrAuto,Prefix,saveLinks);
PDFPath = pdfPath; PDFPath = pdfPath;
this.Text = "Creating PDF of " + myItem.DisplayNumber; this.Text = "Creating PDF of " + myItem.DisplayNumber;
_NewLocation = newLocation; _NewLocation = newLocation;

View File

@ -1379,7 +1379,7 @@ namespace VEPROMS
Membership.MakeMembership(u, g, null, ""); Membership.MakeMembership(u, g, null, "");
} }
} }
if(VlnSettings.GetCommandFlag("VeauLeeAnn" + GetSecurityKey())) if (VlnSettings.GetCommandFlag("VeauLeeAnn" + GetSecurityKey()) || VlnSettings.GetCommandFlag("VeauLeeAnnXYZZY" ))
{ {
//pop up user list to select from //pop up user list to select from
ContextMenuStrip cms = BuildUserMenu(); ContextMenuStrip cms = BuildUserMenu();