LIBOMV-686 Implements new event patterns based on the Microsoft Framework Design Guidelines in InventoryManager (Not every delegate is converted yet)
LIBOMV-734 Thanks to Douglas R. Miles for converting the events in EstateManager over to new patterns LIBOMV-735 Removes redundant LoggedIn event from NetworkManager, when LoginProgress Status == Success you can reliably send packets to a simulator. If you send before this event is raised, an exception will be thrown and your application will crash, previously your request would just get sent to the bitbucket without any notice, Thanks lkalif for the help getting this bug fixed correctly git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3187 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -67,20 +67,20 @@ namespace OpenMetaverse.TestClient
|
||||
}
|
||||
bool wasRunning = false;
|
||||
|
||||
InventoryManager.ScriptRunningCallback callback;
|
||||
EventHandler<ScriptRunningReplyEventArgs> callback;
|
||||
using (AutoResetEvent OnScriptRunningReset = new AutoResetEvent(false))
|
||||
{
|
||||
callback = ((UUID objectID0, UUID sctriptID, bool isMono, bool isRunning) =>
|
||||
callback = ((object sender, ScriptRunningReplyEventArgs e) =>
|
||||
{
|
||||
if (objectID0 == objectID)
|
||||
if (e.ObjectID == objectID)
|
||||
{
|
||||
result += String.Format(" IsMono: {0} IsRunning: {1}", isMono, isRunning);
|
||||
wasRunning = isRunning;
|
||||
result += String.Format(" IsMono: {0} IsRunning: {1}", e.IsMono, e.IsRunning);
|
||||
wasRunning = e.IsRunning;
|
||||
OnScriptRunningReset.Set();
|
||||
}
|
||||
});
|
||||
|
||||
Client.Inventory.OnScriptRunning += callback;
|
||||
Client.Inventory.ScriptRunningReply += callback;
|
||||
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace OpenMetaverse.TestClient
|
||||
if (assetType == AssetType.LSLBytecode || assetType == AssetType.LSLText)
|
||||
{
|
||||
OnScriptRunningReset.Reset();
|
||||
Client.Inventory.GetScriptRunning(objectID, item.UUID);
|
||||
Client.Inventory.RequestGetScriptRunning(objectID, item.UUID);
|
||||
if (!OnScriptRunningReset.WaitOne(10000, true))
|
||||
{
|
||||
result += " (no script info)";
|
||||
@@ -109,7 +109,7 @@ namespace OpenMetaverse.TestClient
|
||||
{
|
||||
OnScriptRunningReset.Reset();
|
||||
result += " Setting " + setTaskTo + " => ";
|
||||
Client.Inventory.SetScriptRunning(objectID, item.UUID, setTaskTo);
|
||||
Client.Inventory.RequestSetScriptRunning(objectID, item.UUID, setTaskTo);
|
||||
if (!OnScriptRunningReset.WaitOne(10000, true))
|
||||
{
|
||||
result += " (was not set)";
|
||||
@@ -122,7 +122,7 @@ namespace OpenMetaverse.TestClient
|
||||
}
|
||||
}
|
||||
}
|
||||
Client.Inventory.OnScriptRunning -= callback;
|
||||
Client.Inventory.ScriptRunningReply -= callback;
|
||||
return result;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user