Exemplo n.º 1
0
        private TreeNode drawObject(IWorldObject obj)
        {
            var objectNode = new TreeNode();

            if (obj != null)
            {
                objectNode.Text = obj.ToString();
                foreach (var r in (obj as WorldObject).Relations)
                {
                    var rNode = drawObject(r as RelationObject);
                    var objec = drawObject(r.Objective as WorldObject);
                    rNode.Nodes.Add(objec);
                    objectNode.Nodes.Add(rNode);
                }
            }
            else
            {
                objectNode.Text = "null object";
            }
            return(objectNode);
        }