public void contributeToTreeView(TreeView treeView) { TreeNode rootNode = new TreeNode(this.GetType().Name); rootNode.Expand(); rootNode.Nodes.Add("shopVendorID = " + Utility.FormatGuid(shopVendorID)); TreeNode shopVendorProfileNode = rootNode.Nodes.Add("shopVendorProfile = "); shopVendorProfile.contributeToTreeNode(shopVendorProfileNode); TreeNode shopItemProfilesNode = rootNode.Nodes.Add("shopItemProfileList = "); for (int i = 0; i < shopItemProfileList.list.Count; i++) { TreeNode itemProfileNode = shopItemProfilesNode.Nodes.Add("itemProfile = "); ItemProfile thisProfile = shopItemProfileList.list[i]; thisProfile.contributeToTreeNode(itemProfileNode); } treeView.Nodes.Add(rootNode); }
public override void contributeToTreeView(TreeView treeView) { TreeNode rootNode = new TreeNode(this.GetType().Name); rootNode.Expand(); ContextInfo.AddToList(new ContextInfo { DataType = DataType.ServerToClientHeader }); rootNode.Nodes.Add("shopVendorID = " + Utility.FormatHex(shopVendorID)); ContextInfo.AddToList(new ContextInfo { DataType = DataType.ObjectID }); TreeNode shopVendorProfileNode = rootNode.Nodes.Add("shopVendorProfile = "); ContextInfo.AddToList(new ContextInfo { Length = shopVendorProfile.Length }, updateDataIndex: false); shopVendorProfile.contributeToTreeNode(shopVendorProfileNode); TreeNode shopItemProfilesNode = rootNode.Nodes.Add("shopItemProfileList = "); ContextInfo.AddToList(new ContextInfo { Length = shopItemProfileList.Length }, updateDataIndex: false); // Skip PList count dword ContextInfo.DataIndex += 4; for (int i = 0; i < shopItemProfileList.list.Count; i++) { TreeNode itemProfileNode = shopItemProfilesNode.Nodes.Add("itemProfile = "); ItemProfile thisProfile = shopItemProfileList.list[i]; ContextInfo.AddToList(new ContextInfo { Length = thisProfile.Length }, updateDataIndex: false); thisProfile.contributeToTreeNode(itemProfileNode); } treeView.Nodes.Add(rootNode); }