/// <summary> /// The load stuff. /// </summary> /// <param name="idx">The idx.</param> /// <param name="offsetx">The offsetx.</param> /// <param name="map">The map.</param> /// <remarks></remarks> public void LoadStuff(List<int> idx, List<int> offsetx, Map map) { this.map = map; for (int count = 0; count < idx.Count; count++) { identSwapLayout idSwap = new identSwapLayout(map); IdentSwaps.Add(idSwap); idSwap.offset = offsetx[count]; idSwap.id = idx[count]; idSwap.tagtype.Sorted = false; for (int x = 0; x < map.MetaInfo.TagTypesCount; x++) { idSwap.tagtype.Items.Add(map.MetaInfo.TagTypes[x]); } IEnumerator i = map.MetaInfo.TagTypes.Keys.GetEnumerator(); while (i.MoveNext()) { idSwap.tagtype.Items.Add(i.Current); } idSwap.tagtype.Sorted = true; if (idSwap.id != -1) { int temp = idSwap.tagtype.Items.IndexOf(map.MetaInfo.TagType[idSwap.id]); idSwap.tagtype.SelectedIndex = temp; idSwap.oldident.Text = map.MetaInfo.TagType[idSwap.id] + " - " + map.FileNames.Name[idSwap.id]; } else { idSwap.tagtype.SelectedIndex = 0; idSwap.oldident.Text = "Nulled Out"; } idSwap.Location = new Point(5, 5 + (IdentSwaps.Count - 1) * (idSwap.Height + 5)); this.Controls.Add(idSwap); this.Height += idSwap.Height + 10; } }
/// <summary> /// The load stuff. /// </summary> /// <param name="idx">The idx.</param> /// <param name="offsetx">The offsetx.</param> /// <param name="map">The map.</param> /// <remarks></remarks> public void LoadStuff(List <int> idx, List <int> offsetx, Map map) { this.map = map; for (int count = 0; count < idx.Count; count++) { identSwapLayout idSwap = new identSwapLayout(map); IdentSwaps.Add(idSwap); idSwap.offset = offsetx[count]; idSwap.id = idx[count]; idSwap.tagtype.Sorted = false; for (int x = 0; x < map.MetaInfo.TagTypesCount; x++) { idSwap.tagtype.Items.Add(map.MetaInfo.TagTypes[x]); } IEnumerator i = map.MetaInfo.TagTypes.Keys.GetEnumerator(); while (i.MoveNext()) { idSwap.tagtype.Items.Add(i.Current); } idSwap.tagtype.Sorted = true; if (idSwap.id != -1) { int temp = idSwap.tagtype.Items.IndexOf(map.MetaInfo.TagType[idSwap.id]); idSwap.tagtype.SelectedIndex = temp; idSwap.oldident.Text = map.MetaInfo.TagType[idSwap.id] + " - " + map.FileNames.Name[idSwap.id]; } else { idSwap.tagtype.SelectedIndex = 0; idSwap.oldident.Text = "Nulled Out"; } idSwap.Location = new Point(5, 5 + (IdentSwaps.Count - 1) * (idSwap.Height + 5)); this.Controls.Add(idSwap); this.Height += idSwap.Height + 10; } }