internal static ColumsRootTreeViewNode CreateTreeViewNode(SPMetalParameters.PRColumn[] pRColumn)
        {
            ColumsRootTreeViewNode _ret = new ColumsRootTreeViewNode();

            _ret.Items = new ObservableCollection <TreeViewNode>(ColumnTreeViewNode.CreateTreeViewNodes(pRColumn).Cast <TreeViewNode>());
            return(_ret);
        }
Esempio n. 2
0
        internal static ContentTypeTreeViewNode CreateTreeViewNode(PRContentType prContentType)
        {
            ContentTypeTreeViewNode _ret = new ContentTypeTreeViewNode(prContentType)
            {
                Header = String.Format("ContentType: {0}, Id={1}", prContentType.Name, prContentType.ContentTypeId)
            };

            _ret.Items = new ObservableCollection <TreeViewNode>();
            if (prContentType.BaseContentType != null)
            {
                ContentTypeTreeViewNode _baseContentTyoe = ContentTypeTreeViewNode.CreateTreeViewNode(prContentType.BaseContentType);
                _ret.Items.Add(_baseContentTyoe);
            }
            foreach (ColumnTreeViewNode _columnX in ColumnTreeViewNode.CreateTreeViewNodes(prContentType.Column))
            {
                _ret.Items.Add(_columnX);
            }
            return(_ret);
        }