internal static WebsiteTreeViewNode CreateChildren(PRWeb parent, string url) { WebsiteTreeViewNode _ret = new WebsiteTreeViewNode(parent, url); _ret.Items = new ObservableCollection <TreeViewNode>(); _ret.Items.Add(ListRootTreeViewNode.CreateTreeViewNode(parent.List)); _ret.Items.Add(ContentTypeRootTreeViewNode.CreateTreeViewNode(parent.ContentType.OrderBy <PRContentType, string>(_pctx => _pctx.Name).ToArray <PRContentType>())); _ret.Items.Add(ColumsRootTreeViewNode.CreateTreeViewNode(parent.SharePointColumns)); return(_ret); }
internal static ContentTypeRootTreeViewNode CreateTreeViewNode(SPMetalParameters.PRContentType[] value) { ContentTypeRootTreeViewNode _ret = new ContentTypeRootTreeViewNode(); if (value != null) { _ret.Items = new ObservableCollection <TreeViewNode>(value.AsEnumerable <PRContentType>().Select <PRContentType, TreeViewNode>(x => ContentTypeTreeViewNode.CreateTreeViewNode(x))); } return(_ret); }
private static ListTreeViewNode CreateTreeViewNode(PRList parent) { ListTreeViewNode _ret = new ListTreeViewNode(parent) { Header = parent.Name, }; _ret.Items = new ObservableCollection <TreeViewNode>(); _ret.Items.Add(ContentTypeRootTreeViewNode.CreateTreeViewNode(parent.ContentType)); return(_ret); }