Exemple #1
0
        public override IEnumerable <Item> ChildrenOfItem(Item item)
        {
            if (Pidgin.IsPidgin(item))
            {
                yield return(new PidginBrowseBuddyItem());
            }
            else if (item is PidginBrowseBuddyItem)
            {
                foreach (ContactItem buddy in buddies)
                {
                    yield return(buddy);
                }
            }
            else if (item is ContactItem)
            {
                ContactItem buddy = item as ContactItem;

                IEnumerable <string> icons = buddy.Details.Where(d => d.StartsWith(iconPrefix + "prpl-"));

                IEnumerable <Item> details = buddy.Details
                                             .Where(d => d.StartsWith("prpl-"))
                                             .Select(d => MakeChildren(buddy, d, icons))
                                             .OfType <Item> ();

                foreach (Item detail in details)
                {
                    yield return(detail);
                }
            }
        }
Exemple #2
0
 public override IEnumerable <Item> ChildrenOfItem(Item item)
 {
     if (Pidgin.IsPidgin(item))
     {
         yield return(new PidginBrowseStatusItem());
     }
     else if (item is PidginBrowseStatusItem)
     {
         foreach (Item status in statuses)
         {
             yield return(status);
         }
     }
 }
Exemple #3
0
 public override IEnumerable <Item> ChildrenOfItem(Item item)
 {
     if (Pidgin.IsPidgin(item))
     {
         yield return(new PidginBrowseAccountItem());
     }
     else if (item is PidginBrowseAccountItem)
     {
         foreach (PidginAccountItem account in items)
         {
             yield return(account);
         }
     }
 }