LIBOMV-686 Implements new event patterns based on the Microsoft Framework Design Guidelines in AvatarManager

* BREAKING CHANGE * this is a major shift in the way events are internally handled.
* TODO: need to complete the EventArgs class documentation
* Adds new TestClient commands "play" to play animations, and bots to detect other bots.

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3163 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Jim Radford
2009-10-22 04:29:25 +00:00
parent b0cb77e1e5
commit 0f8677cee9
12 changed files with 1187 additions and 462 deletions

View File

@@ -28,7 +28,7 @@ namespace OpenMetaverse.TestClient.Commands
result.Remove(0, result.Length);
waitQuery.Reset();
Client.Avatars.OnAvatarNames += Avatars_OnAvatarNames;
Client.Avatars.UUIDNameReply += Avatars_OnAvatarNames;
Client.Groups.GroupProfile += Groups_OnGroupProfile;
Client.Avatars.RequestAvatarName(key);
@@ -38,7 +38,7 @@ namespace OpenMetaverse.TestClient.Commands
result.AppendLine("Timeout waiting for reply, this could mean the Key is not an avatar or a group");
}
Client.Avatars.OnAvatarNames -= Avatars_OnAvatarNames;
Client.Avatars.UUIDNameReply -= Avatars_OnAvatarNames;
Client.Groups.GroupProfile -= Groups_OnGroupProfile;
return result.ToString();
}
@@ -49,9 +49,9 @@ namespace OpenMetaverse.TestClient.Commands
waitQuery.Set();
}
void Avatars_OnAvatarNames(Dictionary<UUID, string> names)
void Avatars_OnAvatarNames(object sender, UUIDNameReplyEventArgs e)
{
foreach (KeyValuePair<UUID, string> kvp in names)
foreach (KeyValuePair<UUID, string> kvp in e.Names)
result.AppendLine("Avatar: " + kvp.Value + " " + kvp.Key);
waitQuery.Set();
}