コード例 #1
0
ファイル: SPNodeProvider.cs プロジェクト: lucaslra/SPM
        public ISPNode FindDefaultNode(ISPNode node)
        {
            ISPNode result = null;
            if (node.SPObjectType != null)
            {
                Type spType = null;

                var attr = node.SPObjectType.GetAttribute<ClientCallableTypeAttribute>(true);
                if (attr != null)
                {
                    spType = attr.CollectionChildItemType;
                }

                if (spType == null)
                {
                    Type[] argTypes = node.SPObjectType.GetBaseGenericArguments();
                    if (argTypes != null && argTypes.Length == 1)
                    {
                        spType = argTypes[0];
                    }
                }

                if (spType != null && node.NodeTypes.ContainsKey(spType))
                {
                    result = node.NodeTypes[spType];
                }
            }

            return result;
        }
コード例 #2
0
ファイル: TreeViewNodeProvider.cs プロジェクト: lucaslra/SPM
        public SPTreeNode Load(ISPNode spNode)
        {
            var root = SPTreeNode.Create(this, spNode);
            LoadTreeNodes(root);

            return root;
        }
コード例 #3
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            try
            {
                if (this.Definition != null)
                {
                    this.Text        = this.Definition.GetTitle(CultureInfo.CurrentUICulture);
                    this.ToolTipText = this.Definition.GetDescription(CultureInfo.CurrentUICulture);

                    UpdateIconUri();

                    if (this.Definition.Hidden)
                    {
                        this.Text += " (Hidden)";
                        this.State = "Gray";
                    }
                }
                else
                {
                    this.IconUri = SharePointContext.GetImagePath("ERRSM.GIF");
                    this.Text    = string.Format("(Error: Missing definition {0})", this.Feature.DefinitionId);
                }
            }
            catch (Exception ex)
            {
                this.IconUri     = SharePointContext.GetImagePath("error16by16.gif");
                this.Text        = "(Error: Feature missing)";
                this.ToolTipText = ex.Message;
            }
        }
コード例 #4
0
        public ISPNode FindDefaultNode(ISPNode node)
        {
            ISPNode result = null;

            if (node.SPObjectType != null)
            {
                Type spType = null;

                var attr = node.SPObjectType.GetAttribute <ClientCallableTypeAttribute>(true);
                if (attr != null)
                {
                    spType = attr.CollectionChildItemType;
                }

                if (spType == null)
                {
                    Type[] argTypes = node.SPObjectType.GetBaseGenericArguments();
                    if (argTypes != null && argTypes.Length == 1)
                    {
                        spType = argTypes[0];
                    }
                }

                if (spType != null && node.NodeTypes.ContainsKey(spType))
                {
                    result = node.NodeTypes[spType];
                }
            }

            return(result);
        }
コード例 #5
0
        public IEnumerable <ISPNode> LoadUnorderedChildren(ISPNode sourceNode)
        {
            var list = new List <ISPNode>();
            PropertyDescriptorCollection propertyDescriptors = TypeDescriptor.GetProperties(sourceNode.SPObjectType);

            try
            {
                // ReSharper disable LoopCanBeConvertedToQuery
                foreach (PropertyDescriptor info in propertyDescriptors)
                {
                    if (sourceNode.NodeTypes.ContainsKey(info.PropertyType))
                    {
                        ISPNode node = sourceNode.NodeTypes[info.PropertyType];

                        //Ensure that the child node instance is unique in the TreeView
                        node = Create(info.DisplayName, node.GetType(), sourceNode.SPObject);
                        list.Add(node);
                        //yield return node;
                    }
                }
                // ReSharper restore LoopCanBeConvertedToQuery
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            return(list);
        }
コード例 #6
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Text   = "ContentTypeUsages";
            ToolTipText = this.GetType().Name;
        }
コード例 #7
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Text = "ContentTypeUsages";
            ToolTipText = this.GetType().Name;
        }
コード例 #8
0
ファイル: SPMoreNode.cs プロジェクト: lucaslra/SPM
        public static SPTreeNode Create(ITreeViewNodeProvider provider, ISPNode spNode)
        {
            var node = new SPMoreNode(spNode);
            node.NodeProvider = provider;

            return node;
        }
コード例 #9
0
ファイル: SPFileCollectionNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if(SPObject != null)
                Text += String.Format(" ({0})", FileCollection.Count);
        }
コード例 #10
0
ファイル: TreeViewNodeProvider.cs プロジェクト: keutmann/SPM
        public SPTreeNode Load(ISPNode spNode)
        {
            var root = SPTreeNode.Create(this, spNode);

            LoadTreeNodes(root);

            return(root);
        }
コード例 #11
0
ファイル: SPFormNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Text = this.Form.Url.Substring(this.Form.Url.LastIndexOf("/") + 1);
            this.ToolTipText = this.Form.Url;
            this.Url = this.Form.ParentList.ParentWeb.Url + "/" + this.Form.Url;
        }
コード例 #12
0
        public static SPTreeNode Create(ITreeViewNodeProvider provider, ISPNode spNode)
        {
            var node = new SPMoreNode(spNode);

            node.NodeProvider = provider;

            return(node);
        }
コード例 #13
0
ファイル: SPFormNode.cs プロジェクト: keutmann/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Text        = this.Form.Url.Substring(this.Form.Url.LastIndexOf("/") + 1);
            this.ToolTipText = this.Form.Url;
            this.Url         = this.Form.ParentList.ParentWeb.Url + "/" + this.Form.Url;
        }
コード例 #14
0
 public override void Setup(ISPNode parent)
 {
     base.Setup(parent);
     if (this.SPObject != null)
     {
         this.Text = this.Web.Title;
         this.Url  = this.Web.Url;
     }
 }
コード例 #15
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (SPObject != null)
            {
                Text += String.Format(" ({0})", FileCollection.Count);
            }
        }
コード例 #16
0
ファイル: SPPropertyBagNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Text = this.Entry.Key.ToString();

            // Remove the "Expand" icon from the Property, because the will never be children to this object.
            //this.IsExpanded = true;
        }
コード例 #17
0
ファイル: SPWebNode.cs プロジェクト: lucaslra/SPM
 public override void Setup(ISPNode parent)
 {
     base.Setup(parent);
     if (this.SPObject != null)
     {
         this.Text = this.Web.Title;
         this.Url = this.Web.Url;
     }
 }
コード例 #18
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Text = this.Entry.Key.ToString();

            // Remove the "Expand" icon from the Property, because the will never be children to this object.
            //this.IsExpanded = true;
        }
コード例 #19
0
        private ISPNode CreateCollectionNode(ISPNodeCollection parentNode, Type spObejctType)
        {
            ISPNode node = CreateNodeOrDefault(spObejctType.FullName);

            if (node == null)
            {
                node = FindDefaultNode(parentNode, spObejctType);
            }
            return(node);
        }
コード例 #20
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (FieldTypeDefinition != null)
            {
                Text        = FieldTypeDefinition.TypeDisplayName;
                ToolTipText = FieldTypeDefinition.TypeShortDescription;
            }
        }
コード例 #21
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (FieldTypeDefinition != null)
            {
                Text = FieldTypeDefinition.TypeDisplayName;
                ToolTipText = FieldTypeDefinition.TypeShortDescription;
            }
        }
コード例 #22
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (this.ContentType.Hidden)
            {
                this.Text  = this.Text + " (Hidden)";
                this.State = "Gray";
            }
        }
コード例 #23
0
ファイル: SPContentTypeNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (this.ContentType.Hidden)
            {
                this.Text = this.Text + " (Hidden)";
                this.State = "Gray";
            }
        }
コード例 #24
0
ファイル: StringNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            var val = this.SPObject as string;
            if (!String.IsNullOrEmpty(val))
            {
                Text += " ("+val+")";
            }
        }
コード例 #25
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            Text = this.SPObject as string;
            if (String.IsNullOrEmpty(Text))
            {
                Text = "(Empty)";
            }
        }
コード例 #26
0
ファイル: ItemNode.cs プロジェクト: keutmann/SPM
        public static IItemNode Create(ITreeViewNodeProvider provider, ISPNode spNode)
        {
            var node = new ItemNode
            {
                NodeProvider = provider,
                SPNode       = spNode
            };

            return(node);
        }
コード例 #27
0
ファイル: StringNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            Text = this.SPObject as string;
            if (String.IsNullOrEmpty(Text))
            {
                Text = "(Empty)";
            }
        }
コード例 #28
0
ファイル: StringNode.cs プロジェクト: keutmann/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            var val = this.SPObject as string;

            if (!String.IsNullOrEmpty(val))
            {
                Text += " (" + val + ")";
            }
        }
コード例 #29
0
ファイル: SPFarmNode.cs プロジェクト: keutmann/SPM
 public override void Setup(ISPNode parent)
 {
     base.Setup(parent);
     if (String.IsNullOrEmpty(this.Url))
     {
         var webapp = SPAdministrationWebApplication.Local;
         if (webapp.Sites.Count > 0)
         {
             this.Url = webapp.Sites["/"].Url;
         }
     }
 }
コード例 #30
0
ファイル: SPFarmNode.cs プロジェクト: lucaslra/SPM
 public override void Setup(ISPNode parent)
 {
     base.Setup(parent);
     if (String.IsNullOrEmpty(this.Url))
     {
         var webapp = SPAdministrationWebApplication.Local;
         if (webapp.Sites.Count > 0)
         {
             this.Url = webapp.Sites["/"].Url;
         }
     }
 }
コード例 #31
0
ファイル: MainWindow.xaml.cs プロジェクト: keutmann/SPM
 private void SelectObject(object obj)
 {
     FirstTextBlock.Text = string.Empty;
     if (obj != null && obj is ISPNode)
     {
         ISPNode node = (ISPNode)obj;
         string  name = node.SPObjectType.Name;
         if (FirstTextBlock.Text != name)
         {
             FirstTextBlock.Text = node.SPObjectType.Name;
         }
     }
 }
コード例 #32
0
ファイル: SPFileNode.cs プロジェクト: keutmann/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (File != null)
            {
                if (this.File.Url.EndsWith(".aspx", StringComparison.OrdinalIgnoreCase))
                {
                    this.Url = SPUrlUtility.CombineUrl(this.File.ParentFolder.ParentWeb.Url, this.File.Url);
                }
                this.IconUri = SharePointContext.GetImagePath(this.File.IconUrl);
                this.Text    = this.File.Name;
            }
        }
コード例 #33
0
ファイル: SPFileNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (File != null)
            {
                if (this.File.Url.EndsWith(".aspx", StringComparison.OrdinalIgnoreCase))
                {
                    this.Url = SPUrlUtility.CombineUrl(this.File.ParentFolder.ParentWeb.Url, this.File.Url);
                }
                this.IconUri = SharePointContext.GetImagePath(this.File.IconUrl);
                this.Text = this.File.Name;
            }
        }
コード例 #34
0
ファイル: SPWebPartNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            string title = this.ASPWebPart.Title;
            if (title.Length == 0)
            {
                title = this.ASPWebPart.GetType().Name;
            }
            this.Text = title;

            this.ToolTipText = this.ASPWebPart.Description;

            this.IconUri = SharePointContext.TemplatePath + ASPWebPart.CatalogIconImageUrl;
        }
コード例 #35
0
        public static void Initialize(this ISPNode node, PropertyDescriptor descriptor, ISPNode parent, object spObject, int index)
        {
            if (descriptor == null)
                throw new ArgumentNullException("descriptor");

            node.Parent = parent;
            node.NodeProvider = parent.NodeProvider;
            //node.ID = (spObject != null) ? GetCollectionItemID(spObject, index) : descriptor.GetHashCode().ToString();

            node.ParentPropertyDescriptor = descriptor;
            node.Index = index;
            node.SPObject = spObject;

            //node.Setup(parent);
        }
コード例 #36
0
ファイル: ISPNodeExtensions.cs プロジェクト: lucaslra/SPM
        public static void Initialize(this ISPNode node, PropertyDescriptor descriptor, ISPNode parent, object spObject, int index)
        {
            if (descriptor == null)
                throw new ArgumentNullException("descriptor");

            node.Parent = parent;
            node.NodeProvider = parent.NodeProvider;
            //node.ID = (spObject != null) ? GetCollectionItemID(spObject, index) : descriptor.GetHashCode().ToString();

            node.ParentPropertyDescriptor = descriptor;
            node.Index = index;
            node.SPObject = spObject;

            //node.Setup(parent);
        }
コード例 #37
0
ファイル: SPListNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            string title = (String.IsNullOrEmpty(this.List.Title)) ? this.List.ID.ToString() : this.List.Title;
            this.Text = String.Format("{0} ({1})", title, this.List.ItemCount);

            if (this.List.Hidden)
            {
                this.State = "Gray";
            }

            this.Url = SPUtility.GetFullUrl(List.ParentWeb.Site, List.DefaultViewUrl);

            this.IconUri = GetIconUri(this.List.ImageUrl);
        }
コード例 #38
0
ファイル: SPNodeProvider.cs プロジェクト: lucaslra/SPM
        public Dictionary<Type, ISPNode> GetChildrenTypes(ISPNode parentNode)
        {
            IEnumerable<Lazy<SPNode>> importedNodes = CompositionProvider.GetExports<SPNode>(parentNode.Descriptor.ClassType);
            var types = new Dictionary<Type, ISPNode>();
            foreach (var lazyItem in importedNodes)
            {
                SPNode node = lazyItem.Value;
                node.NodeProvider = parentNode.NodeProvider;

                if (node.Descriptor.AdapterItemType != null)
                {
                    types.AddOrReplace(node.Descriptor.AdapterItemType, node);
                }
            }
            return types;
        }
コード例 #39
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            string title = this.ASPWebPart.Title;

            if (title.Length == 0)
            {
                title = this.ASPWebPart.GetType().Name;
            }
            this.Text = title;

            this.ToolTipText = this.ASPWebPart.Description;

            this.IconUri = SharePointContext.TemplatePath + ASPWebPart.CatalogIconImageUrl;
        }
コード例 #40
0
        public IEnumerable <ISPNode> LoadUnorderedChildren(ISPNode sourceNode)
        {
            var list = new List <ISPNode>();

            if (sourceNode.SPObject == null)
            {
                return(list);
            }

            ISPNode node = null;

            var propertyDescriptors = TypeDescriptor.GetProperties(sourceNode.SPObjectType);

            try
            {
                foreach (PropertyDescriptor descriptor in propertyDescriptors)
                {
                    node = CreateNodeOrDefault(descriptor.PropertyType.FullName);
                    if (node == null)
                    {
                        continue;
                    }

                    node.Initialize(descriptor, sourceNode, null, list.Count);

                    if (node.SPObject == null)
                    {
                        continue;
                    }

                    node.Setup(sourceNode);

                    // Exclude the node if it do not match the correct view
                    if (!RunIncludeRules(node))
                    {
                        continue;
                    }

                    list.Add(node);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + " : " + node.GetType().FullName + " : " + ex.StackTrace);
            }
            return(list);
        }
コード例 #41
0
ファイル: SPListNode.cs プロジェクト: keutmann/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            string title = (String.IsNullOrEmpty(this.List.Title)) ? this.List.ID.ToString() : this.List.Title;

            this.Text = String.Format("{0} ({1})", title, this.List.ItemCount);

            if (this.List.Hidden)
            {
                this.State = "Gray";
            }

            this.Url = SPUtility.GetFullUrl(List.ParentWeb.Site, List.DefaultViewUrl);

            this.IconUri = GetIconUri(this.List.ImageUrl);
        }
コード例 #42
0
        public Dictionary <Type, ISPNode> GetChildrenTypes(ISPNode parentNode)
        {
            IEnumerable <Lazy <SPNode> > importedNodes = CompositionProvider.GetExports <SPNode>(parentNode.Descriptor.ClassType);
            var types = new Dictionary <Type, ISPNode>();

            foreach (var lazyItem in importedNodes)
            {
                SPNode node = lazyItem.Value;
                node.NodeProvider = parentNode.NodeProvider;

                if (node.Descriptor.AdapterItemType != null)
                {
                    types.AddOrReplace(node.Descriptor.AdapterItemType, node);
                }
            }
            return(types);
        }
コード例 #43
0
ファイル: SPDocumentLibraryNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (this.SPObject == null) return;

            string title = (String.IsNullOrEmpty(this.DocumentLibrary.Title)) ? this.DocumentLibrary.ID.ToString() : this.DocumentLibrary.Title;
            this.Text = String.Format("{0} ({1})", title, this.DocumentLibrary.ItemCount);

            if (this.DocumentLibrary.Hidden)
            {
                this.State = "Gray";
            }

            this.Url = SPUtility.GetFullUrl(this.DocumentLibrary.ParentWeb.Site, this.DocumentLibrary.DefaultViewUrl);

            this.IconUri = SPListNode.GetIconUri(this.DocumentLibrary.ImageUrl);
        }
コード例 #44
0
        private SPSite GetSite(SPNode node)
        {
            SPSite  result = null;
            ISPNode temp   = node;

            if (temp.SPObjectType == typeof(SPSite))
            {
                result = temp.SPObject as SPSite;
            }
            else
            {
                if (temp.Parent != null)
                {
                    result = GetSite(temp.Parent as SPNode);
                }
            }
            return(result);
        }
コード例 #45
0
        public virtual void Setup(ISPNode parent)
        {
            if (parent == null)
            {
                return;
            }

            Parent       = parent;
            NodeProvider = parent.NodeProvider;

            if (ParentPropertyDescriptor == null)
            {
                ParentPropertyDescriptor = new NullPropertyDescriptor(parent);
            }

            if (String.IsNullOrEmpty(ID))
            {
                if (parent is ISPNodeCollection && SPObject != null)
                {
                    ID = GetCollectionItemID(SPObject, Index);
                }
                else
                {
                    ID = ParentPropertyDescriptor.GetHashCode().ToString();
                }
            }

            var tempText = GetTitle();

            Text = tempText;
            //ToolTipText = tempText;

            // Make sure to update all children if exist!
            foreach (var item in Children)
            {
                item.Setup(this);
                if (item.Children.Count > 0)
                {
                    item.LoadChildren();
                }
            }
        }
コード例 #46
0
ファイル: SPTreeNode.cs プロジェクト: lucaslra/SPM
        public SPTreeNode(ISPNode modelNode)
        {
            Model = modelNode;
            this._spObject = () => Model.SPObject;
            this.DefaultExpand = false;

            int index = Program.Window.Explorer.AddImage(Model.IconUri);
            this.ImageIndex = index;
            this.SelectedImageIndex = index;

            this.DataBindings.Add("Text", Model, "Text");
            this.DataBindings.Add("ToolTipText", Model, "ToolTipText");
            this.DataBindings.Add("BrowserUrl", Model, "Url");
            this.Name = (Model.SPObjectType != null) ? Model.SPObjectType.FullName : Model.GetType().FullName;

            if (Model.HasChildren())
            {
                this.Nodes.Add(new ExplorerNodeBase("Dummy"));
            }
        }
コード例 #47
0
        private void SetObject()
        {
            if (this.IsWindowVisible)
            {
                ISPNode node = (ISPNode)this.SelectedObject;
                if (node != null)
                {
                    Uri nodeUrl = null;
                    if (!String.IsNullOrEmpty(node.Url))
                    {
                        nodeUrl = new Uri(node.Url);
                    }

                    if ((nodeUrl == null && this.LastSelectedUri != null) || nodeUrl != this.LastSelectedUri)
                    {
                        this.LastSelectedUri = nodeUrl;
                        this.BrowserContainer.Browser.Url = nodeUrl;
                    }
                }
            }
        }
コード例 #48
0
ファイル: SPTreeNode.cs プロジェクト: keutmann/SPM
        public SPTreeNode(ISPNode modelNode)
        {
            Model              = modelNode;
            this._spObject     = () => Model.SPObject;
            this.DefaultExpand = false;

            int index = Program.Window.Explorer.AddImage(Model.IconUri);

            this.ImageIndex         = index;
            this.SelectedImageIndex = index;

            this.DataBindings.Add("Text", Model, "Text");
            this.DataBindings.Add("ToolTipText", Model, "ToolTipText");
            this.DataBindings.Add("BrowserUrl", Model, "Url");
            this.Name = (Model.SPObjectType != null) ? Model.SPObjectType.FullName : Model.GetType().FullName;

            if (Model.HasChildren())
            {
                this.Nodes.Add(new ExplorerNodeBase("Dummy"));
            }
        }
コード例 #49
0
ファイル: SPDocumentLibraryNode.cs プロジェクト: keutmann/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            if (this.SPObject == null)
            {
                return;
            }

            string title = (String.IsNullOrEmpty(this.DocumentLibrary.Title)) ? this.DocumentLibrary.ID.ToString() : this.DocumentLibrary.Title;

            this.Text = String.Format("{0} ({1})", title, this.DocumentLibrary.ItemCount);

            if (this.DocumentLibrary.Hidden)
            {
                this.State = "Gray";
            }

            this.Url = SPUtility.GetFullUrl(this.DocumentLibrary.ParentWeb.Site, this.DocumentLibrary.DefaultViewUrl);

            this.IconUri = SPListNode.GetIconUri(this.DocumentLibrary.ImageUrl);
        }
コード例 #50
0
ファイル: SPNodeCollection.cs プロジェクト: keutmann/SPM
        public override void LoadChildren()
        {
            if (SPObject == null)
            {
                return;
            }

            if (Children.Count > 0)
            {
                // Ensure that the last node is the "MoreNode".
                int     nodeIndex = Children.Count - 1;
                ISPNode node      = Children[nodeIndex];

                if (node is MoreNode)
                {
                    // Remove the "MoreNode" from this.Children.
                    Children.RemoveAt(nodeIndex);
                }
            }
            else
            {
                ClearChildren();
                EnsureNodeTypes();
            }
#if DEBUG
            var watch = new Stopwatch();
            watch.Start();
#endif
            // Load the next batch!
            Children.AddRange(NodeProvider.LoadCollectionChildren(this));

#if DEBUG
            watch.Stop();
            Trace.WriteLine(String.Format("Load Properties: Type:{0} - Time {1} milliseconds.",
                                          SPObjectType.Name, watch.ElapsedMilliseconds));
#endif
        }
コード例 #51
0
ファイル: SPMoreNode.cs プロジェクト: lucaslra/SPM
 public SPMoreNode(ISPNode modelNode)
     : base(modelNode)
 {
     this.Text = "More...";
 }
コード例 #52
0
 public override void Setup(ISPNode parent)
 {
     base.Setup(parent);
     this.Text = ContentTypeUsage.Url;
 }
コード例 #53
0
 public NullPropertyDescriptor(ISPNode parent)
     : this(parent.Text)
 {
 }
コード例 #54
0
ファイル: ItemNode.cs プロジェクト: lucaslra/SPM
 public static IItemNode Create(ITreeViewNodeProvider provider, ISPNode spNode)
 {
     var node = new ItemNode
                    {
                        NodeProvider =  provider,
                        SPNode = spNode
                    };
     return node;
 }
コード例 #55
0
 public override void Setup(ISPNode parent)
 {
     base.Setup(parent);
 }
コード例 #56
0
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            Text = "IisSettings";
        }
コード例 #57
0
ファイル: SPFeatureNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            try
            {
                if(this.Definition != null)
                {
                    this.Text = this.Definition.GetTitle(CultureInfo.CurrentUICulture);
                    this.ToolTipText = this.Definition.GetDescription(CultureInfo.CurrentUICulture);

                    UpdateIconUri();

                    if (this.Definition.Hidden)
                    {
                        this.Text += " (Hidden)";
                        this.State = "Gray";
                    }
                }
                else
                {
                    this.IconUri = SharePointContext.GetImagePath("ERRSM.GIF");
                    this.Text = string.Format("(Error: Missing definition {0})", this.Feature.DefinitionId);
                }
            }
            catch (Exception ex)
            {

                this.IconUri = SharePointContext.GetImagePath("error16by16.gif");
                this.Text = "(Error: Feature missing)";
                this.ToolTipText = ex.Message;
            }
        }
コード例 #58
0
ファイル: SPListCollectionNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Url =  SPUrlUtility.CombineUrl( this.ListCollection.Web.Url, "_layouts/15/viewlsts.aspx");
        }
コード例 #59
0
ファイル: SPViewNode.cs プロジェクト: lucaslra/SPM
        public override void Setup(ISPNode parent)
        {
            base.Setup(parent);

            this.Url = SPUrlUtility.CombineUrl(View.ParentList.ParentWeb.Url, View.Url);
        }
コード例 #60
0
 public override void Setup(ISPNode parent)
 {
     base.Setup(parent);
     this.Text = "WebParts";
     this.IconUri = SharePointContext.GetImagePath("itgen.GIF");
 }