mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Fix IArchive propery file counter
This commit is contained in:
parent
91e5ce78dc
commit
c11389fb4f
4 changed files with 9 additions and 3 deletions
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue