Fix IArchive propery file counter

This commit is contained in:
KillzXGaming 2019-08-06 19:02:09 -04:00
parent 91e5ce78dc
commit c11389fb4f
4 changed files with 9 additions and 3 deletions

Binary file not shown.

View file

@ -205,7 +205,7 @@ namespace Toolbox.Library
{
Text = text;
PropertyDisplay = new GenericArchiveProperties(archiveFile, text);
PropertyDisplay = new GenericArchiveProperties(archiveFile, text, this);
}
public void AddFileNode(ArchiveFileWrapper fileWrapper)
@ -420,6 +420,8 @@ namespace Toolbox.Library
public class GenericArchiveProperties
{
private ArchiveRootNodeWrapper rootNode;
private IArchiveFile ArchiveFile;
[Category("Archive Properties")]
@ -429,12 +431,16 @@ namespace Toolbox.Library
[DisplayName("File Count")]
public int FileCount
{
get { return ArchiveFile.Files.ToList().Count; }
get
{
return rootNode.FileNodes != null ? rootNode.FileNodes.Count : 0;
}
}
public GenericArchiveProperties(IArchiveFile archiveFile, string text) {
public GenericArchiveProperties(IArchiveFile archiveFile, string text, ArchiveRootNodeWrapper root) {
ArchiveFile = archiveFile;
Name = text;
rootNode = root;
}
}