Esempio n. 1
0
 /// <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);
         }
     }
 }
Esempio n. 2
0
        public override void LoadNodes()
        {
            base.LoadNodes();

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

                //foreach (var childnode in )
                //{
                //    Nodes.Add(childnode);
                //}
            }
        }
Esempio n. 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
            }
        }
Esempio n. 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);
        }
Esempio n. 5
0
 public virtual void LoadChildren()
 {
     Children.AddRange(NodeProvider.LoadChildren(this));
 }