implemented the ContinueSectionHeader format flag.
Added code to the logic that replaces the procedure number with a Unit Procedure Number / Name so that if the results is a blank, it will default to the original procedure number
This commit is contained in:
parent
e3aa3ecdcd
commit
4daf9fef31
@ -989,6 +989,8 @@ namespace Volian.Print.Library
|
||||
eopnum = unitnum.Replace("#", eopnum);
|
||||
if (unitnum.Contains("!"))
|
||||
eopnum = unitnum.Replace("!", unitname);
|
||||
if (eopnum == string.Empty)
|
||||
eopnum = section.MyProcedure.MyContent.Number;
|
||||
}
|
||||
if (token.Equals("{PREDELIMEOPNUM}"))
|
||||
{
|
||||
|
@ -657,6 +657,7 @@ namespace Volian.Print.Library
|
||||
DebugText.WriteLine("ToPdf1:{0},'{1}',{2},{3},{4},{5}", MyItemInfo.ItemID, MyItemInfo.ShortSearchPath, XOffset, yLocation, yPageStart, YTopMost);
|
||||
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
|
||||
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
|
||||
bool doSectionTitleContinued = false; // will add " Continued" to the section title if format flag is set
|
||||
switch (paginate)
|
||||
{
|
||||
case 0: // No page break
|
||||
@ -683,6 +684,13 @@ namespace Volian.Print.Library
|
||||
PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
|
||||
yPageStart = yTopMargin + YTopMost;
|
||||
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
||||
|
||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y");
|
||||
}
|
||||
MyPageHelper.YMultiplier = 1;
|
||||
break;
|
||||
case 2: // Break within a Step
|
||||
@ -754,6 +762,13 @@ namespace Volian.Print.Library
|
||||
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim(" .".ToCharArray()));
|
||||
MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Top.Margin ?? 0, yTopMargin + 0.1F, docstyle.Continue.Top.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||
}
|
||||
|
||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y");
|
||||
}
|
||||
MyPageHelper.YMultiplier = 1;
|
||||
|
||||
// Now check if this is a template type step & if so, add the HLS's prefix/suffix to it.
|
||||
@ -778,6 +793,13 @@ namespace Volian.Print.Library
|
||||
}
|
||||
if (MyItemInfo.FoldoutIndex() > -1)
|
||||
PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
|
||||
|
||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y");
|
||||
}
|
||||
}
|
||||
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.IsStepSection &&
|
||||
ShowSectionTitles
|
||||
@ -790,6 +812,15 @@ namespace Volian.Print.Library
|
||||
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
||||
break;
|
||||
}
|
||||
|
||||
// If "doSectionTitleContinued" is true then print the section title with "(Continued)" appended to it
|
||||
// format must have ContinueSectinHeader format flag set to true
|
||||
if (doSectionTitleContinued)
|
||||
{
|
||||
vlnParagraph sectContPara = new vlnParagraph(MyParent.MyParent, cb, MyItemInfo.ActiveSection, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, " (Continued)");
|
||||
float mytmpfloat = sectContPara.ParagraphToPdf(cb, yTopMargin, yTopMargin, yBottomMargin);
|
||||
yPageStart -= sectContPara.Height * 2;
|
||||
}
|
||||
|
||||
yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
yPageStart = ChildrenLeft.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
@ -1322,7 +1353,10 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
Rtf = GetRtf(itemInfo, prefix, suffix);
|
||||
//if (itemInfo.IsSection)
|
||||
// Rtf = GetRtf(itemInfo, prefix, " (Continued)");
|
||||
//else
|
||||
Rtf = GetRtf(itemInfo, prefix, suffix);
|
||||
// Need the following with some modifications for WCNCKL format:
|
||||
if (Rtf.Contains("{Backspace}"))
|
||||
{
|
||||
@ -2466,17 +2500,19 @@ namespace Volian.Print.Library
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private bool UseCheckOffsDocStyle(int oldToNew, FormatInfo formatInfo)
|
||||
{
|
||||
int bit, retval=0;
|
||||
int mask=1;
|
||||
// Currently not used.
|
||||
//
|
||||
//private bool UseCheckOffsDocStyle(int oldToNew, FormatInfo formatInfo)
|
||||
//{
|
||||
// int bit, retval=0;
|
||||
// int mask=1;
|
||||
|
||||
for(bit=0; bit < 32; bit++){
|
||||
if ((oldToNew & mask) != 0 && ((int)formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.UseCheckOffsIn & mask) !=0) retval = 1;
|
||||
mask <<= 1;
|
||||
}
|
||||
return retval > 0;
|
||||
}
|
||||
// for(bit=0; bit < 32; bit++){
|
||||
// if ((oldToNew & mask) != 0 && ((int)formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.UseCheckOffsIn & mask) !=0) retval = 1;
|
||||
// mask <<= 1;
|
||||
// }
|
||||
// return retval > 0;
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user