Example #1
0
        public Group FindOrAddSubgroup(Grouping grouping, object o, Grouping subgrouping)
        {
            GroupKey key = new GroupKey(grouping, o);

            if (!grouped.ContainsKey(key))
            {
                grouped[key] = GetGroupFor(grouping, search, subgrouping);
            }
            return(grouped[key]);
        }
Example #2
0
 public override void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand)
 {
     if (grouped.ContainsKey(group))
     {
         grouped[group].Populate(adapter, indent, defaultExpand);
     }
     else if (ungrouped != null)
     {
         ungrouped.PopulateFor(adapter, group, indent, defaultExpand);
     }
 }
Example #3
0
 protected int CompareGroupKeys(GroupKey one, GroupKey other)
 {
     if (one == null && other == null)
     {
         return(0);
     }
     if (one == null)
     {
         return(-1);
     }
     if (other == null)
     {
         return(1);
     }
     return(Compare(one.key, other.key));
 }
Example #4
0
        public override void Add(IXenObject o)
        {
            if (grouping.BelongsAsGroupNotMember(o))
            {
                GroupKey key = new GroupKey(grouping, o);
                if (!grouped.ContainsKey(key))
                {
                    grouped[key] = GetGroupFor(grouping, search, grouping.subgrouping);
                }

                return;
            }

            Object group = grouping.GetGroup(o);

            if (group == null)
            {
                AddUngrouped(o);
                return;
            }

            IList groups = group as IList;

            if (groups == null)
            {
                AddGrouped(o, group);
                return;
            }

            if (groups.Count == 0)
            {
                AddUngrouped(o);
                return;
            }

            foreach (Object g in groups)
            {
                if (g == null)
                {
                    AddUngrouped(o);
                    continue;
                }

                AddGrouped(o, g);
            }
        }
Example #5
0
 public override void Add(IXenObject o)
 {
     if (o is Folder)
     {
         GroupKey key = new GroupKey(grouping, o);
         if (!grouped.ContainsKey(key))
         {
             grouped[key] = new FolderGroup(search, grouping);
         }
     }
     else
     {
         if (ungrouped == null)
         {
             ungrouped = new LeafGroup(search);
         }
         ungrouped.Add(o);
     }
 }
Example #6
0
        public override void Add(IXenObject o)
        {
            if (grouping.BelongsAsGroupNotMember(o))
            {
                GroupKey key = new GroupKey(grouping, o);
                if (!grouped.ContainsKey(key))
                    grouped[key] = GetGroupFor(grouping, search, grouping.subgrouping);

                return;
            }

            Object group = grouping.GetGroup(o);

            if (group == null)
            {
                AddUngrouped(o);
                return;
            }

            IList groups = group as IList;

            if (groups == null)
            {
                AddGrouped(o, group);
                return;
            }

            if (groups.Count == 0)
            {
                AddUngrouped(o);
                return;
            }

            foreach (Object g in groups)
            {
                if (g == null)
                {
                    AddUngrouped(o);
                    continue;
                }

                AddGrouped(o, g);
            }
        }
Example #7
0
 public override void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand)
 {
     adapter.FinishedInThisGroup(defaultExpand);
 }
Example #8
0
 protected int CompareGroupKeys(GroupKey _1, GroupKey _2)
 {
     return Compare(_1.key, _2.key);
 }
Example #9
0
 public abstract void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand);
Example #10
0
 public override void Add(IXenObject o)
 {
     if (o is Folder)
     {
         GroupKey key = new GroupKey(grouping, o);
         if (!grouped.ContainsKey(key))
             grouped[key] = new FolderGroup(search, grouping);
     }
     else
     {
         if (ungrouped == null)
             ungrouped = new LeafGroup(search);
         ungrouped.Add(o);
     }
 }
Example #11
0
 public override void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand)
 {
     if (grouped.ContainsKey(group))
     {
         grouped[group].Populate(adapter, indent, defaultExpand);
     }
     else if (ungrouped != null)
     {
         ungrouped.PopulateFor(adapter, group, indent, defaultExpand);
     }
 }
Example #12
0
 public Group FindOrAddSubgroup(Grouping grouping, object o, Grouping subgrouping)
 {
     GroupKey key = new GroupKey(grouping, o);
     if (!grouped.ContainsKey(key))
         grouped[key] = GetGroupFor(grouping, search, subgrouping);
     return grouped[key];
 }
Example #13
0
 public override void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand)
 {
     adapter.FinishedInThisGroup(defaultExpand);
 }
Example #14
0
 public abstract void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand);
Example #15
0
 protected int CompareGroupKeys(GroupKey _1, GroupKey _2)
 {
     return(Compare(_1.key, _2.key));
 }