Exemple #1
0
 void UpdateTreeListButtons(ASPxTreeList treeList)
 {
     if (treeList.FocusedNode != null)
     {
         TreeListNodeCollection siblingNodes = (treeList.FocusedNode.ParentNode == null) ? treeList.Nodes : treeList.FocusedNode.ParentNode.ChildNodes;
         treeList.JSProperties["cpbtMoveUp_Enabled"]   = !((int)treeList.FocusedNode.GetValue("SortIndex") == 0);
         treeList.JSProperties["cpbtMoveDown_Enabled"] = !((int)treeList.FocusedNode.GetValue("SortIndex") == (siblingNodes.Count - 1));
     }
 }
Exemple #2
0
        private void RecurseFocus(TreeListNodeCollection children)
        {
            foreach (GoalNode node in children)
            {
                Core.KeepData.SafeAdd(node.Goal.Person, true);

                RecurseFocus(node.Nodes);
            }
        }
Exemple #3
0
 private void GetAllChildNode(TreeListNodeCollection ChildList, ref List <DM_DVQLY> lstOrganization)
 {
     for (int i = 0; i < ChildList.Count; i++)
     {
         lstOrganization.Add((DM_DVQLY)ChildList[i].DataItem);
         if (ChildList[i].HasChildren)
         {
             GetAllChildNode(ChildList[i].ChildNodes, ref lstOrganization);
         }
     }
 }
 private void UpdateNodes(TreeListNodeCollection nodes)
 {
     foreach (TreeListNode node in nodes)
     {
         UpdateNode(node);
         if (node.HasChildren)
         {
             UpdateNodes(node.ChildNodes);
         }
     }
 }
        protected void AttachItems(TreeListNodeCollection nodes)
        {
            TreeListNodeIterator iterator = new TreeListNodeIterator(nodes);

            while (iterator.MoveNext())
            {
                this.SubscribeObject(iterator.Current.Content);
                if (iterator.Current.HasChildren)
                {
                    this.AttachItems(iterator.Current.Nodes);
                }
            }
        }
        public PropertyCollection(PropertyRegister register, TreeListNodeCollection parentNodes)
        {
            if (register == null)
            {
                throw new ArgumentNullException("register");
            }

            if (parentNodes == null)
            {
                throw new ArgumentNullException("parentNodes");
            }

            _register    = register;
            _parentNodes = parentNodes;
            _properties  = new Dictionary <PropertyDefinition, TreeListNode>();
        }
        protected TreeListNode FindNodeByValue(object obj, TreeListNodeCollection nodes)
        {
            TreeListNode         result   = null;
            TreeListNodeIterator iterator = new TreeListNodeIterator(nodes);

            while (iterator.MoveNext() && result == null)
            {
                if (iterator.Current.Content == obj)
                {
                    result = iterator.Current;
                }
                if (result == null && iterator.Current.HasChildren)
                {
                    result = this.FindNodeByValue(obj, iterator.Current.Nodes);
                }
            }

            return(result);
        }
        private void _CheckForNodes(TreeListNodeCollection colItems)
        {
            bool bExistsJobs;

            foreach (TreeListNode tlnServer in colItems)
            {
                NodeData ndp = m_tlnProfile.Tag as NodeData;
                NodeData nds = tlnServer.Tag as NodeData;

                bExistsJobs = JobQueueCheck.ExistsCopyJobs(ndp.Type, nds.Data1, ndp.Data2);

                tlnServer.SubItems[4].Caption = bExistsJobs.ToString();

                tlnServer.ImageIndex = _GetPictureIndex(tlnServer);

                // call recursiv
                _CheckForNodes(tlnServer.Nodes);
            }

            tlcServer.Invalidate();
        }
Exemple #9
0
        private void AddPostNode(TreeListNodeCollection list, PostViewNode add, bool lowToHigh)
        {
            int i = 0;

            foreach (PostViewNode node in list)
            {
                if (lowToHigh && add.Post.Header.Time < node.Post.Header.Time)
                {
                    list.Insert(i, add);
                    return;
                }

                if (!lowToHigh && add.Post.Header.Time > node.Post.Header.Time)
                {
                    list.Insert(i, add);
                    return;
                }

                i++;
            }

            list.Insert(i, add);
        }
 public override bool IsContainsIn(TreeListNodeCollection dest)
 {
     return dest.Any(n => n.Content is ReferenceDto
                   && ((ReferenceDto) n.Content).FirstBlockId == FirstBlockId);
 }
Exemple #11
0
 public override bool IsContainsIn(TreeListNodeCollection dest)
 {
     return false;
 }
Exemple #12
0
 private void GetAllNodes(TreeListNodeCollection Nodes)
 {
    
     foreach (TreeListNode node in Nodes)
     {
         if ((node.Content as ReconTrade).Id != null)
             LstNodes.Add(node);
         if (node.Nodes.Count > 0)
             GetAllNodes(node.Nodes);
     }
 }
Exemple #13
0
        private void RecurseFocus(TreeListNodeCollection children)
        {
            foreach (GoalNode node in children)
            {
                Core.KeepData.SafeAdd(node.Goal.Person, true);

                RecurseFocus(node.Nodes);
            }
        }
Exemple #14
0
 private void FindCheckedNodes(TreeListNodeCollection Nodes)
 {   
     foreach (TreeListNode node in Nodes)
     {
         if ((node.Content as ReconTrade).Visible)
             CheckedNodes.Add(node);
         if (node.Nodes.Count > 0)
             FindCheckedNodes(node.Nodes);
     }
 }
 private static void AddChildren(TreeListNodeCollection dest, IEnumerable<TreeItemDto> children)
 {
     foreach (var t in children)
     {
         if (t.IsContainsIn(dest)) continue;
         var node = NodeFromItem(t);
         dest.Add(node);
     }
 }
 public override bool IsContainsIn(TreeListNodeCollection dest)
 {
     return dest.Any(n => n.Content is CommentDto && ((CommentDto)n.Content).Id == Id);
 }
 public abstract bool IsContainsIn(TreeListNodeCollection dest);