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

@@ -14,13 +14,13 @@ namespace OpenMetaverse.TestClient
public ImCommand(TestClient testClient)
{
testClient.Avatars.OnAvatarNameSearch += new AvatarManager.AvatarNameSearchCallback(Avatars_OnAvatarNameSearch);
testClient.Avatars.AvatarPickerReply += Avatars_AvatarPickerReply;
Name = "im";
Description = "Instant message someone. Usage: im [firstname] [lastname] [message]";
Category = CommandCategory.Communication;
}
public override string Execute(string[] args, UUID fromAgentID)
{
if (args.Length < 3)
@@ -56,9 +56,9 @@ namespace OpenMetaverse.TestClient
}
}
void Avatars_OnAvatarNameSearch(UUID queryID, Dictionary<UUID, string> avatars)
void Avatars_AvatarPickerReply(object sender, AvatarPickerReplyEventArgs e)
{
foreach (KeyValuePair<UUID, string> kvp in avatars)
foreach (KeyValuePair<UUID, string> kvp in e.Avatars)
{
if (kvp.Value.ToLower() == ToAvatarName.ToLower())
{