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; return PageListTopCheckOffHeader;
case "{ROMANPAGE}": case "{ROMANPAGE}":
return ItemInfo.RomanNumbering(CurrentPageNumber).ToLower(); return ItemInfo.RomanNumbering(CurrentPageNumber).ToLower();
case "{SETREV}":
return MySection.MyDocVersion.DocVersionConfig.ProcedureSetRev;
} }
if (!_MissingTokens.Contains(match.Value)) if (!_MissingTokens.Contains(match.Value))
{ {

View File

@ -52,6 +52,7 @@ namespace Volian.Print.Library
const string BoxAsterisk = " *.* .* . . . . *.* . .* . . "; const string BoxAsterisk = " *.* .* . . . . *.* . .* . . ";
const string BoxAsteriskWithSides1 = " *.* .* .* . . . *.* . .* . . "; // ip2 const string BoxAsteriskWithSides1 = " *.* .* .* . . . *.* . .* . . "; // ip2
const string BoxAsteriskWithSides2 = " *. *.*.*. . . *.*. . *. . "; // ip3 const string BoxAsteriskWithSides2 = " *. *.*.*. . . *.*. . *. . "; // ip3
const string BoxAsteriskWithSides3 = "*.*.*.*.*.*.*.*.*.*.*.*"; //byr
const string BoxAsteriskTopBottom = "*.*.*. . . .*.*. .*. . "; // fnp const string BoxAsteriskTopBottom = "*.*.*. . . .*.*. .*. . "; // fnp
const string BoxLineTopBottom = "\x2500.\x2500.\x2500. . . .\x2500.\x2500. .\x2500. . "; // fnp const string BoxLineTopBottom = "\x2500.\x2500.\x2500. . . .\x2500.\x2500. .\x2500. . "; // fnp
const string BoxAsteriskTopBotton2 = " .*. . . . . . . .*. . "; // Robinson (CPL) const string BoxAsteriskTopBotton2 = " .*. . . . . . . .*. . "; // Robinson (CPL)
@ -130,6 +131,7 @@ namespace Volian.Print.Library
break; break;
case BoxAsteriskWithSides1: case BoxAsteriskWithSides1:
case BoxAsteriskWithSides2: case BoxAsteriskWithSides2:
case BoxAsteriskWithSides3:
DrawAsteriskTopBottom(cb, yPageStart, yTopMargin, yBottomMargin, ref top, ref bottom, left); DrawAsteriskTopBottom(cb, yPageStart, yTopMargin, yBottomMargin, ref top, ref bottom, left);
DrawAsteriskSide(cb, yPageStart, yTopMargin, yBottomMargin, top, bottom, left, right); DrawAsteriskSide(cb, yPageStart, yTopMargin, yBottomMargin, top, bottom, left, right);
break; 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 // 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. // for VCS where two different type notes where not getting separate boxes.
bool doSeparateBoxHdrChg = false; bool doSeparateBoxHdrChg = false;
if (childItemInfo.ItemID == 50 || childItemInfo.ItemID == 53) Console.WriteLine("jcb");
if (childItemInfo.MyPrevious != null && childItemInfo.MyHeader != null && childItemInfo.MyPrevious.MyHeader != null if (childItemInfo.MyPrevious != null && childItemInfo.MyHeader != null && childItemInfo.MyPrevious.MyHeader != null
&& childItemInfo.MyHeader.CleanText != childItemInfo.MyPrevious.MyHeader.CleanText) doSeparateBoxHdrChg = true; && 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 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 (UseTemplateWidthOrXOff(itemInfo)) XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + GetWidthOrStartFromTemplate(itemInfo, itemInfo.ActiveFormat, false);
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab) if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
yoff += SetHeader(this, cb, itemInfo, formatInfo); 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; float yoffLeft = yoff;
if (ChildrenAbove != null) if (ChildrenAbove != null)
ChildrenAbove.StepDesignator = null; //reset StepDesignator ChildrenAbove.StepDesignator = null; //reset StepDesignator
@ -2424,7 +2427,7 @@ namespace Volian.Print.Library
xoff = XOffset; // XOffset has left margin included 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); vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff, YOffset, itemInfo.MyHeader.MyFont);
PartsAbove.Add(myHeader); 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) private float AdjustToCharPosition(float position, float? CPI)
{ {
@ -2993,6 +2996,9 @@ namespace Volian.Print.Library
} }
else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh) else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh)
{ {
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAdj != null)
Width = MyParent.Width + float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAdj);
else
Width = MyParent.Width; Width = MyParent.Width;
} }
else if (itemInfo.IsTablePart) else if (itemInfo.IsTablePart)