Support for background print output; fix printlevel for tab formatting (‘.’ Vs ‘)’);

This commit is contained in:
Kathy Ruffing 2013-09-25 16:07:00 +00:00
parent 7cbe3f651f
commit a65ca24837

View File

@ -393,7 +393,12 @@ namespace VEPROMS.CSLA.Library
tmpInfo.RefreshItemParts();
}
}
private string _HighLevelStepTabPageList = null;
public string HighLevelStepTabPageList
{
get { return _HighLevelStepTabPageList; }
set { _HighLevelStepTabPageList = value; }
}
private bool _NewTransToUnNumberedItem = false;
public bool NewTransToUnNumberedItem
{
@ -514,7 +519,7 @@ namespace VEPROMS.CSLA.Library
{
if (_PrintLevel != 0) return _PrintLevel;
int _PrintBias = 0;
_PrintLevel = GetStepLevel(ref _PrintBias);
_PrintLevel = GetStepLevel(); //ref _PrintBias);
return _PrintLevel;
}
@ -2435,8 +2440,8 @@ namespace VEPROMS.CSLA.Library
{
if (tbformat.Contains("{LNK C/N Num}"))
{
tbformat = tbformat.Replace("{LNK C/N Num}", Ordinal.ToString() + ":");
tbformat = tbformat.Replace("{LNK Step Num}", ""); //(ActiveParent as ItemInfo).Ordinal.ToString() + ":");
tbformat = tbformat.Replace("{LNK C/N Num}", Ordinal.ToString());
tbformat = tbformat.Replace("{LNK Step Num}", (ActiveParent as ItemInfo).Ordinal.ToString());
tbformat = tbformat.TrimStart(" ".ToCharArray());
}
if (tbformat.Contains("{LNK Step Num}"))
@ -2470,7 +2475,6 @@ namespace VEPROMS.CSLA.Library
_MyTab.CleanText = "";
return;
}
// account for metasection indenting/tabbing in the 'PrintLevel', i.e. if we have metasection, we may be in
// a subsection. Index into the seqtabs array has to account for metasection level.
int localPrintLevel = PrintLevel;
@ -2489,7 +2493,6 @@ namespace VEPROMS.CSLA.Library
// If we have metasections AND...
// If the seqtabs for this given level does not get a section number, use the seqtab rather than
// the ident of the step:
bool useSubStepTabs = false;
if (doMeta && IsHigh
&& !seqtabs[(localPrintLevel < 0 ? 0 : localPrintLevel) % seqtabs.Count].TabToken.Contains("{numericWpar}")
@ -2635,20 +2638,7 @@ namespace VEPROMS.CSLA.Library
_MyHeader.Justify = ContentAlignment.MiddleCenter;
}
#region Non Converted Plants tab TODO
// other possible 'tokens'
// Position offset - do this one here, so don't get background substitution below..
// ##-3# - Offset of -3 from Parent (FNP)
// "{Pos-3}"
// Background/Deviation Documents - check for E_PurchaseOptions.(ENHANCEDBACKGROUNDS or ENHANCEDDEVIATIONS)
// # - Related Caution or Note number
// ~ - Linked Step Number
//"{LNK C/N Num}"
//"{LNK Step Num}"
// Position offset
// \257 - Indent (CALLOWAY BACKGROUNDS)
// Newline within a tab (calbck)
//"{indent}");
//"{par}");
@ -2664,9 +2654,22 @@ namespace VEPROMS.CSLA.Library
//wkstr = Regex.Replace(wkstr, @"{![.*?]}", @"{!$1}");
//wkstr = wkstr.Replace("{}", "");
//if (vefont != null && vefont.HasCircleString2()) wkstr.Insert(0,"{!C0}");
//wkstr = wkstr.Replace("ê", @"{Box Step}");
#endregion
// if this has an alternate tab, use it. These have been used in background documents.
if (!IsSection && FormatStepData.TabData.IdentAltPrint != null && FormatStepData.TabData.IdentAltPrint != "")
{
string newtab = null;
int indxnewtab = FormatStepData.TabData.IdentAltPrint.LastIndexOf('\\');
if (indxnewtab >= 0)
{
newtab = FormatStepData.TabData.IdentAltPrint.Substring(indxnewtab + 1);
// also see if there is the 'pagelist' string in this tab:
HighLevelStepTabPageList = FormatStepData.TabData.IdentAltPrint.Substring(0, indxnewtab) + tbformat;
_MyTab.AltPrintTab = newtab;
}
}
_MyTab.Text = tbformat;
_MyTab.CleanText = cltext != null ? cltext : tbformat;
}
@ -2701,7 +2704,7 @@ namespace VEPROMS.CSLA.Library
return (tbformat.Substring(stindx, tbformat.IndexOf("}")-stindx+1));
}
public int GetStepLevel(ref int bias)
public int GetStepLevel() // ref int bias)
{
int level = 0;
ItemInfo par = this;
@ -2723,7 +2726,7 @@ namespace VEPROMS.CSLA.Library
// level RNOs - unless DontOffsetTab format flag is set
if (LastRNO != null && LastRNO.IsHigh && TopRNO.FormatStepData.NumberHighLevel && TopRNO.FormatStepData.OffsetTab)
OffsetTab = TopRNO.FormatStepData.NumberHighLevel?1:0;
bias = 0;
_PrintBias = 0;
if (par.FormatStepData != null && par.FormatStepData.TabData.IdentPrint.Contains("{ALPHA}"))
level--;
@ -2736,7 +2739,7 @@ namespace VEPROMS.CSLA.Library
level++; // 16bit has this: I didn't and mine worked most of time.
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ImperfectStructurePlus4) level += 2;
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ImperfectSubstep && !ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ImperfectStructurePlus4)
bias = -1;
PrintBias = -1;
}
// ImperfectStructure for substeps - only good for level 1 RNOs
else if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ImperfectSubstep && RNOLevel == 1)
@ -2753,7 +2756,7 @@ namespace VEPROMS.CSLA.Library
{
level++;
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ImperfectStructurePlus4) level += 1;
if (!ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ImperfectStructurePlus4) bias = -1;
if (!ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ImperfectStructurePlus4) PrintBias = -1;
}
}
}
@ -3334,6 +3337,12 @@ namespace VEPROMS.CSLA.Library
}
public class Tab : MetaTag
{
private string _AltPrintTab = null;
public string AltPrintTab
{
get { return _AltPrintTab; }
set { _AltPrintTab = value; }
}
private bool _RemovedStyleUnderline = false;
public bool RemovedStyleUnderline
{