Esempio n. 1
0
        private void LoadLists(TreeNode node, string webUrl, EUSiteSetting siteSetting)
        {
            SPFoldersTreeView.BeginUpdate();
            List <EUList> lists = SharePointManager.GetLists(webUrl, siteSetting);

            foreach (EUList list in lists)
            {
                if (
                    (list.ServerTemplate == 101 || list.ServerTemplate == 100 || list.BaseType == 1) && //or BaseType == 1 - JOEL JEFFERY 20110708
                    list.Hidden == false
                    )
                {
                    TreeNode listNode = node.Nodes.Add(list.Title);
                    listNode.Tag = list;
                    SetTreeNodeImage(listNode);
                    AddLoadingNode(listNode);

                    //                    TreeNode rootFolderNode = listNode.Nodes.Add(list.RootFolder.Title);
                    //                    rootFolderNode.Tag = list.RootFolder;
                    //                    SetTreeNodeImage(rootFolderNode);
                    //                    AddLoadingNode(rootFolderNode);
                    if (list.ServerTemplate == 101)
                    {
                    }
                }
            }
            SPFoldersTreeView.EndUpdate();
        }
Esempio n. 2
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();
        }
Esempio n. 3
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();
        }