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:
2011-09-22 19:57:32 +00:00
parent 63888a983d
commit c5dc03ee1c
7 changed files with 181 additions and 17 deletions

View File

@@ -11,6 +11,7 @@ namespace Volian.Print.Library
{
public partial class vlnBox : vlnPrintObject
{
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private int _LineType; /* how to represent?? */
private System.Drawing.Color _Color;
public System.Drawing.Color Color
@@ -38,6 +39,8 @@ namespace Volian.Print.Library
public const string BoxThin = "\x2510.\x2500.\x250c.\x2502. . .\x2518.\x2514. .\x2500. . ";
const string BoxThick = "\x2584.\x2584.\x2584.\x2588. . .\x2580.\x2580. .\x2580. . ";
const string BoxDouble = "\x2557.\x2550.\x2554.\x2551. . .\x255D.\x255A. .\x2550. . ";
const string BoxFPLNote = "\x2557.\x2550\xad.\x2554\xad.\x2551. . .\x255d.\x255a\xad. .\x2550\xad. . ";
const string BoxFPLCaution = "\x2588.\x2580.\x2588.\x2588. . .\x2588.\x2588. .\x2584. . ";
public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
{
cb.SaveState();
@@ -81,9 +84,22 @@ namespace Volian.Print.Library
// inner rectangle
cb.Rectangle(left + llxOffset + lineThickness, bottom + lineThickness * 1.5F, right - left - lineThickness * 2, (Height - lineThickness * 3) * MyPageHelper.YMultiplier);
break;
case BoxFPLNote:
lineThickness = 2;
cb.SetLineWidth(lineThickness);
float[] linePattern = { 6, 1.75F, 2.5F, 1.75F };
cb.SetLineDash(linePattern,3);
cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2) -1, right - left, (2 + Height - lineThickness) * MyPageHelper.YMultiplier);
break;
case BoxFPLCaution:
lineThickness = 3;
cb.SetLineWidth(lineThickness);
cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier);
break;
default:
// For other than thick, thin and double.
Console.WriteLine("NO BOXES");
//Console.WriteLine("NO BOXES");
_MyLog.WarnFormat("INVALID BOX SYTLE {0} \"{1}\"", MyParent.MyItemInfo.FormatStepData.Type, CharToAsc(MyBox.BoxStyle));
break;
//throw new Exception("Missing vlnBox handler");
}