Added code to implement Box 2 format

Added code to use separate boxes for notes and use RNOWidthAdj flag
Added code to implement SETREV page element.
This commit is contained in:
Rich 2014-01-08 20:14:46 +00:00
parent 74886aa3b4
commit c2857b2b16
3 changed files with 13 additions and 3 deletions

View File

@ -1707,6 +1707,8 @@ namespace Volian.Print.Library
return PageListTopCheckOffHeader;
case "{ROMANPAGE}":
return ItemInfo.RomanNumbering(CurrentPageNumber).ToLower();
case "{SETREV}":
return MySection.MyDocVersion.DocVersionConfig.ProcedureSetRev;
}
if (!_MissingTokens.Contains(match.Value))
{

View File

@ -52,6 +52,7 @@ namespace Volian.Print.Library
const string BoxAsterisk = " *.* .* . . . . *.* . .* . . ";
const string BoxAsteriskWithSides1 = " *.* .* .* . . . *.* . .* . . "; // ip2
const string BoxAsteriskWithSides2 = " *. *.*.*. . . *.*. . *. . "; // ip3
const string BoxAsteriskWithSides3 = "*.*.*.*.*.*.*.*.*.*.*.*"; //byr
const string BoxAsteriskTopBottom = "*.*.*. . . .*.*. .*. . "; // fnp
const string BoxLineTopBottom = "\x2500.\x2500.\x2500. . . .\x2500.\x2500. .\x2500. . "; // fnp
const string BoxAsteriskTopBotton2 = " .*. . . . . . . .*. . "; // Robinson (CPL)
@ -130,6 +131,7 @@ namespace Volian.Print.Library
break;
case BoxAsteriskWithSides1:
case BoxAsteriskWithSides2:
case BoxAsteriskWithSides3:
DrawAsteriskTopBottom(cb, yPageStart, yTopMargin, yBottomMargin, ref top, ref bottom, left);
DrawAsteriskSide(cb, yPageStart, yTopMargin, yBottomMargin, top, bottom, left, right);
break;

View File

@ -129,10 +129,11 @@ namespace Volian.Print.Library
// into the box code. Without this check, none of the box code is run. This caused a problem
// for VCS where two different type notes where not getting separate boxes.
bool doSeparateBoxHdrChg = false;
if (childItemInfo.ItemID == 50 || childItemInfo.ItemID == 53) Console.WriteLine("jcb");
if (childItemInfo.MyPrevious != null && childItemInfo.MyHeader != null && childItemInfo.MyPrevious.MyHeader != null
&& childItemInfo.MyHeader.CleanText != childItemInfo.MyPrevious.MyHeader.CleanText) doSeparateBoxHdrChg = true;
if ((bxIndx ?? -1) != -1 && (bxIndex != bxIndx || childItemInfo.FormatStepData.BoxIt || childItemInfo.MyHeader != null || doSeparateBoxHdrChg))
if ((bxIndx ?? -1) != -1 && (bxIndex != bxIndx || childItemInfo.FormatStepData.BoxIt || childItemInfo.MyHeader != null || doSeparateBoxHdrChg || childItemInfo.FormatStepData.SeparateBox))
{
if (childItemInfo.FormatStepData.BoxIt) // this is a boxed HLS
{
@ -1518,6 +1519,8 @@ namespace Volian.Print.Library
if (UseTemplateWidthOrXOff(itemInfo)) XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + GetWidthOrStartFromTemplate(itemInfo, itemInfo.ActiveFormat, false);
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
yoff += SetHeader(this, cb, itemInfo, formatInfo);
else if(itemInfo.FormatStepData != null && itemInfo.FormatStepData.SeparateBox && itemInfo.FirstSibling.MyHeader != null && itemInfo.FirstSibling.MyHeader.Text != null)
yoff += SetHeader(this, cb, itemInfo.FirstSibling, formatInfo);
float yoffLeft = yoff;
if (ChildrenAbove != null)
ChildrenAbove.StepDesignator = null; //reset StepDesignator
@ -2424,7 +2427,7 @@ namespace Volian.Print.Library
xoff = XOffset; // XOffset has left margin included
vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff, YOffset, itemInfo.MyHeader.MyFont);
PartsAbove.Add(myHeader);
return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? SixLinesPerInch : 0);
return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? MyItemInfo.FormatStepData.SpaceIn ? SixLinesPerInch : 0 : 0);
}
private float AdjustToCharPosition(float position, float? CPI)
{
@ -2993,7 +2996,10 @@ namespace Volian.Print.Library
}
else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh)
{
Width = MyParent.Width;
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAdj != null)
Width = MyParent.Width + float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAdj);
else
Width = MyParent.Width;
}
else if (itemInfo.IsTablePart)
{