private void AddEntryAndItsChildren(FatDirectoryArea rootDirectoryEntry) { var tvn = treeView1.Nodes.Add(rootDirectoryEntry.StartAddress.ToString(), rootDirectoryEntry.GetEntryName()); foreach (var child in rootDirectoryEntry.ChildrenList) { var newNode = tvn.Nodes.Add(child.StartAddress.ToString(), child.GetEntryName()); } }
void ParseChildren(ref FatDirectoryArea parent, BootSector bs) { if (!parent.IsThisEntryaDirectory()) { return; } int dataAreaStartLoc = parent.GetDataLocation(); List <FatDirectoryArea> longNames = new List <FatDirectoryArea>(); while (true) { var directory = Common.Common.GetUnit <FatDirectoryArea>(fileName, ref aLogger, dataAreaStartLoc, "[Child]DirectoryArea-" + parent.Description, bs); dataAreaStartLoc += Common.Common.FatDirectoryAreaSizeBytes; if (directory.IsEmpty) { break; } if (directory.IsThisEntryaLongFileName()) { longNames.Add(directory); } else { if (longNames.Count > 0) { directory.LongFileNames = longNames; longNames = new List <FatDirectoryArea>(); } parent.ChildrenList.Add(directory); } //if (directory.IsThisEntryaDirectory()) //{ // ParseChildren(ref directory, bs); //} } }