Added Warning with triple line box, Adjusted PSI Use Class text X-location

Support for Printing ‘[xx]’ text within an annotation by allowing for xlocation on dialog.
Triple Line Box around note or caution
This commit is contained in:
2016-08-04 10:35:26 +00:00
parent ac47021609
commit a2835ab73d
8 changed files with 535 additions and 420 deletions

View File

@@ -145,6 +145,18 @@ namespace Volian.Print.Library
cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier);
break;
case BoxDouble:
if (MyBox.NumLines == 3)
{
lineThickness = .6F;
cb.SetLineWidth(lineThickness / 2F);
// outer rectangle (rectangle's are defined as x,y,w,h)
cb.Rectangle(left + llxOffset - lineThickness * 1.5F, bottom - lineThickness, right - left + lineThickness * 3, (Height + lineThickness * 2) * MyPageHelper.YMultiplier);
// inner rectangle
cb.Rectangle(left + llxOffset + lineThickness, bottom + lineThickness * 1.5F, right - left - lineThickness * 2, (Height - lineThickness * 3) * MyPageHelper.YMultiplier);
// outer outer most
cb.Rectangle(left + llxOffset - lineThickness * 4F, bottom - lineThickness * 3.5F, right - left + lineThickness * 8, (Height + lineThickness * 7) * MyPageHelper.YMultiplier);
break;
}
lineThickness = .6F;
cb.SetLineWidth(lineThickness);
// outer rectangle (rectangle's are defined as x,y,w,h)

View File

@@ -3153,7 +3153,8 @@ namespace Volian.Print.Library
ChildrenAbove.StepDesignator = null;
ChildrenAbove.StepDesignatorColumn = null;
}
DoAnnotationPrintableText(cb, itemInfo, yoff); // Look in annotation type to see if annotation has text that should be printed (like a step designator)
// if this is a hls with a box, adjust the starting y location for the hls. this is done here
// in case this hls had a boxed caution and/or note before it. Also, this code is here rather
// than in the vlnparagraphs.add code because the yoff in that code will position the box, but
@@ -3762,6 +3763,34 @@ namespace Volian.Print.Library
ProfileTimer.Pop(profileDepth);
}
private void DoAnnotationPrintableText(PdfContentByte cb, ItemInfo itemInfo, float yoff)
{
// if this step has an Annotation and it has config data to define location, parse out '[xx]' and print it at the location
// this was added for VC Summer (unit 2 & 3) but is available for any data that has defined the location in the config (from the folder properties
// at the top node - annotationtype tab.
if (itemInfo.ItemAnnotationCount > 0)
{
foreach (AnnotationInfo ai in itemInfo.ItemAnnotations)
{
// get the annotation type from the annotation, and see if it has a print location:
AnnotationTypeInfo at = ai.MyAnnotationType;
AnnotationTypeConfig atc = new AnnotationTypeConfig(at.Config);
if (atc.PrintableText_XLocation != 0)
{
int st = ai.SearchText.IndexOf("[");
int end = ai.SearchText.IndexOf("]");
if (st != -1 && end != -1 && end > st)
{
string pref = ai.SearchText.Substring(st, end - st + 1); // annotation - parse out [xx]
float xPref = atc.PrintableText_XLocation;
PartsLeft.Add(new vlnText(cb, this, pref, pref, xPref, yoff, _MyItemInfo.FormatStepData.Font));
break;
}
}
}
}
}
private float AdjustLocIfLongerRNO(ItemInfo itemInfo, float yoff, float yoffRightParent)
{
if (!itemInfo.IsInRNO && yoffRightParent > yoff && itemInfo.FormatStepData.Type.Contains("AER"))