LIBOMV-686 Implements new event patterns based on the Microsoft Framework Design Guidelines in GroupManager
* BREAKING CHANGE * this is a major shift in the way events are internally handled. git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3162 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -28,11 +28,18 @@ namespace groupmanager
|
||||
|
||||
Client.Network.OnLogin += new NetworkManager.LoginCallback(Network_OnLogin);
|
||||
Client.Network.OnEventQueueRunning += new NetworkManager.EventQueueRunningCallback(Network_OnEventQueueRunning);
|
||||
Client.Groups.OnCurrentGroups += new GroupManager.CurrentGroupsCallback(Groups_OnCurrentGroups);
|
||||
Client.Groups.CurrentGroups += Groups_CurrentGroups;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
|
||||
{
|
||||
Groups = e.Groups;
|
||||
|
||||
Invoke(new MethodInvoker(UpdateGroups));
|
||||
}
|
||||
|
||||
private void UpdateGroups()
|
||||
{
|
||||
lock (lstGroups)
|
||||
@@ -131,14 +138,7 @@ namespace groupmanager
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void Groups_OnCurrentGroups(Dictionary<UUID, Group> groups)
|
||||
{
|
||||
Groups = groups;
|
||||
|
||||
Invoke(new MethodInvoker(UpdateGroups));
|
||||
}
|
||||
|
||||
|
||||
private void Network_OnEventQueueRunning(Simulator simulator)
|
||||
{
|
||||
if (simulator == Client.Network.CurrentSim)
|
||||
|
||||
Reference in New Issue
Block a user