This commit is contained in:
@@ -46,16 +46,6 @@ namespace VEPROMS
|
||||
get { return txbPDFLocation.Text; }
|
||||
set { txbPDFLocation.Text = value; }
|
||||
}
|
||||
public string RevDate
|
||||
{
|
||||
get { return txbRevDate.Text; }
|
||||
set { txbRevDate.Text = value; }
|
||||
}
|
||||
public string ReviewDate
|
||||
{
|
||||
get { return txbReviewDate.Text; }
|
||||
set { txbReviewDate.Text = value; }
|
||||
}
|
||||
public string PDFPathSetting
|
||||
{
|
||||
get { return txbPdfLocationS.Text; }
|
||||
@@ -93,8 +83,6 @@ namespace VEPROMS
|
||||
{
|
||||
txbPDFName.Visible = lblPDFFileName.Visible = oneProcedure;
|
||||
txbRevNum.Visible = lblRevNum.Visible = oneProcedure;
|
||||
txbReviewDate.Visible = lblReviewDate.Visible = oneProcedure;
|
||||
txbRevDate.Visible = lblRevDate.Visible = oneProcedure;
|
||||
cbxOpenAfterCreate2.Visible = oneProcedure;
|
||||
cbxOpenAfterCreate2.Checked = false;
|
||||
cbxOverwritePDF2.Visible = oneProcedure;
|
||||
@@ -237,17 +225,9 @@ namespace VEPROMS
|
||||
txbPDFName.Text = string.Format("{0}.pdf", ProcNum.Replace('/', '_').Replace('\\', '_'));
|
||||
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";
|
||||
@@ -273,7 +253,6 @@ namespace VEPROMS
|
||||
foreach (SectionInfo mysection in _MyProcedure.Sections)
|
||||
hasReviewDate |= mysection.ActiveFormat.PlantFormat.HasPageListToken("{REVIEWDATE}");
|
||||
}
|
||||
lblReviewDate.Visible = txbReviewDate.Visible = !_AllProcedures && hasReviewDate;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
@@ -414,7 +393,7 @@ namespace VEPROMS
|
||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.Value = i;
|
||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||
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-50));
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom-50));
|
||||
frmStatus.CloseWhenDone = true;
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
@@ -450,7 +429,7 @@ namespace VEPROMS
|
||||
// Also check that format allows override.
|
||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||
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 - 50));
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50));
|
||||
frmStatus.ShowDialog();
|
||||
this.Close();
|
||||
ShowDebugFiles();
|
||||
@@ -507,6 +486,7 @@ namespace VEPROMS
|
||||
}
|
||||
private void btnCreatePDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
Rtf2iTextSharp.DoingComparison = cbxDebug.Checked;
|
||||
if (_AllProcedures)
|
||||
{
|
||||
DateTime dtStart = DateTime.Now;
|
||||
@@ -581,62 +561,6 @@ namespace VEPROMS
|
||||
if (_Initializing) return;
|
||||
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
||||
}
|
||||
private void txbRevDate_Enter(object sender, EventArgs e)
|
||||
{
|
||||
txbDate = txbRevDate;
|
||||
grpDateSelector.Text = "Select Revision Date";
|
||||
grpDateSelector.Visible = calDateSelector.Visible = true;
|
||||
|
||||
}
|
||||
|
||||
private void txbRevDate_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
txbDate = null;
|
||||
grpDateSelector.Visible = calDateSelector.Visible = false;
|
||||
// save the RevDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_RevDate = txbRevDate.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void txbReviewDate_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
txbDate = null;
|
||||
grpDateSelector.Visible = calDateSelector.Visible = false;
|
||||
// save the ReviewDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_ReviewDate = txbReviewDate.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
// need to reset config to !dirty?
|
||||
}
|
||||
|
||||
}
|
||||
private void txbReviewDate_Enter(object sender, EventArgs e)
|
||||
{
|
||||
txbDate = txbReviewDate;
|
||||
grpDateSelector.Text = "Select Review Date";
|
||||
grpDateSelector.Visible = calDateSelector.Visible = true;
|
||||
}
|
||||
|
||||
private TextBox txbDate = null;
|
||||
private void calDateSelector_DateSelected(object sender, DateRangeEventArgs e)
|
||||
{
|
||||
if (txbDate != null)
|
||||
txbDate.Text = e.Start.ToShortDateString();
|
||||
}
|
||||
|
||||
private void txbRevNum_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
|
Reference in New Issue
Block a user