예제 #1
0
파일: ItemNode.cs 프로젝트: keutmann/SPM
 /// <summary>
 /// Invoked when the child items need to be loaded on demand.
 /// Subclasses can override this to populate the Children collection.
 /// </summary>
 public override void LoadChildren()
 {
     Children.Clear();
     if (NodeProvider != null)
     {
         foreach (SharpTreeNode node in NodeProvider.LoadChildren(this))
         {
             Children.Add(node);
         }
     }
 }
예제 #2
0
파일: SPTreeNode.cs 프로젝트: keutmann/SPM
        public override void LoadNodes()
        {
            base.LoadNodes();

            if (NodeProvider != null)
            {
                var nodes = NodeProvider.LoadChildren(this);

                //foreach (var childnode in )
                //{
                //    Nodes.Add(childnode);
                //}
            }
        }
예제 #3
0
        public virtual void LoadChildren()
        {
            if (SPObject != null)
            {
                ClearChildren();
                EnsureNodeTypes();
#if DEBUG
                var watch = new Stopwatch();
                watch.Start();
#endif
                Children.AddRange(NodeProvider.LoadChildren(this));

#if DEBUG
                watch.Stop();
                Trace.WriteLine(String.Format("Load Properties: Type:{0} - Time {1} milliseconds.",
                                              SPObjectType.Name, watch.ElapsedMilliseconds));
#endif
            }
        }
예제 #4
0
        public override void LoadChildren()
        {
            var nodes   = new List <ISPNode>(NodeProvider.LoadChildren(this));
            var folders = nodes.OfType <SPFolderCollectionNode>().FirstOrDefault();

            if (folders != null)
            {
                Children.AddRange(NodeProvider.LoadCollectionChildren(folders, int.MaxValue));
                nodes.Remove(folders);
            }

            var files = nodes.OfType <SPFileCollectionNode>().FirstOrDefault();

            if (files != null)
            {
                Children.AddRange(NodeProvider.LoadCollectionChildren(files, int.MaxValue));
                nodes.Remove(files);
            }

            Children.AddRange(nodes);
        }
예제 #5
0
 public virtual void LoadChildren()
 {
     Children.AddRange(NodeProvider.LoadChildren(this));
 }