Show Progress bar when Printing all procedures
Added Cancel button for printing all procedures Added Timer for automatic processes
This commit is contained in:
parent
ffcffcc5ba
commit
41c9f223b0
@ -88,6 +88,7 @@ namespace VEPROMS
|
||||
this.cbxOrPgBrk = new System.Windows.Forms.CheckBox();
|
||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||
this.cbxCmpPRMSpfd = new System.Windows.Forms.CheckBox();
|
||||
this.pbPDFsStatus = new DevComponents.DotNetBar.Controls.ProgressBarX();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tabControl1)).BeginInit();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabControlPanel3.SuspendLayout();
|
||||
@ -104,8 +105,8 @@ namespace VEPROMS
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tabControl1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(125)))), ((int)(((byte)(125)))), ((int)(((byte)(125)))));
|
||||
this.tabControl1.CanReorderTabs = true;
|
||||
this.tabControl1.Controls.Add(this.tabControlPanel3);
|
||||
@ -128,6 +129,7 @@ namespace VEPROMS
|
||||
// tabControlPanel3
|
||||
//
|
||||
this.tabControlPanel3.AutoScroll = true;
|
||||
this.tabControlPanel3.Controls.Add(this.pbPDFsStatus);
|
||||
this.tabControlPanel3.Controls.Add(this.gpnlDebug);
|
||||
this.tabControlPanel3.Controls.Add(this.grpDateSelector);
|
||||
this.tabControlPanel3.Controls.Add(this.txbReviewDate);
|
||||
@ -153,7 +155,7 @@ namespace VEPROMS
|
||||
this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.tabControlPanel3.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
|
||||
this.tabControlPanel3.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
|
||||
| DevComponents.DotNetBar.eBorderSide.Bottom)));
|
||||
| DevComponents.DotNetBar.eBorderSide.Bottom)));
|
||||
this.tabControlPanel3.Style.GradientAngle = 90;
|
||||
this.tabControlPanel3.TabIndex = 3;
|
||||
this.tabControlPanel3.TabItem = this.tbGeneral;
|
||||
@ -342,7 +344,7 @@ namespace VEPROMS
|
||||
// txbPDFLocation
|
||||
//
|
||||
this.txbPDFLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -457,7 +459,7 @@ namespace VEPROMS
|
||||
// txbPDFName
|
||||
//
|
||||
this.txbPDFName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -531,7 +533,7 @@ namespace VEPROMS
|
||||
this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.tabControlPanel1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
|
||||
this.tabControlPanel1.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
|
||||
| DevComponents.DotNetBar.eBorderSide.Bottom)));
|
||||
| DevComponents.DotNetBar.eBorderSide.Bottom)));
|
||||
this.tabControlPanel1.Style.GradientAngle = 90;
|
||||
this.tabControlPanel1.TabIndex = 5;
|
||||
this.tabControlPanel1.TabItem = this.tbSettings;
|
||||
@ -555,7 +557,7 @@ namespace VEPROMS
|
||||
// txbPdfLocationS
|
||||
//
|
||||
this.txbPdfLocationS.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -574,7 +576,6 @@ namespace VEPROMS
|
||||
this.btnPdfLocation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnPdfLocation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnPdfLocation.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnPdfLocation.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnPdfLocation.Image = ((System.Drawing.Image)(resources.GetObject("btnPdfLocation.Image")));
|
||||
this.btnPdfLocation.Location = new System.Drawing.Point(519, 3);
|
||||
this.btnPdfLocation.Name = "btnPdfLocation";
|
||||
@ -604,7 +605,6 @@ namespace VEPROMS
|
||||
this.btnWaterMarkOff.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnWaterMarkOff.Checked = true;
|
||||
this.btnWaterMarkOff.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnWaterMarkOff.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnWaterMarkOff.Location = new System.Drawing.Point(164, 84);
|
||||
this.btnWaterMarkOff.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnWaterMarkOff.Name = "btnWaterMarkOff";
|
||||
@ -619,7 +619,6 @@ namespace VEPROMS
|
||||
this.btnChgBarOff.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnChgBarOff.Checked = true;
|
||||
this.btnChgBarOff.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnChgBarOff.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnChgBarOff.Location = new System.Drawing.Point(164, 58);
|
||||
this.btnChgBarOff.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnChgBarOff.Name = "btnChgBarOff";
|
||||
@ -634,7 +633,6 @@ namespace VEPROMS
|
||||
this.btnDuplxOff.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnDuplxOff.Checked = true;
|
||||
this.btnDuplxOff.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnDuplxOff.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnDuplxOff.Location = new System.Drawing.Point(164, 111);
|
||||
this.btnDuplxOff.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnDuplxOff.Name = "btnDuplxOff";
|
||||
@ -664,7 +662,6 @@ namespace VEPROMS
|
||||
//
|
||||
this.btnDuplxOn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnDuplxOn.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnDuplxOn.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnDuplxOn.Location = new System.Drawing.Point(123, 111);
|
||||
this.btnDuplxOn.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnDuplxOn.Name = "btnDuplxOn";
|
||||
@ -678,7 +675,6 @@ namespace VEPROMS
|
||||
//
|
||||
this.btnWaterMarkOn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnWaterMarkOn.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnWaterMarkOn.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnWaterMarkOn.Location = new System.Drawing.Point(123, 84);
|
||||
this.btnWaterMarkOn.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnWaterMarkOn.Name = "btnWaterMarkOn";
|
||||
@ -724,7 +720,6 @@ namespace VEPROMS
|
||||
//
|
||||
this.btnChgBarOn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnChgBarOn.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnChgBarOn.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnChgBarOn.Location = new System.Drawing.Point(123, 58);
|
||||
this.btnChgBarOn.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnChgBarOn.Name = "btnChgBarOn";
|
||||
@ -756,7 +751,7 @@ namespace VEPROMS
|
||||
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.tabControlPanel2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
|
||||
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
|
||||
| DevComponents.DotNetBar.eBorderSide.Bottom)));
|
||||
| DevComponents.DotNetBar.eBorderSide.Bottom)));
|
||||
this.tabControlPanel2.Style.GradientAngle = 90;
|
||||
this.tabControlPanel2.TabIndex = 2;
|
||||
this.tabControlPanel2.TabItem = this.tbChangeBars;
|
||||
@ -1026,7 +1021,6 @@ namespace VEPROMS
|
||||
this.btnCreatePDF.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnCreatePDF.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.btnCreatePDF.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnCreatePDF.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnCreatePDF.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnCreatePDF.Location = new System.Drawing.Point(5, 281);
|
||||
this.btnCreatePDF.Margin = new System.Windows.Forms.Padding(2);
|
||||
@ -1044,7 +1038,6 @@ namespace VEPROMS
|
||||
this.btnCancel.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.FocusOnLeftMouseButtonDown = true;
|
||||
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnCancel.Location = new System.Drawing.Point(450, 281);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
|
||||
@ -1110,6 +1103,19 @@ namespace VEPROMS
|
||||
this.cbxCmpPRMSpfd.UseVisualStyleBackColor = false;
|
||||
this.cbxCmpPRMSpfd.Visible = false;
|
||||
//
|
||||
// pbPDFsStatus
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.pbPDFsStatus.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.pbPDFsStatus.Location = new System.Drawing.Point(7, 220);
|
||||
this.pbPDFsStatus.Name = "pbPDFsStatus";
|
||||
this.pbPDFsStatus.Size = new System.Drawing.Size(539, 23);
|
||||
this.pbPDFsStatus.TabIndex = 87;
|
||||
this.pbPDFsStatus.Text = "Procedures Converted to PDF";
|
||||
this.pbPDFsStatus.Visible = false;
|
||||
//
|
||||
// DlgPrintProcedure
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -1214,5 +1220,6 @@ namespace VEPROMS
|
||||
private System.Windows.Forms.CheckBox cbxOrPgBrk;
|
||||
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
||||
private System.Windows.Forms.CheckBox cbxCmpPRMSpfd;
|
||||
private DevComponents.DotNetBar.Controls.ProgressBarX pbPDFsStatus;
|
||||
}
|
||||
}
|
@ -218,7 +218,7 @@ namespace VEPROMS
|
||||
private Timer _MyTimer;
|
||||
private void SetupForProcedure()
|
||||
{
|
||||
this.Text = "Create PDF for " + ProcNum;
|
||||
if(_DocVersionInfo == null)this.Text = "Create PDF for " + ProcNum;
|
||||
// get list of previous pdf files
|
||||
// if no previous pdf file, then get path from frmVersionProperties
|
||||
// dlgSelectFile.InitialDirectory = pdf path from frmVersionProperties
|
||||
@ -392,19 +392,26 @@ namespace VEPROMS
|
||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||
int n = _DocVersionInfo.Procedures.Count;
|
||||
int i = 0;
|
||||
pbPDFsStatus.Maximum = n;
|
||||
pbPDFsStatus.Visible = true;
|
||||
this.Text = string.Format("Processing {0}", _DocVersionInfo.MyFolder.Name);
|
||||
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
|
||||
{
|
||||
MyProcedure = myProc;
|
||||
if (myProc.Sections != null)
|
||||
{
|
||||
SetupForProcedure();
|
||||
this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.TextVisible = true;
|
||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.Value = i;
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom));
|
||||
frmStatus.CloseWhenDone = true;
|
||||
Application.DoEvents();
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
}
|
||||
}
|
||||
pbPDFsStatus.Visible = false;
|
||||
if(!Automatic)
|
||||
ShowDebugFiles();
|
||||
}
|
||||
|
@ -120,9 +120,6 @@
|
||||
<metadata name="docVersionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>321, 17</value>
|
||||
</metadata>
|
||||
<metadata name="docVersionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>321, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnPdfLocation.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
@ -35,6 +35,7 @@ namespace VEPROMS
|
||||
this.tmrRun = new System.Windows.Forms.Timer(this.components);
|
||||
this.btnOpenFolder = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnOpenPDF = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnCancel = new DevComponents.DotNetBar.ButtonX();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblStatus
|
||||
@ -42,11 +43,11 @@ namespace VEPROMS
|
||||
//
|
||||
//
|
||||
//
|
||||
this.lblStatus.BackgroundStyle.Class = "";
|
||||
this.lblStatus.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.lblStatus.Location = new System.Drawing.Point(12, 21);
|
||||
this.lblStatus.Location = new System.Drawing.Point(9, 17);
|
||||
this.lblStatus.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.lblStatus.Name = "lblStatus";
|
||||
this.lblStatus.Size = new System.Drawing.Size(304, 23);
|
||||
this.lblStatus.Size = new System.Drawing.Size(228, 19);
|
||||
this.lblStatus.TabIndex = 0;
|
||||
this.lblStatus.Text = "Ready";
|
||||
//
|
||||
@ -55,11 +56,11 @@ namespace VEPROMS
|
||||
//
|
||||
//
|
||||
//
|
||||
this.pb.BackgroundStyle.Class = "";
|
||||
this.pb.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.pb.Location = new System.Drawing.Point(12, 65);
|
||||
this.pb.Location = new System.Drawing.Point(9, 53);
|
||||
this.pb.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pb.Name = "pb";
|
||||
this.pb.Size = new System.Drawing.Size(721, 23);
|
||||
this.pb.Size = new System.Drawing.Size(541, 19);
|
||||
this.pb.TabIndex = 1;
|
||||
this.pb.TextVisible = true;
|
||||
//
|
||||
@ -71,9 +72,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.btnOpenFolder.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnOpenFolder.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnOpenFolder.Location = new System.Drawing.Point(658, 28);
|
||||
this.btnOpenFolder.Location = new System.Drawing.Point(494, 23);
|
||||
this.btnOpenFolder.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnOpenFolder.Name = "btnOpenFolder";
|
||||
this.btnOpenFolder.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOpenFolder.Size = new System.Drawing.Size(56, 19);
|
||||
this.btnOpenFolder.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnOpenFolder.TabIndex = 2;
|
||||
this.btnOpenFolder.Text = "Open Folder";
|
||||
@ -84,25 +86,42 @@ namespace VEPROMS
|
||||
//
|
||||
this.btnOpenPDF.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnOpenPDF.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnOpenPDF.Location = new System.Drawing.Point(568, 28);
|
||||
this.btnOpenPDF.Location = new System.Drawing.Point(426, 23);
|
||||
this.btnOpenPDF.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnOpenPDF.Name = "btnOpenPDF";
|
||||
this.btnOpenPDF.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOpenPDF.Size = new System.Drawing.Size(56, 19);
|
||||
this.btnOpenPDF.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnOpenPDF.TabIndex = 3;
|
||||
this.btnOpenPDF.Text = "Open PDF";
|
||||
this.btnOpenPDF.Visible = false;
|
||||
this.btnOpenPDF.Click += new System.EventHandler(this.btnOpenPDF_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnCancel.Location = new System.Drawing.Point(475, 21);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(77, 19);
|
||||
this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnCancel.TabIndex = 4;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.Visible = false;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// frmPDFStatusForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(745, 104);
|
||||
this.ClientSize = new System.Drawing.Size(559, 84);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOpenPDF);
|
||||
this.Controls.Add(this.btnOpenFolder);
|
||||
this.Controls.Add(this.pb);
|
||||
this.Controls.Add(this.lblStatus);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Name = "frmPDFStatusForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "frmPDFStatusForm";
|
||||
@ -119,5 +138,6 @@ namespace VEPROMS
|
||||
private System.Windows.Forms.Timer tmrRun;
|
||||
private DevComponents.DotNetBar.ButtonX btnOpenFolder;
|
||||
private DevComponents.DotNetBar.ButtonX btnOpenPDF;
|
||||
private DevComponents.DotNetBar.ButtonX btnCancel;
|
||||
}
|
||||
}
|
@ -13,12 +13,30 @@ namespace VEPROMS
|
||||
{
|
||||
public partial class frmPDFStatusForm : Form
|
||||
{
|
||||
private bool _CancelPrinting = false;
|
||||
public bool CancelPrinting
|
||||
{
|
||||
get { return _CancelPrinting; }
|
||||
set { _CancelPrinting = value; }
|
||||
}
|
||||
private bool _CloseWhenDone = false;
|
||||
public bool CloseWhenDone
|
||||
{
|
||||
get { return _CloseWhenDone; }
|
||||
set { _CloseWhenDone = value; }
|
||||
}
|
||||
private bool _CancelStop = false;
|
||||
public bool CancelStop
|
||||
{
|
||||
get { return _CancelStop; }
|
||||
set { _CancelStop = value; }
|
||||
}
|
||||
private bool _Stop = false;
|
||||
public bool Stop
|
||||
{
|
||||
get { return _Stop; }
|
||||
set { _Stop = value; }
|
||||
}
|
||||
private string _PDFPath;
|
||||
|
||||
public string PDFPath
|
||||
@ -52,6 +70,7 @@ namespace VEPROMS
|
||||
PDFPath = pdfPath;
|
||||
this.Text = "Creating PDF of " + myItem.DisplayNumber;
|
||||
_NewLocation = newLocation;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
public bool AllowAllWatermarks
|
||||
{
|
||||
@ -71,6 +90,7 @@ namespace VEPROMS
|
||||
pb.Text = string.Format("Processing {0} ({1} of {2})", args.MyStatus, args.Progress + 1, pb.Maximum);
|
||||
}
|
||||
MyStatus = args.MyStatus;
|
||||
Application.DoEvents();
|
||||
}
|
||||
public string MyStatus
|
||||
{
|
||||
@ -89,6 +109,8 @@ namespace VEPROMS
|
||||
private void tmrRun_Tick(object sender, EventArgs e)
|
||||
{
|
||||
tmrRun.Enabled = false;
|
||||
if (CancelStop) btnCancel.Visible = true;
|
||||
Application.DoEvents();
|
||||
MyPromsPrinter.StatusChanged += new PromsPrinterStatusEvent(pp_StatusChanged);
|
||||
DateTime tStart = DateTime.Now;
|
||||
_PdfFile = MyPromsPrinter.Print(PDFPath);
|
||||
@ -113,18 +135,21 @@ namespace VEPROMS
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnOpenPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start(_PdfFile);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnOpenFolder_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("Explorer", "/select," + _PdfFile);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
CancelPrinting = true;
|
||||
btnCancel.Text = "Cancelled";
|
||||
btnCancel.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -99,6 +99,7 @@ namespace VEPROMS
|
||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.tmrTreeView = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrAutomatic = new System.Windows.Forms.Timer(this.components);
|
||||
this.toolsPanel = new DevComponents.DotNetBar.ExpandablePanel();
|
||||
this.toolsTabs = new DevComponents.DotNetBar.TabControl();
|
||||
this.annotationSearch = new DevComponents.DotNetBar.TabControlPanel();
|
||||
@ -1055,6 +1056,11 @@ namespace VEPROMS
|
||||
this.tmrTreeView.Interval = 10;
|
||||
this.tmrTreeView.Tick += new System.EventHandler(this.tmrTreeView_Tick);
|
||||
//
|
||||
// tmrAutomatic
|
||||
//
|
||||
this.tmrAutomatic.Interval = 100;
|
||||
this.tmrAutomatic.Tick += new System.EventHandler(this.tmrAutomatic_Tick);
|
||||
//
|
||||
// toolsPanel
|
||||
//
|
||||
this.toolsPanel.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
@ -1465,6 +1471,7 @@ namespace VEPROMS
|
||||
private DevComponents.DotNetBar.ButtonX btnAnnoDetailsPushPin;
|
||||
private DevComponents.DotNetBar.ButtonItem buttonItem1;
|
||||
private System.Windows.Forms.Timer tmrTreeView;
|
||||
private System.Windows.Forms.Timer tmrAutomatic;
|
||||
private Volian.Controls.Library.AnnotationDetails ctrlAnnotationDetails;
|
||||
private DevComponents.DotNetBar.ButtonItem btnHelp;
|
||||
private DevComponents.DotNetBar.ButtonItem btnHelpManual;
|
||||
|
@ -532,7 +532,7 @@ namespace VEPROMS
|
||||
tmrShutDown.Enabled = true;
|
||||
}
|
||||
else
|
||||
RunAutomatic();
|
||||
tmrAutomatic.Enabled = true;
|
||||
// Shutoff UpdateFormats for Production Mode
|
||||
if (Volian.Base.Library.VlnSettings.ProductionMode)
|
||||
btnAdmin.Visible = false;
|
||||
@ -600,7 +600,12 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ranAuto) this.Close();
|
||||
if (ranAuto)
|
||||
{
|
||||
Volian.Base.Library.DebugPagination.Close();
|
||||
Volian.Base.Library.DebugText.Close();
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
private bool _RunNext = false;
|
||||
//void prnDlg_FormClosed(object sender, FormClosedEventArgs e)
|
||||
@ -835,6 +840,11 @@ namespace VEPROMS
|
||||
tv.Enabled = true;
|
||||
if (giveTvFocus) tv.Focus();
|
||||
}
|
||||
private void tmrAutomatic_Tick(object sender, EventArgs e)
|
||||
{
|
||||
tmrAutomatic.Enabled = false; // Timer has now fired
|
||||
RunAutomatic();
|
||||
}
|
||||
private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e)
|
||||
{
|
||||
VETreeNode tn = ((VETreeNode)e.Node);
|
||||
|
Loading…
x
Reference in New Issue
Block a user