This commit is contained in:
parent
a369a4a3dd
commit
3045458050
File diff suppressed because it is too large
Load Diff
@ -16,55 +16,65 @@ namespace VEPROMS
|
||||
public partial class DlgPrintProcedure : DevComponents.DotNetBar.Office2007Form
|
||||
{
|
||||
private DocVersionConfig _DocVersionConfig;
|
||||
//private string _RevNum;
|
||||
|
||||
public string RevNum
|
||||
{
|
||||
get { return txbRevNum.Text; }
|
||||
set { txbRevNum.Text = value; }
|
||||
}
|
||||
//private string ProcNum;
|
||||
|
||||
public string ProcNum
|
||||
{
|
||||
get { return MyProcedure.DisplayNumber; }
|
||||
}
|
||||
//private string _PDFPath;
|
||||
|
||||
public string PDFPath
|
||||
{
|
||||
get { return txbPDFLocation.Text; }
|
||||
set { txbPDFLocation.Text = value; }
|
||||
}
|
||||
|
||||
//private DateTime _RevDate = DateTime.Today;
|
||||
|
||||
public DateTime RevDate
|
||||
public string RevDate
|
||||
{
|
||||
get { return dtRevDate.Value; }
|
||||
set { dtRevDate.Value = value; }
|
||||
get { return txbRevDate.Text; }
|
||||
set { txbRevDate.Text = value; }
|
||||
}
|
||||
|
||||
//private DateTime _ReviewDate = DateTime.Today;
|
||||
|
||||
public DateTime ReviewDate
|
||||
public string ReviewDate
|
||||
{
|
||||
get { return dtReviewDate.Value; }
|
||||
set { dtReviewDate.Value = value; }
|
||||
get { return txbReviewDate.Text; }
|
||||
set { txbReviewDate.Text = value; }
|
||||
}
|
||||
public string PDFPathSetting
|
||||
{
|
||||
get { return txbPdfLocationS.Text; }
|
||||
set { txbPdfLocationS.Text = value; }
|
||||
}
|
||||
|
||||
|
||||
public DlgPrintProcedure(ProcedureInfo pi)
|
||||
{
|
||||
InitializeComponent();
|
||||
_DocVersionConfig = (pi.ActiveParent as DocVersionInfo).DocVersionConfig; //docVersionConfig;
|
||||
_DocVersionConfig = (pi.ActiveParent as DocVersionInfo).DocVersionConfig;
|
||||
_MyProcedure = pi;
|
||||
|
||||
GetDocVersionSettings();
|
||||
|
||||
// set to a default PDF location if non was specified in the DocVersions property
|
||||
// set to a default PDF location if none was specified in the DocVersions property
|
||||
if (txbPDFLocation.Text == null || txbPDFLocation.Text.Length == 0 || !Directory.Exists(txbPDFLocation.Text))
|
||||
txbPDFLocation.Text = VlnSettings.TemporaryFolder;
|
||||
|
||||
// if the default setting is 'SelectBeforePrinting', put up a message box to determine whether the user
|
||||
// wants change bars. If not, 'Change Bar' on the Setting tab is 'OFF' and no Change bar tab.
|
||||
// If yes, the Change bar tab is the selected tab.
|
||||
if (_DocVersionConfig.Print_ChangeBar == PrintChangeBar.SelectBeforePrinting)
|
||||
{
|
||||
DialogResult dr = MessageBox.Show("Do you want change bars?", "Change Bars", MessageBoxButtons.YesNo);
|
||||
if (dr == DialogResult.Yes)
|
||||
{
|
||||
btnChgBarOn.PerformClick();
|
||||
tabControl1.SelectedTab = tbChangeBars;
|
||||
rbFormatDefault.PerformClick();
|
||||
rbFormatDefault.Checked = true; // default to 'Format Default'
|
||||
}
|
||||
else
|
||||
{
|
||||
btnChgBarOff.PerformClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void GetDocVersionSettings()
|
||||
@ -73,7 +83,6 @@ namespace VEPROMS
|
||||
_DocVersionConfig.ParentLookup = false;
|
||||
// PDF Location
|
||||
PDFPath = _DocVersionConfig.Print_PDFLocation;
|
||||
//txbPDFLocation.Text = PDFPath;
|
||||
// Overwrite PDF
|
||||
cbxOverwritePDF2.Checked = _DocVersionConfig.Print_AlwaysOverwritePDF;
|
||||
// Open PDF After Create
|
||||
@ -101,50 +110,45 @@ namespace VEPROMS
|
||||
private void DlgPrintProcedure_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = "Create PDF for " + ProcNum;
|
||||
//dtRevDate.Value = _RevDate;
|
||||
//dtReviewDate.Value = _ReviewDate;
|
||||
//tbxRevNum.Text = _RevNum;
|
||||
// get list of previous pdf files
|
||||
// if no previous pdf file, then get path from frmVersionProperties
|
||||
// dlgSelectFile.InitialDirectory = pdf path from frmVersionProperties
|
||||
//cbxPDF.Text = string.Format(@"{0}\{1}.pdf", _PDFPath, _ProcNum);
|
||||
// General 2 settings
|
||||
//txbPDFLocation.Text = _PDFPath;
|
||||
tbxPDFName.Text = string.Format("{0}.pdf", ProcNum);
|
||||
//txbRevNum.Text = _RevNum;
|
||||
//dtRevDate.Value = _RevDate;
|
||||
//dtReviewDate.Value = _ReviewDate;
|
||||
// Advanced tab
|
||||
//cbxPDFloc.Text = _PDFPath;
|
||||
RevNum = "0"; // need to get from procedure config?
|
||||
RevDate = DateTime.Today; // need to get from procedure config?
|
||||
ReviewDate = DateTime.Today; // need to get from procedure config?
|
||||
|
||||
txbPDFName.Text = string.Format("{0}.pdf", ProcNum);
|
||||
ProcedureConfig pc = _MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc != null)
|
||||
{
|
||||
RevNum = pc.Print_Rev;
|
||||
RevDate = pc.Print_RevDate; //== null || pc.Print_RevDate=="" ? DateTime.Today : Convert.ToDateTime(pc.Print_RevDate);
|
||||
ReviewDate = pc.Print_ReviewDate; // == null ? DateTime.Today : Convert.ToDateTime(pc.Print_ReviewDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
RevNum = "0";
|
||||
RevDate = DateTime.Today.ToShortDateString();
|
||||
ReviewDate = null;
|
||||
}
|
||||
cbxWaterMark.DataSource = EnumDetail<PrintWatermark>.Details();
|
||||
cbxWaterMark.DisplayMember = "Description";
|
||||
cbxWaterMark.ValueMember = "EValue";
|
||||
PrintWatermark pw = MyProcedure.ProcedureConfig.Print_Watermark;
|
||||
cbxWaterMark.Text = pw.ToString();
|
||||
|
||||
ppCmbxChangeBarType.DataSource = EnumDetail<PrintChangeBar>.Details();
|
||||
ppCmbxChangeBarType.DisplayMember = "Description";
|
||||
ppCmbxChangeBarType.ValueMember = "EValue";
|
||||
ppCmbxChangeBarType.Text = MyProcedure.MyDocVersion.DocVersionConfig.Print_ChangeBar.ToString();
|
||||
|
||||
ppCmbxChgBarPos.DataSource = EnumDetail<PrintChangeBarLoc>.Details();
|
||||
ppCmbxChgBarPos.DisplayMember = "Description";
|
||||
ppCmbxChgBarPos.ValueMember = "EValue";
|
||||
ppCmbxChgBarPos.Text = MyProcedure.MyDocVersion.DocVersionConfig.Print_ChangeBarLoc.ToString();
|
||||
ppCmbxChgBarPos.SelectedIndex = (int)MyProcedure.MyDocVersion.DocVersionConfig.Print_ChangeBarLoc;
|
||||
|
||||
ppCmbxChgBarTxtType.DataSource = EnumDetail<PrintChangeBarText>.Details();
|
||||
ppCmbxChgBarTxtType.DisplayMember = "Description";
|
||||
ppCmbxChgBarTxtType.ValueMember = "EValue";
|
||||
ppCmbxChgBarTxtType.Text = MyProcedure.MyDocVersion.DocVersionConfig.Print_ChangeBarText.ToString();
|
||||
ppCmbxChgBarTxtType.SelectedIndex = (int)MyProcedure.MyDocVersion.DocVersionConfig.Print_ChangeBarText;
|
||||
|
||||
ppTxbxChangeBarUserMsgOne.Text = MyProcedure.MyDocVersion.DocVersionConfig.Print_UserCBMess1;
|
||||
|
||||
ppTxbxChangeBarUserMsgTwo.Text = MyProcedure.MyDocVersion.DocVersionConfig.Print_UserCBMess2;
|
||||
|
||||
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
@ -152,66 +156,6 @@ namespace VEPROMS
|
||||
this.Close();
|
||||
}
|
||||
|
||||
//private void btnOpenFolder_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// saveFileDialog1.InitialDirectory = _PDFPath;//@"C:\16bit\PromsDat\VEHLP";
|
||||
// saveFileDialog1.FileName = string.Format(@"{0}\{1}.pdf", _PDFPath, _ProcNum);
|
||||
// DialogResult drslt = saveFileDialog1.ShowDialog();
|
||||
// if (drslt == DialogResult.OK)
|
||||
// {
|
||||
// cbxPDF.Text = saveFileDialog1.FileName; // contails full path
|
||||
// UpdateDropDown();
|
||||
// }
|
||||
//}
|
||||
|
||||
//private void btnAutoDuplxOn_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (!btnAutoDuplxOn.Checked)
|
||||
// {
|
||||
// btnAutoDuplxOn.Checked = true;
|
||||
// btnAutoDuplxOff.Checked = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
//private void btnAutoDuplxOff_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (!btnAutoDuplxOff.Checked)
|
||||
// {
|
||||
// btnAutoDuplxOff.Checked = true;
|
||||
// btnAutoDuplxOn.Checked = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
private void buttonX9_Click(object sender, EventArgs e)
|
||||
{
|
||||
DlgBrowseFolder.SelectedPath = PDFPath;
|
||||
DialogResult drslt = DlgBrowseFolder.ShowDialog();
|
||||
if (drslt == DialogResult.OK)
|
||||
{
|
||||
//cbxPDFloc.Text = DlgBrowseFolder.SelectedPath;
|
||||
txbPDFLocation.Text = DlgBrowseFolder.SelectedPath;
|
||||
//lblCurPDFLoc.Text = cbxPDFloc.Text;
|
||||
//UpdateDropDown2();
|
||||
}
|
||||
}
|
||||
//private void UpdateDropDown2()
|
||||
//{
|
||||
// if (!cbxPDFloc.Text.Equals(string.Empty))
|
||||
// {
|
||||
// string tstr = cbxPDFloc.Text;
|
||||
// // if its already exists in the list - remove it
|
||||
// if (cbxPDFloc.Items.Contains(tstr))
|
||||
// cbxPDFloc.Items.Remove(tstr);
|
||||
// // Add the new criteria to the top of the list
|
||||
// cbxPDFloc.Items.Insert(0, tstr);
|
||||
// // set the text to the new criteria
|
||||
// cbxPDFloc.Text = tstr;
|
||||
// // If there are more than 10 remove the last one
|
||||
// if (cbxPDFloc.Items.Count > 10)
|
||||
// cbxPDFloc.Items.RemoveAt(10);
|
||||
// }
|
||||
//}
|
||||
|
||||
private void btnAvChgBarOn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!btnChgBarOn.Checked)
|
||||
@ -219,6 +163,18 @@ namespace VEPROMS
|
||||
btnChgBarOn.Checked = true;
|
||||
btnChgBarOff.Checked = false;
|
||||
tbChangeBars.Visible = true;
|
||||
// to set which radio button (Format default or Custom) is checked, look at config data
|
||||
switch (MyProcedure.MyDocVersion.DocVersionConfig.Print_ChangeBar)
|
||||
{
|
||||
case PrintChangeBar.WithUserSpecified:
|
||||
rbCustom.Checked = true;
|
||||
break;
|
||||
case PrintChangeBar.SelectBeforePrinting:
|
||||
case PrintChangeBar.WithDefault:
|
||||
default:
|
||||
rbFormatDefault.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void btnAvChgBarOff_Click(object sender, EventArgs e)
|
||||
@ -312,64 +268,178 @@ namespace VEPROMS
|
||||
private void CreatePDF()
|
||||
{
|
||||
Volian.Print.Library.Rtf2Pdf.PdfDebug = true;
|
||||
//tbTimings.Text = "";
|
||||
//Cursor saveCursor = this.Cursor;
|
||||
//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, VlnSettings.OldPDFFolder, cbxOpenAfterCreate2.Checked, PDFPath);
|
||||
frmStatus.Show();
|
||||
// Determine change bar settings. First get from config & then see if override from dialog.
|
||||
// Also check that format allows override.
|
||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, VlnSettings.OldPDFFolder, cbxOpenAfterCreate2.Checked, PDFPath, cbd);
|
||||
frmStatus.ShowDialog();
|
||||
this.Close();
|
||||
|
||||
//PromsPrinter pp = new PromsPrinter(MyProcedure, RevNum, RevDate.ToShortDateString(), pw.ToString(), true, @"C:\TEMP\16Bit", cbxOpenAfterCreate2.Checked);
|
||||
////pp.StatusChanged += new PromsPrinterStatusEvent(pp_StatusChanged);
|
||||
//pp.StatusChanged += new PromsPrinterStatusEvent(pp_StatusChanged);
|
||||
////_ElapsedTime = new Dictionary<PromsPrinterStatusType, TimeSpan>();
|
||||
//DateTime tStart = DateTime.Now;
|
||||
//string pdfFile = pp.Print(PDFPath);
|
||||
//DateTime tEnd = DateTime.Now;
|
||||
////_ElapsedTime.Add(PromsPrinterStatusType.Total, DateTime.Now - tStart);
|
||||
//MyStatus = pdfFile + " created.";
|
||||
////this.Cursor = saveCursor;
|
||||
////ShowElapsedTime();
|
||||
//MyStatus = string.Format("{0} created in {1:0.} milliseconds", pdfFile, (TimeSpan.FromTicks(tEnd.Ticks - tStart.Ticks).TotalMilliseconds));
|
||||
}
|
||||
|
||||
//void pp_StatusChanged(object sender, PromsPrintStatusArgs args)
|
||||
//{
|
||||
// MyStatus = args.MyStatus;
|
||||
//}
|
||||
// Determine if any dialog selections for change bars have overridden the data
|
||||
// supplied in the DocVconfig data or format file. Settings are location and text.
|
||||
private ChangeBarDefinition DetermineChangeBarSettings()
|
||||
{
|
||||
ChangeBarDefinition cbd = new ChangeBarDefinition();
|
||||
|
||||
// if the dialog has 'without change bar' selected, then just set without and return
|
||||
if (btnChgBarOff.Checked)
|
||||
{
|
||||
cbd.MyChangeBarType = PrintChangeBar.Without;
|
||||
return cbd;
|
||||
}
|
||||
// Get settings from dialog because these are used to set the initial dialog values and
|
||||
// any changes from user overrides the initial settings.
|
||||
ChangeBarData changeBarData = MyProcedure.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData;
|
||||
if (rbFormatDefault.Checked || _DocVersionConfig == null || _DocVersionConfig.Print_ChangeBar == PrintChangeBar.WithDefault)
|
||||
{
|
||||
cbd.MyChangeBarType = PrintChangeBar.WithDefault;
|
||||
cbd.MyChangeBarText = changeBarData.ChangeBarMessage == "ChgID" ? PrintChangeBarText.ChgID :
|
||||
changeBarData.ChangeBarMessage == "DateAndChgID" ? PrintChangeBarText.DateChgID :
|
||||
changeBarData.ChangeBarMessage == "None" ? PrintChangeBarText.None :
|
||||
changeBarData.ChangeBarMessage == "RevNum" ? PrintChangeBarText.RevNum : PrintChangeBarText.UserDef;
|
||||
}
|
||||
else if (rbCustom.Checked || _DocVersionConfig.Print_ChangeBar == PrintChangeBar.WithUserSpecified)
|
||||
{
|
||||
cbd.MyChangeBarLoc = (PrintChangeBarLoc)ppCmbxChgBarPos.SelectedIndex;
|
||||
cbd.MyChangeBarText = (PrintChangeBarText)ppCmbxChgBarTxtType.SelectedIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
cbd.MyChangeBarLoc = _DocVersionConfig.Print_ChangeBarLoc;
|
||||
cbd.MyChangeBarText = _DocVersionConfig.Print_ChangeBarText;
|
||||
}
|
||||
|
||||
// now figure out the location.
|
||||
if (cbd.MyChangeBarType != PrintChangeBar.Without)
|
||||
{
|
||||
// if the format has the absolutefixedchangecolumn format flag, then always use the fixedchangecolumn from the
|
||||
// format, otherwise, use the default column based on the selected location, stored in the base format.
|
||||
cbd.MyChangeBarColumn = (changeBarData.AbsoluteFixedChangeColumn) ?
|
||||
(int)changeBarData.FixedChangeColumn :
|
||||
System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ".ToCharArray())[System.Convert.ToInt32(cbd.MyChangeBarLoc)]);
|
||||
if (cbd.MyChangeBarText == PrintChangeBarText.UserDef)
|
||||
cbd.MyChangeBarMessage = _DocVersionConfig.Print_UserCBMess1 + @"\n" + _DocVersionConfig.Print_UserCBMess2;
|
||||
|
||||
}
|
||||
return cbd;
|
||||
}
|
||||
private void btnCreatePDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreatePDF();
|
||||
}
|
||||
private bool _Initializing = false;
|
||||
private void tbSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Fill in the settings from the config. This tab is used
|
||||
// to update the settings for PdfLocation, RevNum, RevDate and ReviewDate
|
||||
_Initializing = true;
|
||||
txbPdfLocationS.Text = txbPDFLocation.Text;
|
||||
txbRevNumS.Text = txbRevNum.Text;
|
||||
txbRevDateS.Text = txbRevDate.Text;
|
||||
txbReviewDateS.Text = txbReviewDate.Text;
|
||||
_Initializing = false;
|
||||
}
|
||||
|
||||
private void txbRevNumS_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
// save the RevNum to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_Rev = txbRevNumS.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
txbRevNum.Text = txbRevNumS.Text;
|
||||
}
|
||||
}
|
||||
|
||||
//private void txbRevNum_TextChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// RevNum = txbRevNum.Text;
|
||||
//}
|
||||
private void txbRevDateS_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
// save the RevDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_RevDate = txbRevDateS.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
txbRevDate.Text = txbRevDateS.Text;
|
||||
}
|
||||
}
|
||||
|
||||
//private void dtRevDate_TextChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// RevDate = dtRevDate.Value;
|
||||
//}
|
||||
private void txbReviewDateS_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
// save the ReviewDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_ReviewDate = txbReviewDateS.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
txbReviewDate.Text = txbReviewDateS.Text;
|
||||
// need to reset config to !dirty?
|
||||
}
|
||||
}
|
||||
|
||||
//private void dtReviewDate_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// ReviewDate = dtReviewDate.Value;
|
||||
//}
|
||||
private void btnPdfLocation_Click(object sender, EventArgs e)
|
||||
{
|
||||
DlgBrowseFolder.SelectedPath = PDFPathSetting;
|
||||
DialogResult drslt = DlgBrowseFolder.ShowDialog();
|
||||
if (drslt == DialogResult.OK)
|
||||
{
|
||||
//cbxPDFloc.Text = DlgBrowseFolder.SelectedPath;
|
||||
txbPdfLocationS.Text = DlgBrowseFolder.SelectedPath;
|
||||
txbPDFLocation.Text = txbPdfLocationS.Text;
|
||||
//lblCurPDFLoc.Text = cbxPDFloc.Text;
|
||||
//UpdateDropDown2();
|
||||
}
|
||||
}
|
||||
|
||||
private void rbFormatDefault_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetCustomControls(false);
|
||||
// Make Custom controls invisible
|
||||
ppGpbxUserSpecCB.Visible = false;
|
||||
}
|
||||
|
||||
private void SetCustomControls(bool enabled)
|
||||
{
|
||||
ppCmbxChgBarPos.Enabled = enabled;
|
||||
ppCmbxChgBarTxtType.Enabled = enabled;
|
||||
ppTxbxChangeBarUserMsgOne.Enabled = enabled;
|
||||
ppTxbxChangeBarUserMsgTwo.Enabled = enabled;
|
||||
}
|
||||
|
||||
private void rbCustom_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetCustomControls(true);
|
||||
// Make Custom controls visible
|
||||
ppGpbxUserSpecCB.Visible = true;
|
||||
}
|
||||
|
||||
private void rbFormatDefault_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetCustomControls(false);
|
||||
// Make Custom controls invisible
|
||||
ppGpbxUserSpecCB.Visible = false;
|
||||
}
|
||||
|
||||
private void ppCmbxChgBarTxtType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
||||
}
|
||||
//public string MyStatus
|
||||
//{
|
||||
// get { return lblStatus.Text;}
|
||||
// set { lblStatus.Text = value; Application.DoEvents(); }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -117,8 +117,14 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<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="btnSelect.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="btnPdfLocation.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAASdAAA
|
||||
@ -131,9 +137,6 @@
|
||||
Xbgb9AAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<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="DlgBrowseFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>153, 17</value>
|
||||
</metadata>
|
||||
|
@ -34,11 +34,11 @@ namespace VEPROMS
|
||||
get { return _OpenPDF; }
|
||||
set { _OpenPDF = value; }
|
||||
}
|
||||
public frmPDFStatusForm(ItemInfo myItem, string rev, string revDate, string watermark, bool debugOutput, string backgroundFolder, bool openPDF, string pdfPath)
|
||||
public frmPDFStatusForm(ItemInfo myItem, string rev, string revDate, string watermark, bool debugOutput, string backgroundFolder, bool openPDF, string pdfPath, ChangeBarDefinition cbd)
|
||||
{
|
||||
OpenPDF = openPDF;
|
||||
InitializeComponent();
|
||||
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, false);//openPDF);
|
||||
MyPromsPrinter = new PromsPrinter(myItem, rev, revDate, watermark, debugOutput, backgroundFolder, false, cbd);//openPDF);
|
||||
PDFPath = pdfPath;
|
||||
this.Text = "Creating PDF of " + myItem.DisplayNumber;
|
||||
|
||||
@ -76,6 +76,11 @@ namespace VEPROMS
|
||||
MyPromsPrinter.StatusChanged += new PromsPrinterStatusEvent(pp_StatusChanged);
|
||||
DateTime tStart = DateTime.Now;
|
||||
_PdfFile = MyPromsPrinter.Print(PDFPath);
|
||||
if (_PdfFile == null)
|
||||
{
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
DateTime tEnd = DateTime.Now;
|
||||
MyStatus = _PdfFile + " created.";
|
||||
MyStatus = string.Format("{0} created in {1:0.} milliseconds", _PdfFile, (TimeSpan.FromTicks(tEnd.Ticks - tStart.Ticks).TotalMilliseconds));
|
||||
|
@ -1305,7 +1305,7 @@ namespace VEPROMS
|
||||
//}
|
||||
//string pnum = DisplayText.StaticStripRtfCommands(this._CurrentItem.MyProcedure.ProcedureConfig.Number).Replace("\\u8209?", "-");
|
||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(this._CurrentItem.MyProcedure);//dvi.DocVersionConfig,pnum);
|
||||
prnDlg.Show();
|
||||
prnDlg.ShowDialog();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user