C2021-019: Override Watermark Text and Color

This commit is contained in:
2021-07-06 15:16:40 +00:00
parent aa9c2574bf
commit a3f89c5fa0
10 changed files with 135 additions and 12 deletions

View File

@@ -817,6 +817,12 @@ namespace Volian.Print.Library
get { return _AllowAllWatermarks; }
set { _AllowAllWatermarks = value; }
}
private string _WatermarkOverrideColor = "BLUE"; // C2021-019: Override watermark color
public string WatermarkOverrideColor
{
get { return _WatermarkOverrideColor; }
set { _WatermarkOverrideColor = value; }
}
//private PdfReader readerWord;
private string PrintProcedureOrFoldout(ProcedureInfo myProcedure, SectionInfo myFoldoutSection, string outputFileName, bool makePlacekeeper, bool makeContinuousActionSummary)
{
@@ -875,6 +881,13 @@ namespace Volian.Print.Library
string LastFmtName = null;
int lastDocStyle = -1;
bool firstStepSec = true;
// C2021-019: Override the watermark color, stored in the PSI - color list set as combobox in PSI with list of colors
ProcedureConfig pc = myProcedure.MyConfig as ProcedureConfig;
if (pc != null)
{
string clr = pc.GetValue("PSI", "WATERMARKOVERRIDECLR");
if (clr != null && clr != "") WatermarkOverrideColor = clr.ToUpper().Contains("DEFAULT") ? "BLUE" : clr;
}
foreach (SectionInfo mySection in myProcedure.Sections)
{
// B2020-115 Calculate maximum available space on a page for figures
@@ -950,6 +963,7 @@ namespace Volian.Print.Library
//_MyHelper.DoZoomOMatic = DebugOutput;
_MyHelper.OriginalPageBreak = OriginalPageBreak;
_MyHelper.PROMSVersion = _PromsVersion; //C2018-009 print PROMS version
_MyHelper.WatermarkColor = WatermarkOverrideColor; // C2021-019: save the override for the watermark color
OnStatusChanged("After Set PageEvent", PromsPrinterStatusType.SetPageEvent);
}
else