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:
Jim Radford
2009-10-20 20:18:03 +00:00
parent 9f8d0d49f0
commit b0cb77e1e5
12 changed files with 869 additions and 408 deletions

View File

@@ -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)