Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
ramtin #1
User title: RamTin
Member since Mar 2013 · 26 posts
Group memberships: Members
Show profile · Link to this post
Subject: Question For get GroupList
Hi alex,
AgsXMPP.dll
C#

i searched in this board and i find many solutions for addgroups , but
i want to get group list in Treeview [ALL GroupList , Not just Offline/Online] ,
i can get grouplist with Split on XMLRead [All groups with all Users from their]

but i want to use agsXMPP methods for get GroupList and add usernames in groups Please help me
Please show me a solution for get grouplist

Thanks
Avatar
Alex #2
Member since Feb 2003 · 4308 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you get the groups with the roster. To get a complete groups list do the following in the OnRosterItem event:

  1. var groupList = new List<string>();
  2.  
  3. private void XmppCon_OnRosterItem(object sender, agsXMPP.protocol.iq.roster.RosterItem item)
  4. {
  5.     foreach (var rGroup in ritem.GetGroups())
  6.     {      
  7.         if (!groupList.Contains(rGroup.Name))      
  8.             groupList.Add(rGroup.Name);
  9.     }
  10. }
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS