private static object FindGroupingParent(object parentTag)
 {
     if (parentTag is GroupingTag)
     {
         GroupingTag gt = (GroupingTag)parentTag;
         // gt.Grouping is OrganizationalView means that we're at the Tags/Types/Custom Fields level.
         // Custom field keys are the next level down, and values are the one after that.
         return(gt.Grouping is OrganizationalView ? null : gt.Group);
     }
     else
     {
         return(parentTag);
     }
 }
Esempio n. 2
0
            private static object GetGroupingTagFromNode(VirtualTreeNode node)
            {
                if (node == null)
                {
                    return(null);
                }

                GroupingTag gt = node.Tag as GroupingTag;

                if (gt != null)
                {
                    // gt.Grouping is OrganizationalView means that we're at the Tags/Types/Custom Fields level.
                    // Custom field keys are the next level down, and values are the one after that.
                    return(gt.Grouping is OrganizationalView ? null : gt.Group);
                }

                return(node.Tag);
            }
Esempio n. 3
0
        public override bool Equals(object obj)
        {
            GroupingTag other = obj as GroupingTag;

            return(other != null && Grouping.Equals(other.Grouping) && Group.Equals(other.Group));
        }
 private bool TagExists(GroupingTag tag)
 {
     return GetAllTreeNodes().ConvertAll(n => n.Tag as GroupingTag).Contains(tag);
 }