Added Unit Specif logic
Added “Final Page” logic Added “Final Page” logic, fixed PDF compare where it wasn’t finding the file in the Compare folder Added Caution and Note boxes for Turkey Point Null check and logic for PosAdjust format variable Added “Final Page” message logic Fix to get proper with of tabs containing a solid bullet
This commit is contained in:
@@ -27,6 +27,13 @@ namespace Volian.Print.Library
|
||||
get { return _Total; }
|
||||
set { _Total = value; }
|
||||
}
|
||||
private string _FinalPageMessage;
|
||||
|
||||
public string FinalPageMessage
|
||||
{
|
||||
get { return _FinalPageMessage; }
|
||||
set { _FinalPageMessage = value; }
|
||||
}
|
||||
private PageCountTemplates _MyTemplates; // (for each page that has this key)
|
||||
internal PageCountTemplates MyTemplates
|
||||
{
|
||||
@@ -42,10 +49,16 @@ namespace Volian.Print.Library
|
||||
}
|
||||
public void DrawTemplates()
|
||||
{
|
||||
int cnt = 0;
|
||||
foreach (PageCountTemplate pct in MyTemplates)
|
||||
{
|
||||
cnt++;
|
||||
string fstr = pct.Text.Replace("{OF}", _Total.ToString());
|
||||
|
||||
if (fstr.Contains("{FINALPAGE}"))
|
||||
{
|
||||
fstr = fstr.Replace("{FINALPAGE}", (cnt == MyTemplates.Count) ? FinalPageMessage : "");
|
||||
}
|
||||
// use font from pct
|
||||
string fontFace = pct.MyFont.Name;
|
||||
int fontStyle = (pct.MyFont.Bold ? iTextSharp.text.Font.BOLD : 0) + (pct.MyFont.Italic ? iTextSharp.text.Font.ITALIC : 0);
|
||||
@@ -102,6 +115,12 @@ namespace Volian.Print.Library
|
||||
if (!this.ContainsKey(key)) this.Add(key, new PageCount());
|
||||
return (this[key].AddToTemplateList(pdfWriter, text, myFont, alignment,color));
|
||||
}
|
||||
public PdfTemplate AddToTemplateList(string key, PdfWriter pdfWriter, string text, string finalPageMessage, System.Drawing.Font myFont, int alignment, System.Drawing.Color color)
|
||||
{
|
||||
if (!this.ContainsKey(key)) this.Add(key, new PageCount());
|
||||
this[key].FinalPageMessage = finalPageMessage;
|
||||
return (this[key].AddToTemplateList(pdfWriter, text, myFont, alignment, color));
|
||||
}
|
||||
public void DrawTemplates()
|
||||
{
|
||||
foreach (PageCount pc in this.Values)
|
||||
|
Reference in New Issue
Block a user