private void treeView1_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
if (metaView != FormFunctions.MetaView.InfoView)
{
return;
}
string[] mReflex = e.Node.Text.Split('.');
if (mReflex.Length != 3)
{
return;
}
for (int x = 0; x < map.IndexHeader.metaCount; x++)
{
if ((mReflex[2] == map.FileNames.Name[x]) && (mReflex[1] == "[" + map.MetaInfo.TagType[x] + "]"))
{
map.OpenMap(MapTypes.Internal);
Meta m = new Meta(map);
m.ReadMetaFromMap(x, false);
try
{
IFPIO ifpx = IFPHashMap.GetIfp(m.type, map.HaloVersion);
m.headersize = ifpx.headerSize;
// Scans IFP and loads IDENTS, REFLEXIVES & STRINGS into "m" for Reference List
m.scanner.ScanWithIFP(ref ifpx);
MetaSplitter metasplit = new MetaSplitter();
metasplit.SplitWithIFP(ref ifpx, ref m, map);
e.Node.Nodes.Clear();
if (map.MetaInfo.TagType[x] != "sbsp")
{
DisplaySplit(metasplit.Header, e.Node);
}
}
catch (Exception ex)
{
Global.ShowErrorMsg(string.Empty, ex);
}
map.CloseMap();
}
}
}