Beispiel #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]);
        }
Beispiel #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);
     }
 }
Beispiel #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));
 }
Beispiel #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);
            }
        }
Beispiel #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);
     }
 }
Beispiel #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);
            }
        }
Beispiel #7
0
 public override void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand)
 {
     adapter.FinishedInThisGroup(defaultExpand);
 }
Beispiel #8
0
 protected int CompareGroupKeys(GroupKey _1, GroupKey _2)
 {
     return Compare(_1.key, _2.key);
 }
Beispiel #9
0
 public abstract void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand);
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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];
 }
Beispiel #13
0
 public override void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand)
 {
     adapter.FinishedInThisGroup(defaultExpand);
 }
Beispiel #14
0
 public abstract void PopulateFor(IAcceptGroups adapter, GroupKey group, int indent, bool defaultExpand);
Beispiel #15
0
 protected int CompareGroupKeys(GroupKey _1, GroupKey _2)
 {
     return(Compare(_1.key, _2.key));
 }