Change ‘Count’ to ‘MaxIndex’ for ‘vlnIndexedFormatList’

This commit is contained in:
Kathy Ruffing 2015-07-20 14:33:06 +00:00
parent 6c6f895834
commit 3e403455ec
4 changed files with 11 additions and 11 deletions

View File

@ -1495,7 +1495,7 @@ namespace Volian.Controls.Library
TransTypeList ttl = dvi.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
cbxTranFormat.Items.Clear();
cbxTranFormat.Items.Add("All");
for (int i = 0; i < ttl.Count; i++)
for (int i = 0; i < ttl.MaxIndex; i++)
cbxTranFormat.Items.Add(new TransItem(ttl[i].TransMenu.Replace("?.", ""), ttl[i].TransFormat.Replace("?.", "")));
cbxTranFormat.SelectedIndex = 0;
cbxTranCategory.Items.Clear();

View File

@ -192,7 +192,7 @@ namespace Volian.Controls.Library
bool _checkoffsAllowed = true;
if (fmtdata.ProcData.CheckOffData.CheckoffOnSubStepsOnly)
_checkoffsAllowed = cmbCheckoff.Enabled = CurItemInfo.IsType("Substep");
if (_checkoffsAllowed && !(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0))
if (_checkoffsAllowed && !(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndex == 0))
{
cmbCheckoff.Items.Clear();
foreach (CheckOff co in fmtdata.ProcData.CheckOffData.CheckOffList)
@ -205,7 +205,7 @@ namespace Volian.Controls.Library
// if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we
// may want to allow them to turn off the checkoff
// Catawba and McGuire formats use this
if (_checkoffsAllowed && (fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) ||
if (_checkoffsAllowed && (fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndex == 0) ||
fmtdata.ProcData.CheckOffData.Menu == "Signoff")
{
SectionConfig secf = CurItemInfo.ActiveSection.MyConfig as SectionConfig;

View File

@ -422,7 +422,7 @@ namespace Volian.Controls.Library
{
TransTypeList ttl = _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
listBoxTranFmt.Items.Clear();
for (int i = 0; i < ttl.Count; i++)
for (int i = 0; i < ttl.MaxIndex; i++)
listBoxTranFmt.Items.Add(new TransItem(ttl[i].TransMenu.Replace("?.",""),ttl[i].TransFormat.Replace("?.","")));
//listBoxTranFmt.Items.Add(ttl[i].TransFormat.Replace("?.",""));
listBoxTranFmt.SelectedIndex = _TranFmtIndx;

View File

@ -3906,7 +3906,7 @@ namespace Volian.Print.Library
// First see if there is any checkoff data in the format file and that there
// is a pagelist item for the checkoff header.
if (itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.Count <= 0) return;
if (itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex <= 0) return;
if (MyPageHelper.PageListCheckOffHeader == null) return;
VE_Font font = null;
@ -4801,7 +4801,7 @@ namespace Volian.Print.Library
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
{
int indxLevel = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel();
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].ColSByLevel;
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].ColSByLevel;
float seclvlindent = colsbylevel - (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS;
float adjCols = (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS + seclvlindent;
float xtabcol = adjCols - ((myTab == null || myTab.Text == null) ? 0 : (myTab.Text.Length * 7.2f));
@ -5260,8 +5260,8 @@ namespace Volian.Print.Library
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
{
int indxLevel = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel();
adjwidth += formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].WidSAdjByLevel ?? 0; ;
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].ColSByLevel;
adjwidth += formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].WidSAdjByLevel ?? 0; ;
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].ColSByLevel;
float seclvlindent = colsbylevel - (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS;
adjwidth -= seclvlindent;
if (itemInfo.IsStep) adjwidth -= AdjustForSectionLevelTab();
@ -5271,8 +5271,8 @@ namespace Volian.Print.Library
}
else
{
if (formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count > 0)
adjwidth += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[itemInfo.PrintLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].ColSByLevel;
if (formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex > 0)
adjwidth += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[itemInfo.PrintLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].ColSByLevel;
}
}
return adjwidth;
@ -5362,7 +5362,7 @@ namespace Volian.Print.Library
}
private bool HasCheckOffHeading(ItemInfo itemInfo, FormatInfo formatInfo)
{
if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList.Count != 0)
if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList.MaxIndex != 0)
{
// does this section have a check off heading?
SectionConfig sc = itemInfo.MyActiveSection.MyConfig as SectionConfig;