From 3e403455ec97f9cfb3083d2f203c951e74620039 Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 20 Jul 2015 14:33:06 +0000 Subject: [PATCH] =?UTF-8?q?Change=20=E2=80=98Count=E2=80=99=20to=20?= =?UTF-8?q?=E2=80=98MaxIndex=E2=80=99=20for=20=E2=80=98vlnIndexedFormatLis?= =?UTF-8?q?t=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/DisplaySearch.cs | 2 +- PROMS/Volian.Controls.Library/DisplayTags.cs | 4 ++-- PROMS/Volian.Controls.Library/DisplayTransition.cs | 2 +- PROMS/Volian.Print.Library/vlnParagraph.cs | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index e685a8e2..c0a5f67b 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -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(); diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 10fc0286..c14ccd82 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -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; diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index 6c027f3c..d06bcc53 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -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; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index f460040a..7e965360 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -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;