Exemplo n.º 1
0
        public static Boolean IsGroupExpanded(String Group)
        {
            //get the group
            IAccGroup grp = accSess.BuddyList.GetGroupByName(Group);

            //get the collapsed property
            Boolean b = (Boolean)grp.get_Property(AccGroupProp.AccGroupProp_Collapsed);

            //return the opposite of the property since this asks if its collapsed
            return(!b);
        }
Exemplo n.º 2
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.º 3
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.º 4
0
        public static String[] GetUsersGroupsNames(IAccUser user)
        {
            //get the groups as an object
            object[] groups = (object[])user.Groups;

            //array of names
            String[] names = new String[groups.Length];

            //set the name
            for (int i = 0; i < groups.Length; i++)
            {
                IAccGroup g = (IAccGroup)groups[i];
                names[i] = g.Name;
            }

            //return array
            return(names);
        }
Exemplo n.º 5
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));
        }
Exemplo n.º 6
0
 static void session_OnBuddyAdded(AccSession session, IAccGroup group, IAccUser user, int position, AccResult hr)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 static void session_OnBuddyMoved(AccSession session, IAccUser user, IAccGroup fromGroup, int fromPosition, IAccGroup toGroup, int toPosition, AccResult hr)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 8
0
 static void session_OnGroupChange(AccSession session, IAccGroup group, AccGroupProp Property)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 9
0
 static void session_OnGroupMoved(AccSession session, IAccGroup group, int fromPosition, int toPosition, AccResult hr)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 10
0
 static void session_OnGroupRemoved(AccSession session, IAccGroup group, AccResult hr)
 {
     throw new NotImplementedException();
 }