public TreeNode ParseCJournalQuestObjectiveChild(CArray childs) { var result = new TreeNode("Details"); foreach (var child in childs.Cast <CPtr>()) { switch (child.PtrTarget.Type) { case "CJournalQuestMapPin": { var pinnode = new TreeNode("Map pin"); pinnode.Nodes.Add(new TreeNode("Name: " + child.PtrTarget.GetVariableByName("mapPinID"))); pinnode.Nodes.Add(new TreeNode("Radius: " + child.PtrTarget.GetVariableByName("radius"))); result.Nodes.Add(pinnode); break; } } } return(result); }