From e93869c7a785a4f375685ffa33c913033ed1c85a Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 21 Jun 2007 17:08:21 +0000 Subject: * Importing Ming's mass test client --- .../Commands/Inventory/InventoryCommand.cs | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 tools/mass test client/Commands/Inventory/InventoryCommand.cs (limited to 'tools/mass test client/Commands/Inventory/InventoryCommand.cs') diff --git a/tools/mass test client/Commands/Inventory/InventoryCommand.cs b/tools/mass test client/Commands/Inventory/InventoryCommand.cs new file mode 100644 index 0000000..da5dc73 --- /dev/null +++ b/tools/mass test client/Commands/Inventory/InventoryCommand.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Threading; +using System.Xml; +using System.Xml.Serialization; + +using libsecondlife; +using libsecondlife.Packets; +using libsecondlife.InventorySystem; + +namespace libsecondlife.TestClient +{ + public class InventoryCommand : Command + { + public InventoryCommand(TestClient testClient) + { + Name = "i"; + Description = "Prints out inventory."; + } + + public override string Execute(string[] args, LLUUID fromAgentID) + { + return "Broken until someone fixes me"; + + //Client.Inventory.DownloadInventory(); + //StringBuilder result = new StringBuilder(); + //PrintFolder(Client.Inventory.GetRootFolder(), result, 0); + //return result.ToString(); + } + + //void PrintFolder(InventoryFolder folder, StringBuilder output, int indenting) + //{ + // Indent(output, indenting); + // output.Append(folder.Name); + // output.Append("\n"); + // foreach (InventoryBase b in folder.GetContents()) + // { + // InventoryItem item = b as InventoryItem; + // if (item != null) + // { + // Indent(output, indenting + 1); + // output.Append(item.Name); + // output.Append("\n"); + // continue; + // } + // InventoryFolder subFolder = b as InventoryFolder; + // if (subFolder != null) + // PrintFolder(subFolder, output, indenting + 1); + // } + //} + + //void Indent(StringBuilder output, int indenting) + //{ + // for (int count = 0; count < indenting; count++) + // { + // output.Append(" "); + // } + //} + } +} \ No newline at end of file -- cgit v1.1