/// <summary> /// Initializes a new instance of the <see cref="MetaItemComparer"/> class. /// </summary> /// <param name="currentForm">The current form.</param> /// <remarks></remarks> public MetaItemComparer(MapForm currentForm) { Map map = currentForm.map; int counter = 0; for (counter = 0; counter < map.MapHeader.fileCount; counter++) { currentForm.SetProgressBar(counter * 100 / map.MapHeader.fileCount); ifpMeta = new Meta(map); manualMeta = new Meta(map); manualMeta.ReadMetaFromMap(counter, false); ifpMeta.ReadMetaFromMap(counter, false); // parse ifp and scan meta with it try { IFPIO io = IFPHashMap.GetIfp(ifpMeta.type, map.HaloVersion); ifpMeta.headersize = io.headerSize; manualMeta.headersize = io.headerSize; try { ifpMeta.scanner.ScanWithIFP(ref io); } catch (Exception ex) { Global.ShowErrorMsg("Broken IFP - " + ifpMeta.type, ex); } manualMeta.scanner.ScanManually(); check(map); } catch (Exception ex) { Globals.Global.ShowErrorMsg(string.Empty, ex); } } currentForm.SetProgressBar(0); }