private void UpdateMembers() { List <LLUUID> requestids = new List <LLUUID>(); lock (Members) { lock (MemberData) { foreach (GroupMember member in Members.Values) { GroupMemberData memberData = new GroupMemberData(); memberData.ID = member.ID; memberData.IsOwner = member.IsOwner; memberData.LastOnline = member.OnlineStatus; memberData.Powers = member.Powers; memberData.Title = member.Title; memberData.Contribution = member.Contribution; MemberData[member.ID] = memberData; // Add this ID to the name request batch requestids.Add(member.ID); } } } Client.Avatars.RequestAvatarNames(requestids); }
private void UpdateMembers() { if (this.InvokeRequired) { Invoke(new MethodInvoker(UpdateMembers)); } else { List<LLUUID> requestids = new List<LLUUID>(); lock (Members) { lock (MemberData) { foreach (GroupMember member in Members.Values) { GroupMemberData memberData = new GroupMemberData(); memberData.ID = member.ID; memberData.IsOwner = member.IsOwner; memberData.LastOnline = member.OnlineStatus; memberData.Powers = (ulong)member.Powers; memberData.Title = member.Title; memberData.Contribution = member.Contribution; MemberData[member.ID] = memberData; // Add this ID to the name request batch requestids.Add(member.ID); } } } Client.Avatars.RequestAvatarNames(requestids); } }