Beispiel #1
0
        // JOEL JEFFERY 20110712
        /// <summary>
        /// Refreshes the node.
        /// </summary>
        /// <param name="node">The node.</param>
        private void refreshNode(TreeNode node)
        {
            node.Nodes.Clear();
            //if (e.Node.Nodes.Count == 1)
            {
                this.Refresh();
                //if (IsLoadingNode(e.Node.Nodes[0]) == true)
                {
                    ISPCFolder        folder     = (ISPCFolder)node.Tag;
                    IOutlookConnector connector  = OutlookConnector.GetConnector(folder.SiteSetting);
                    List <ISPCFolder> subFolders = connector.GetSubFolders(folder);
                    SPFoldersTreeView.BeginUpdate();
                    foreach (ISPCFolder subFolder in subFolders)
                    {
                        TreeNode folderNode = node.Nodes.Add(subFolder.Title);
                        folderNode.Tag = subFolder;
                        SetTreeNodeImage(folderNode);
                        AddLoadingNode(folderNode);
                    }
                    SPFoldersTreeView.EndUpdate();

                    //if (IsLoadingNode(e.Node.Nodes[0]) == true)
                    //    e.Node.Nodes.RemoveAt(0);
                }
            }
            this.SaveState();
        }
Beispiel #2
0
        private void LoadWebs(TreeNode node, string webUrl, EUSiteSetting siteSetting)
        {
            SPFoldersTreeView.BeginUpdate();
            List <EUWeb> webs = SharePointManager.GetWebs(webUrl, siteSetting);

            foreach (EUWeb web in webs)
            {
                TreeNode webNode = node.Nodes.Add(web.Title);
                webNode.Tag = web;
                SetTreeNodeImage(webNode);
                AddLoadingNode(webNode);
            }
            SPFoldersTreeView.EndUpdate();
        }