Example #1
0
		public NetHookItem AddItemFromPath(string path)
		{
			var fileInfo = new FileInfo(path);
			var item = new NetHookItem();
			if (!item.LoadFromFile(fileInfo))
			{
				return null;
			}

			items.Add(item);
			return item;
		}
Example #2
0
		public void LoadFromDirectory(string directory)
		{
			items.Clear();

			var directoryInfo = new DirectoryInfo(directory);
			var itemFiles = directoryInfo.EnumerateFiles("*.bin", SearchOption.TopDirectoryOnly);
			foreach (var itemFile in itemFiles)
			{
				var item = new NetHookItem();
				if (item.LoadFromFile(itemFile))
				{
					items.Add(item);
				}
			}
		}
Example #3
0
		TreeNode BuildTree(NetHookItem item)
		{
			return new NetHookItemTreeBuilder(item) { Specializations = specializations }.BuildTree();
		}
		public NetHookItemTreeBuilder(NetHookItem item)
		{
			this.item = item;
		}