XCI-Explorer/XCI_Explorer/TreeViewFileSystem.cs

41 lines
1.1 KiB
C#
Raw Normal View History

2018-06-17 18:21:52 +00:00
using System.Windows.Forms;
using XCI_Explorer.Helpers;
namespace XCI_Explorer;
public class TreeViewFileSystem
2019-04-14 17:17:26 +00:00
{
public TreeView treeView;
2018-06-17 18:21:52 +00:00
public TreeViewFileSystem(TreeView tv)
{
}
2018-06-17 18:21:52 +00:00
public BetterTreeNode AddDir(string name, BetterTreeNode parent = null)
{
BetterTreeNode betterTreeNode = new(name)
2019-04-14 17:17:26 +00:00
{
Offset = -1L,
Size = -1L
};
parent.Nodes.Add(betterTreeNode);
return betterTreeNode;
}
2018-06-17 18:21:52 +00:00
public BetterTreeNode AddFile(string name, BetterTreeNode parent, long offset, long size) => AddFile(name, parent, offset, size, 0, "", "");
2018-06-23 15:58:42 +00:00
public BetterTreeNode AddFile(string name, BetterTreeNode parent, long offset, long size, long HashedRegionSize, string ExpectedHash, string ActualHash)
{
BetterTreeNode betterTreeNode = new(name)
2019-04-14 17:17:26 +00:00
{
Offset = offset,
Size = size,
ExpectedHash = ExpectedHash,
ActualHash = ActualHash,
HashedRegionSize = HashedRegionSize
};
parent.Nodes.Add(betterTreeNode);
return betterTreeNode;
2018-06-23 15:58:42 +00:00
}
2018-06-17 18:21:52 +00:00
}