protected static ObjectListNode AddObjectListNode ( TreeNode parentNode, string title, IEnumerable <UObject> objects, string imageName = "TreeView" ) { if (objects == null) { return(null); } var uObjects = objects as List <UObject> ?? objects.ToList(); if (uObjects.Any()) { var listNode = new ObjectListNode(imageName) { Text = title }; foreach (var obj in uObjects) { AddObjectNode(listNode, obj); } parentNode.Nodes.Add(listNode); return(listNode); } return(null); }
protected override void PostAddChildren( TreeNode node ) { if( Properties == null || Properties.Count <= 0 ) return; var defNode = new ObjectListNode { Text = "Default Values", ImageKey = "UDefaultProperty", SelectedImageKey = "UDefaultProperty" }; node.Nodes.Add( defNode ); foreach( var def in Properties ) { var objN = new DefaultObjectNode( def ){Text = def.Name}; defNode.Nodes.Add( objN ); } }
protected override void PostAddChildren(TreeNode node) { if (Properties == null || Properties.Count <= 0) { return; } var defNode = new ObjectListNode { Text = "Default Values", ImageKey = "UDefaultProperty", SelectedImageKey = "UDefaultProperty" }; node.Nodes.Add(defNode); foreach (var def in Properties) { var objN = new DefaultObjectNode(def) { Text = def.Name }; defNode.Nodes.Add(objN); } }
protected static ObjectListNode AddObjectListNode ( TreeNode parentNode, string title, IEnumerable<UObject> objects, string imageName = "TreeView" ) { if( objects == null ) return null; var uObjects = objects as List<UObject> ?? objects.ToList(); if( uObjects.Any() ) { var listNode = new ObjectListNode( imageName ){Text = title}; foreach( var obj in uObjects ) { AddObjectNode( listNode, obj ); } parentNode.Nodes.Add( listNode ); return listNode; } return null; }