Exemplo n.º 1
0
        /// <summary>
        /// Gets the number of Buddies in the specified Group.
        /// </summary>
        /// <param name="GroupName">The Group Name to check the number of Buddies.</param>
        /// <returns>Returns the number of Buddies int he specified Group.</returns>
        public static int NumberOfBuddiesInGroup(String GroupName)
        {
            //get the buddy list
            IAccBuddyList bl = accSess.BuddyList;

            //get the group
            IAccGroup grp = bl.GetGroupByName(GroupName);

            //return the number
            return(grp.BuddyCount);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the Position of the Group in the BuddyList
        /// </summary>
        /// <param name="GroupName">The name of the Group to get the Position of.</param>
        /// <returns>Returns an int for the position.</returns>
        public static int GroupPosition(String GroupName)
        {
            //get the buddy list
            IAccBuddyList bl = accSess.BuddyList;

            //get the group
            IAccGroup grp = bl.GetGroupByName(GroupName);

            //sanity check: null group
            if (grp == null)
            {
                return(-1);
            }

            //return the position
            return(bl.GetGroupPosition(grp));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets the Position of the Buddy in the specified Group.
        /// </summary>
        /// <param name="BuddyName">The Name of the Buddy to get the Position of.</param>
        /// <param name="GroupName">The Name of the Group the specified Buddy belongs to.</param>
        /// <returns>Returns the Position of the specified Buddy.</returns>
        public static int BuddyPosition(String BuddyName, String GroupName)
        {
            //get the buddy list
            IAccBuddyList bl = accSess.BuddyList;

            //get the group
            IAccGroup grp = bl.GetGroupByName(GroupName);

            //get the buddy
            IAccUser usr = bl.GetBuddyByName(BuddyName);

            //sanity check: null group
            if (grp == null)
            {
                return(-1);
            }

            //return the Buddy's position
            return(grp.GetBuddyPosition(usr));
        }