Change ‘Count’ to ‘MaxIndex’ for ‘vlnIndexedFormatList’
This commit is contained in:
parent
6c6f895834
commit
3e403455ec
@ -1495,7 +1495,7 @@ namespace Volian.Controls.Library
|
|||||||
TransTypeList ttl = dvi.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
|
TransTypeList ttl = dvi.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
|
||||||
cbxTranFormat.Items.Clear();
|
cbxTranFormat.Items.Clear();
|
||||||
cbxTranFormat.Items.Add("All");
|
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.Items.Add(new TransItem(ttl[i].TransMenu.Replace("?.", ""), ttl[i].TransFormat.Replace("?.", "")));
|
||||||
cbxTranFormat.SelectedIndex = 0;
|
cbxTranFormat.SelectedIndex = 0;
|
||||||
cbxTranCategory.Items.Clear();
|
cbxTranCategory.Items.Clear();
|
||||||
|
@ -192,7 +192,7 @@ namespace Volian.Controls.Library
|
|||||||
bool _checkoffsAllowed = true;
|
bool _checkoffsAllowed = true;
|
||||||
if (fmtdata.ProcData.CheckOffData.CheckoffOnSubStepsOnly)
|
if (fmtdata.ProcData.CheckOffData.CheckoffOnSubStepsOnly)
|
||||||
_checkoffsAllowed = cmbCheckoff.Enabled = CurItemInfo.IsType("Substep");
|
_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();
|
cmbCheckoff.Items.Clear();
|
||||||
foreach (CheckOff co in fmtdata.ProcData.CheckOffData.CheckOffList)
|
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
|
// 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
|
// may want to allow them to turn off the checkoff
|
||||||
// Catawba and McGuire formats use this
|
// 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")
|
fmtdata.ProcData.CheckOffData.Menu == "Signoff")
|
||||||
{
|
{
|
||||||
SectionConfig secf = CurItemInfo.ActiveSection.MyConfig as SectionConfig;
|
SectionConfig secf = CurItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||||
|
@ -422,7 +422,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
TransTypeList ttl = _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
|
TransTypeList ttl = _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
|
||||||
listBoxTranFmt.Items.Clear();
|
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(new TransItem(ttl[i].TransMenu.Replace("?.",""),ttl[i].TransFormat.Replace("?.","")));
|
||||||
//listBoxTranFmt.Items.Add(ttl[i].TransFormat.Replace("?.",""));
|
//listBoxTranFmt.Items.Add(ttl[i].TransFormat.Replace("?.",""));
|
||||||
listBoxTranFmt.SelectedIndex = _TranFmtIndx;
|
listBoxTranFmt.SelectedIndex = _TranFmtIndx;
|
||||||
|
@ -3906,7 +3906,7 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
// First see if there is any checkoff data in the format file and that there
|
// First see if there is any checkoff data in the format file and that there
|
||||||
// is a pagelist item for the checkoff header.
|
// 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;
|
if (MyPageHelper.PageListCheckOffHeader == null) return;
|
||||||
|
|
||||||
VE_Font font = null;
|
VE_Font font = null;
|
||||||
@ -4801,7 +4801,7 @@ namespace Volian.Print.Library
|
|||||||
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
|
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
|
||||||
{
|
{
|
||||||
int indxLevel = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel();
|
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 seclvlindent = colsbylevel - (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS;
|
||||||
float adjCols = (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS + seclvlindent;
|
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));
|
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))
|
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
|
||||||
{
|
{
|
||||||
int indxLevel = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel();
|
int indxLevel = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel();
|
||||||
adjwidth += formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].WidSAdjByLevel ?? 0; ;
|
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.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 seclvlindent = colsbylevel - (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS;
|
||||||
adjwidth -= seclvlindent;
|
adjwidth -= seclvlindent;
|
||||||
if (itemInfo.IsStep) adjwidth -= AdjustForSectionLevelTab();
|
if (itemInfo.IsStep) adjwidth -= AdjustForSectionLevelTab();
|
||||||
@ -5271,8 +5271,8 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count > 0)
|
if (formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex > 0)
|
||||||
adjwidth += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[itemInfo.PrintLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].ColSByLevel;
|
adjwidth += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[itemInfo.PrintLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].ColSByLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return adjwidth;
|
return adjwidth;
|
||||||
@ -5362,7 +5362,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
private bool HasCheckOffHeading(ItemInfo itemInfo, FormatInfo formatInfo)
|
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?
|
// does this section have a check off heading?
|
||||||
SectionConfig sc = itemInfo.MyActiveSection.MyConfig as SectionConfig;
|
SectionConfig sc = itemInfo.MyActiveSection.MyConfig as SectionConfig;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user