void extractNEFS() { NefsProgressInfo _progressInfo = new NefsProgressInfo(); _progressInfo.Progress = new Progress <NefsProgress>(); DirectoryInfo di = new DirectoryInfo(PathToCars); foreach (FileInfo fi in di.GetFiles("*.nefs")) { try { NefsArchive archive = new NefsArchive(fi.FullName, _progressInfo); NefsItem item = archive.GetItem(13); string car3 = fi.Name.Replace(fi.Extension, ""); FileInfo fi2 = new FileInfo(PathToCars + "\\" + car3 + "\\" + item.Filename + ".bin.xml"); item.Extract(fi2.FullName, _progressInfo); string filename = PathToCars + "\\" + car3 + "\\" + item.Filename; ConvertBinXMLToPlainXML(fi2.FullName, filename); } catch (Exception) { } } }
private void upButton_Click(object sender, EventArgs e) { if (_dir == null) { /* Can't go up a directory */ return; } /* Find the parent directory */ var parent = _archive.GetItem(_dir.DirectoryId); if (parent == _dir) { /* If the parent == the current dir, then display root */ OpenDirectory(null); } else { OpenDirectory(parent); } }