This commit is contained in:
parent
ca50815d38
commit
1d6fb249c7
@ -386,26 +386,28 @@ namespace DataLoader
|
|||||||
}
|
}
|
||||||
ds.Dispose();
|
ds.Dispose();
|
||||||
da.Dispose();
|
da.Dispose();
|
||||||
// now read in the HLS's and set their config to the appropriate foldout:
|
// now read in the HLS's and set their config to the appropriate foldout.
|
||||||
int cnt = 1;
|
// stpFoldSeq contains 16 bit step to foldout associations, i.e. an integer step
|
||||||
foreach (int hlsItemId in FloatingFoldoutHLS)
|
// number (ordinal) and string sequence of foldout.
|
||||||
|
// FloatingFoldoutHLS contains each 16bit ordinal step number (all steps, whether
|
||||||
|
// they have a foldout or not) and the associated itemid in 32bit
|
||||||
|
// FoldoutStpSeq contains all foldouts, i.e. the string representing the sequence
|
||||||
|
// number if 16bit and the resulting 32bit itemid.
|
||||||
|
foreach (KeyValuePair<int, string> kvp in stpFoldSeq)
|
||||||
{
|
{
|
||||||
|
int hlsItemId = FloatingFoldoutHLS[kvp.Key-1]; // -1 for indexes starting at 0 (not 1)
|
||||||
using (Item itmF = Item.Get(hlsItemId))
|
using (Item itmF = Item.Get(hlsItemId))
|
||||||
{
|
{
|
||||||
// be sure that the dictionaries contain the key.
|
// be sure that the dictionaries contain the key.
|
||||||
// Some data may be 'corrupt' and not have the appropriate linkages
|
// Some data may be 'corrupt' and not have the appropriate linkages
|
||||||
// to floating foldouts.
|
// to floating foldouts.
|
||||||
if (stpFoldSeq.ContainsKey(cnt))
|
if (FoldoutStpSeq.ContainsKey(kvp.Value))
|
||||||
{
|
{
|
||||||
string fldstr = stpFoldSeq[cnt];
|
int fldItemId = FoldoutStpSeq[kvp.Value];
|
||||||
if (FoldoutStpSeq.ContainsKey(fldstr))
|
ConfigInfo ciFold = new ConfigInfo(itmF.MyContent.Config);
|
||||||
{
|
ciFold.AddItem("Step", "FloatingFoldout", fldItemId.ToString());
|
||||||
int fldItemId = FoldoutStpSeq[fldstr];
|
itmF.MyContent.Config = ciFold.ToString();
|
||||||
ConfigInfo ciFold = new ConfigInfo(itmF.MyContent.Config);
|
itmF.Save();
|
||||||
ciFold.AddItem("Step", "FloatingFoldout", fldItemId.ToString());
|
|
||||||
itmF.MyContent.Config = ciFold.ToString();
|
|
||||||
itmF.Save();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user