This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
</logger>
|
||||
</log4net>
|
||||
<appSettings>
|
||||
<add key ="Debug" value ="true"/>
|
||||
<add key ="Debug" value ="false"/>
|
||||
<add key="CslaAuthentication" value="Windows" />
|
||||
<!--
|
||||
<add key="CslaDataPortalProxy"
|
||||
|
@@ -32,7 +32,6 @@ namespace VEPROMS
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DlgPrintProcedure));
|
||||
this.tabControl1 = new DevComponents.DotNetBar.TabControl();
|
||||
this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel();
|
||||
this.lblStatus = new DevComponents.DotNetBar.LabelX();
|
||||
this.txbPDFLocation = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.btnSelect = new DevComponents.DotNetBar.ButtonX();
|
||||
this.cbxOpenAfterCreate2 = new System.Windows.Forms.CheckBox();
|
||||
@@ -117,7 +116,6 @@ namespace VEPROMS
|
||||
// tabControlPanel3
|
||||
//
|
||||
this.tabControlPanel3.AutoScroll = true;
|
||||
this.tabControlPanel3.Controls.Add(this.lblStatus);
|
||||
this.tabControlPanel3.Controls.Add(this.txbPDFLocation);
|
||||
this.tabControlPanel3.Controls.Add(this.btnSelect);
|
||||
this.tabControlPanel3.Controls.Add(this.cbxOpenAfterCreate2);
|
||||
@@ -147,19 +145,6 @@ namespace VEPROMS
|
||||
this.tabControlPanel3.TabIndex = 3;
|
||||
this.tabControlPanel3.TabItem = this.tbGeneral;
|
||||
//
|
||||
// lblStatus
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.lblStatus.BackgroundStyle.Class = "";
|
||||
this.lblStatus.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.lblStatus.Location = new System.Drawing.Point(31, 210);
|
||||
this.lblStatus.Name = "lblStatus";
|
||||
this.lblStatus.Size = new System.Drawing.Size(601, 23);
|
||||
this.lblStatus.TabIndex = 97;
|
||||
this.lblStatus.Text = "labelX1";
|
||||
//
|
||||
// txbPDFLocation
|
||||
//
|
||||
this.txbPDFLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
@@ -991,7 +976,6 @@ namespace VEPROMS
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.BindingSource docVersionConfigBindingSource;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX txbPDFLocation;
|
||||
private DevComponents.DotNetBar.LabelX lblStatus;
|
||||
private System.Windows.Forms.CheckBox cbxDebug;
|
||||
}
|
||||
}
|
@@ -8,6 +8,8 @@ using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using Volian.Print.Library;
|
||||
//using Volian.Controls.Library;
|
||||
using Volian.Base.Library;
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
@@ -59,6 +61,10 @@ namespace VEPROMS
|
||||
_MyProcedure = pi;
|
||||
|
||||
GetDocVersionSettings();
|
||||
|
||||
// set to a default PDF location if non was specified in the DocVersions property
|
||||
if (txbPDFLocation.Text == null || txbPDFLocation.Text.Length == 0 || !Directory.Exists(txbPDFLocation.Text))
|
||||
txbPDFLocation.Text = VlnSettings.TemporaryFolder;
|
||||
}
|
||||
|
||||
private void GetDocVersionSettings()
|
||||
@@ -87,7 +93,8 @@ namespace VEPROMS
|
||||
btnDuplxOff.PerformClick();
|
||||
else
|
||||
btnDuplxOn.PerformClick();
|
||||
|
||||
// default to print Debug info if App.config is set to debug mode
|
||||
cbxDebug.Checked = VlnSettings.DebugMode;
|
||||
}
|
||||
|
||||
|
||||
@@ -310,7 +317,7 @@ namespace VEPROMS
|
||||
//this.Cursor = Cursors.WaitCursor;
|
||||
//ProcedureConfig.PrintWatermark pw = MyProcedure.ProcedureConfig.Print_Watermark;
|
||||
PrintWatermark pw = (PrintWatermark)cbxWaterMark.SelectedValue;
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate.ToShortDateString(), pw.ToString(), cbxDebug.Checked, @"C:\TEMP\16Bit", cbxOpenAfterCreate2.Checked, PDFPath);
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate.ToShortDateString(), pw.ToString(), cbxDebug.Checked, VlnSettings.OldPDFFolder, cbxOpenAfterCreate2.Checked, PDFPath);
|
||||
frmStatus.Show();
|
||||
this.Close();
|
||||
|
||||
@@ -338,6 +345,7 @@ namespace VEPROMS
|
||||
CreatePDF();
|
||||
}
|
||||
|
||||
|
||||
//private void txbRevNum_TextChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// RevNum = txbRevNum.Text;
|
||||
|
@@ -33,6 +33,8 @@ namespace VEPROMS
|
||||
this.lblStatus = new DevComponents.DotNetBar.LabelX();
|
||||
this.pb = new DevComponents.DotNetBar.Controls.ProgressBarX();
|
||||
this.tmrRun = new System.Windows.Forms.Timer(this.components);
|
||||
this.btnOpenFolder = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnOpenPDF = new DevComponents.DotNetBar.ButtonX();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblStatus
|
||||
@@ -65,11 +67,39 @@ namespace VEPROMS
|
||||
//
|
||||
this.tmrRun.Tick += new System.EventHandler(this.tmrRun_Tick);
|
||||
//
|
||||
// btnOpenFolder
|
||||
//
|
||||
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.Name = "btnOpenFolder";
|
||||
this.btnOpenFolder.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOpenFolder.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnOpenFolder.TabIndex = 2;
|
||||
this.btnOpenFolder.Text = "Open Folder";
|
||||
this.btnOpenFolder.Visible = false;
|
||||
this.btnOpenFolder.Click += new System.EventHandler(this.btnOpenFolder_Click);
|
||||
//
|
||||
// btnOpenPDF
|
||||
//
|
||||
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.Name = "btnOpenPDF";
|
||||
this.btnOpenPDF.Size = new System.Drawing.Size(75, 23);
|
||||
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);
|
||||
//
|
||||
// frmPDFStatusForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(745, 104);
|
||||
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")));
|
||||
@@ -87,5 +117,7 @@ namespace VEPROMS
|
||||
private DevComponents.DotNetBar.LabelX lblStatus;
|
||||
private DevComponents.DotNetBar.Controls.ProgressBarX pb;
|
||||
private System.Windows.Forms.Timer tmrRun;
|
||||
private DevComponents.DotNetBar.ButtonX btnOpenFolder;
|
||||
private DevComponents.DotNetBar.ButtonX btnOpenPDF;
|
||||
}
|
||||
}
|
@@ -27,10 +27,18 @@ namespace VEPROMS
|
||||
set { _MyPromsPrinter = value; }
|
||||
}
|
||||
|
||||
private bool _OpenPDF;
|
||||
|
||||
public bool OpenPDF
|
||||
{
|
||||
get { return _OpenPDF; }
|
||||
set { _OpenPDF = value; }
|
||||
}
|
||||
public frmPDFStatusForm(ItemInfo myItem, string rev, string revDate, string watermark, bool debugOutput, string backgroundFolder, bool openPDF, string pdfPath)
|
||||
{
|
||||
OpenPDF = openPDF;
|
||||
InitializeComponent();
|
||||
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, openPDF);
|
||||
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, false);//openPDF);
|
||||
PDFPath = pdfPath;
|
||||
this.Text = "Creating PDF of " + myItem.DisplayNumber;
|
||||
|
||||
@@ -60,16 +68,36 @@ namespace VEPROMS
|
||||
tmrRun.Enabled = true;
|
||||
}
|
||||
|
||||
private string _PdfFile;
|
||||
|
||||
private void tmrRun_Tick(object sender, EventArgs e)
|
||||
{
|
||||
tmrRun.Enabled = false;
|
||||
MyPromsPrinter.StatusChanged += new PromsPrinterStatusEvent(pp_StatusChanged);
|
||||
DateTime tStart = DateTime.Now;
|
||||
string pdfFile = MyPromsPrinter.Print(PDFPath);
|
||||
_PdfFile = MyPromsPrinter.Print(PDFPath);
|
||||
DateTime tEnd = DateTime.Now;
|
||||
MyStatus = pdfFile + " created.";
|
||||
MyStatus = string.Format("{0} created in {1:0.} milliseconds", pdfFile, (TimeSpan.FromTicks(tEnd.Ticks - tStart.Ticks).TotalMilliseconds));
|
||||
MyStatus = _PdfFile + " created.";
|
||||
MyStatus = string.Format("{0} created in {1:0.} milliseconds", _PdfFile, (TimeSpan.FromTicks(tEnd.Ticks - tStart.Ticks).TotalMilliseconds));
|
||||
if (OpenPDF)
|
||||
{
|
||||
System.Diagnostics.Process.Start(_PdfFile);
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
btnOpenFolder.Visible = btnOpenPDF.Visible = true;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ using DevComponents.DotNetBar.Rendering;
|
||||
using VEPROMS.Properties;
|
||||
using Volian.Controls.Library;
|
||||
using DescriptiveEnum;
|
||||
using Volian.Base.Library;
|
||||
|
||||
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
|
||||
|
||||
@@ -88,7 +89,7 @@ namespace VEPROMS
|
||||
#endregion
|
||||
public frmVEPROMS()
|
||||
{
|
||||
if (vlnStackTrace.DebugMode)
|
||||
if (VlnSettings.DebugMode)
|
||||
{
|
||||
//use local data (for development/debug mode)
|
||||
if (Environment.MachineName == "RMARK-PC")
|
||||
@@ -113,7 +114,7 @@ namespace VEPROMS
|
||||
|
||||
// When creating an XY Plot, a System.Drawing.Graphics is needed and it requires a form. Use the main
|
||||
// form.
|
||||
if (vlnStackTrace.DebugMode)
|
||||
if (VlnSettings.DebugMode)
|
||||
MSWordToPDF.OverrideColor = Color.Red;
|
||||
MSWordToPDF.FormForPlotGraphics = this;
|
||||
|
||||
@@ -184,7 +185,7 @@ namespace VEPROMS
|
||||
private void frmVEPROMS_Load(object sender, EventArgs e)
|
||||
{
|
||||
string debugMode = ConfigurationManager.AppSettings["Debug"];
|
||||
vlnStackTrace.DebugMode = bool.Parse(debugMode); // set debug for the Volian.Controls.Library
|
||||
VlnSettings.DebugMode = bool.Parse(debugMode); // set debug for the Volian.Controls.Library
|
||||
// get the saved location and size of the VE-PROMS appication for this user
|
||||
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
|
||||
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
|
||||
@@ -204,7 +205,7 @@ namespace VEPROMS
|
||||
}
|
||||
private void SetupButtons()
|
||||
{
|
||||
if (!vlnStackTrace.DebugMode)
|
||||
if (!VlnSettings.DebugMode)
|
||||
{
|
||||
lblItemID.Visible = false;
|
||||
btnItemInfo.Visible = false;
|
||||
@@ -559,7 +560,7 @@ namespace VEPROMS
|
||||
/// <param name="args"></param>
|
||||
void tn_LoadingChildernDone(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
if (vlnStackTrace.DebugMode)
|
||||
if (VlnSettings.DebugMode)
|
||||
ProgBarText = args.Info + " Seconds";
|
||||
else
|
||||
ProgBarText = "";
|
||||
|
Reference in New Issue
Block a user