B2019-044 Since the watermark switch on the print dialog can turn off the printing of a watermark, created a enum of the watermark options but without the “None’ option for use only on the Print dialog.

B2019-044 The watermark switch on the print dialog will now turn off the printing of a watermark when there is a default set at the working draft level.
This commit is contained in:
John Jenko 2019-03-26 13:58:15 +00:00
parent 676ebac6cd
commit 389250bad3
2 changed files with 16 additions and 4 deletions

View File

@ -424,11 +424,14 @@ namespace VEPROMS
RevDate = DateTime.Today.ToShortDateString(); RevDate = DateTime.Today.ToShortDateString();
ReviewDate = null; ReviewDate = null;
} }
cbxWaterMark.DataSource = EnumDetail<PrintWatermark>.Details(); // B2019-044 use Enum without the "None" option for the print dialog
cbxWaterMark.DisplayMember = "Description"; cbxWaterMark.DataSource = EnumDetail<PrintDlgWatermarkList>.Details();
cbxWaterMark.ValueMember = "EValue"; cbxWaterMark.ValueMember = "EValue";
PrintWatermark pw = _DocVersionConfig.Print_Watermark; // MyProcedure.ProcedureConfig.Print_Watermark; PrintWatermark pw = _DocVersionConfig.Print_Watermark; // MyProcedure.ProcedureConfig.Print_Watermark;
cbxWaterMark.Text = pw.ToString(); if (!pw.ToString().ToUpper().Equals("NONE")) //B2019-044 check setting from folder level
cbxWaterMark.Text = pw.ToString(); // position print dialog list to setting from folder level
else
swtbtnWaterMark.Value = false; // set to None at folder level so set Watermark switch to the off position
//ppCmbxChgBarPos.DataSource = EnumDetail<PrintChangeBarLoc>.Details(); //ppCmbxChgBarPos.DataSource = EnumDetail<PrintChangeBarLoc>.Details();
//ppCmbxChgBarPos.DisplayMember = "Description"; //ppCmbxChgBarPos.DisplayMember = "Description";
@ -818,7 +821,8 @@ namespace VEPROMS
// If file exists, determine if overwrite checkbox allows overwrite, if not prompt. // If file exists, determine if overwrite checkbox allows overwrite, if not prompt.
Volian.Print.Library.Rtf2Pdf.PdfDebug = cbxDebug.Checked; Volian.Print.Library.Rtf2Pdf.PdfDebug = cbxDebug.Checked;
string waterMarkText = cbxWaterMark.Text; // B2018-124 use text of watermark form drop down list instead of enum value // B2019-044 don't print the watermark if the watermark switch on the print dialog is turned off
string waterMarkText = (swtbtnWaterMark.Value) ? cbxWaterMark.Text : "None" ; // B2018-124 use text of watermark form drop down list instead of enum value
// Determine change bar settings. First get from config & then see if override from dialog. // Determine change bar settings. First get from config & then see if override from dialog.
// Also check that format allows override. // Also check that format allows override.
ChangeBarDefinition cbd = DetermineChangeBarSettings(); ChangeBarDefinition cbd = DetermineChangeBarSettings();

View File

@ -15,6 +15,14 @@ namespace VEPROMS.CSLA.Library
[Description("Information Only")] [Description("Information Only")]
InformationOnly InformationOnly
} }
// B2019-044 use Enum without the "None" option for the print dialog
[TypeConverter(typeof(EnumDescConverter))]
public enum PrintDlgWatermarkList : int
{
Reference, Draft, Master, Sample,
[Description("Information Only")]
InformationOnly
}
// Change Bar Use from 16-bit code: // Change Bar Use from 16-bit code:
// No Default // No Default
// Without Change Bars // Without Change Bars