private void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { if (null == GroupsCache) { GroupsCache = e.Groups; } else { lock (GroupsCache) { GroupsCache = e.Groups; } } GroupsEvent.Set(); foreach (KeyValuePair <UUID, Group> DoCache in GroupsCache) { bool Retry = true; while (Retry) { grid.Groups.RequestGroupRoles(DoCache.Value.ID); if (RoleReply.WaitOne(TimeSpan.FromSeconds(30), false)) { Retry = false; } else { MHE(Destinations.DEST_LOCAL, UUID.Zero, "There appears to have been a failure requesting the group roles for secondlife:///app/group/" + DoCache.Value.ID.ToString() + "/about - Trying again"); } } } }
public virtual void GroupsHandler(object sender, CurrentGroupsEventArgs e) { mygroups = e.Groups; foreach (KeyValuePair <UUID, Group> entry in mygroups) { Client.Self.RequestJoinGroupChat(entry.Value.ID); } }
public void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { Hashtable message = new Hashtable(); message.Add("MessageType", "CurrentGroups"); message.Add("Groups", e.Groups); enqueue(message); }
private void OnGroupListLoaded(object sender, CurrentGroupsEventArgs e) { groups = e.Groups; InitChannels(); if (this.ChannelListLoaded != null) { ChannelListLoaded(this.GetChannels()); } }
void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { if (null == GroupsCache) { GroupsCache = e.Groups; } else { lock (GroupsCache) { GroupsCache = e.Groups; } } GroupsEvent.Set(); }
public override void Groups_OnCurrentGroups(object sender, CurrentGroupsEventArgs e) { var groups = e.Groups; foreach (UUID key in groups.Keys) { Group g = groups[key]; AddGroup2Key(g.Name, key); RegisterGroup(key, g); } //base.Groups_OnCurrentGroups(groups); //OnEvent("On-Current-Groups", paramNamesOnCurrentGroups, paramTypesOnCurrentGroups, groups); }
private static void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { if (null == GroupsCache) { GroupsCache = e.Groups; } else { lock (GroupsCache) { GroupsCache = e.Groups; } } GroupsEvent.Set(); foreach (KeyValuePair <UUID, Group> DoCache in GroupsCache) { bool Retry = true; int count = 0; while (Retry) { client.Groups.RequestGroupRoles(DoCache.Value.ID); if (RoleReply.WaitOne(TimeSpan.FromSeconds(30), false)) { Retry = false; } else { count++; //MH.callbacks(MessageHandler.Destinations.DEST_LOCAL, UUID.Zero, "There appears to have been a failure requesting the group roles for secondlife:///app/group/" + DoCache.Value.ID.ToString() + "/about - Trying again"); if (count >= 5) { MH(Destinations.DEST_LOCAL, UUID.Zero, "Aborting group refresh attempt. Too many errors - Resetting cache and retrying"); GroupsEvent.Reset(); GroupsCache = new Dictionary <UUID, Group>(); client.Groups.CurrentGroups -= Groups_CurrentGroups; ReloadGroupsCache(); return; } } } } }
private void Groups_OnCurrentGroups(object sender, CurrentGroupsEventArgs e) { if (this.InvokeRequired) { this.BeginInvoke(new MethodInvoker(delegate() { Groups_OnCurrentGroups(sender, e); })); return; } lock (instance.State.Groups) { foreach (KeyValuePair <UUID, Group> g in e.Groups) { if (!instance.State.Groups.ContainsKey(g.Key)) { instance.State.Groups.Add(g.Key, g.Value); } } } lock (instance.State.GroupStore) { foreach (Group group in this.instance.State.Groups.Values) { if (!instance.State.GroupStore.ContainsKey(group.ID)) { this.instance.State.GroupStore.Add(group.ID, group.Name); } } } this.BeginInvoke(new MethodInvoker(delegate() { UpdateGroups(); })); }
void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { BeginInvoke(new MethodInvoker(UpdateDisplay)); }
void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { this.groups = e.Groups; }
void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { RefreshGroups(e.Groups); }
void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e) { Groups = e.Groups; Invoke(new MethodInvoker(UpdateGroups)); }
private void Self_Current_Groups(object sender, CurrentGroupsEventArgs e) { groups = e.Groups; }