本文整理汇总了C#中OpenMetaverse.GridClient类的典型用法代码示例。如果您正苦于以下问题:C# GridClient类的具体用法?C# GridClient怎么用?C# GridClient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GridClient类属于OpenMetaverse命名空间,在下文中一共展示了GridClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeClient
private void InitializeClient(bool initialize)
{
if (Client != null)
{
if (Client.Network.Connected)
Client.Network.Logout();
Client = null;
}
if (!initialize) return;
//initialize client object
Client = new GridClient();
Client.Settings.USE_LLSD_LOGIN = true;
Client.Settings.USE_ASSET_CACHE = true;
Client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(Network_OnDisconnected);
Client.Self.IM += Self_IM;
//define the client object for each GUI element
avatarList1.Client = Client;
friendsList1.Client = Client;
groupList1.Client = Client;
inventoryTree1.Client = Client;
localChat1.Client = Client;
loginPanel1.Client = Client;
messageBar1.Client = Client;
miniMap1.Client = Client;
statusOutput1.Client = Client;
}
示例2: AutoPilot
public AutoPilot(GridClient client)
{
Client = client;
Ticker.Enabled = false;
Ticker.Elapsed += new System.Timers.ElapsedEventHandler(Ticker_Elapsed);
Client.Objects.TerseObjectUpdate += new System.EventHandler<TerseObjectUpdateEventArgs>(Objects_TerseObjectUpdate);
}
示例3: Shoot
/// <summary>
/// Aims at the specified position, enters mouselook, presses and
/// releases the left mouse button, and leaves mouselook
/// </summary>
/// <param name="client"></param>
/// <param name="target">Target to shoot at</param>
/// <returns></returns>
public static bool Shoot(GridClient client, Vector3 target)
{
if (client.Self.Movement.TurnToward(target))
return Shoot(client);
else
return false;
}
示例4: Scraper
public Scraper(GridClient theclient)
{
client=theclient;
Console.WriteLine("Starting scrape");
scraperlogic();
}
示例5: TexturePipeline
/// <summary>
/// Default constructor
/// </summary>
/// <param name="client">Reference to <code>SecondLife</code> client</param>
/// <param name="maxRequests">Maximum number of concurrent texture requests</param>
public TexturePipeline(GridClient client, int maxRequests)
{
running = true;
this.client = client;
maxTextureRequests = maxRequests;
requestQueue = new List<TaskInfo>();
currentRequests = new Dictionary<UUID, int>(maxTextureRequests);
completedDownloads = new Dictionary<UUID, ImageDownload>();
resetEvents = new AutoResetEvent[maxTextureRequests];
threadpoolSlots = new int[maxTextureRequests];
// Pre-configure autoreset events/download slots
for (int i = 0; i < maxTextureRequests; i++)
{
resetEvents[i] = new AutoResetEvent(false);
threadpoolSlots[i] = -1;
}
client.Assets.OnImageReceived += Assets_OnImageReceived;
client.Assets.OnImageReceiveProgress += Assets_OnImageReceiveProgress;
// Fire up the texture download thread
downloadMaster = new Thread(new ThreadStart(DownloadThread));
downloadMaster.Start();
}
示例6: InitializeClient
private void InitializeClient(bool initialize)
{
if (Client != null)
{
if (Client.Network.Connected)
Client.Network.Logout();
Client = null;
}
if (!initialize) return;
//initialize client object
Client = new GridClient();
Client.Settings.USE_TEXTURE_CACHE = true;
Client.Network.OnCurrentSimChanged += new NetworkManager.CurrentSimChangedCallback(Network_OnCurrentSimChanged);
Client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(Network_OnDisconnected);
Client.Self.OnInstantMessage += new AgentManager.InstantMessageCallback(Self_OnInstantMessage);
//define the client object for each GUI element
avatarList1.Client = Client;
friendsList1.Client = Client;
groupList1.Client = Client;
inventoryTree1.Client = Client;
localChat1.Client = Client;
loginPanel1.Client = Client;
messageBar1.Client = Client;
miniMap1.Client = Client;
statusOutput1.Client = Client;
}
示例7: StartTrace
public void StartTrace(TraceSession parent, OpenMetaverse.AgentManager avatarManager)
{
mGridClient = parent.Client;
mAgentManager = avatarManager;
mLastUpdate = DateTime.Now;
}
示例8: Excecute
public override bool Excecute(Automaton am, GridClient client, bool force)
{
am.ClearChatLog();
result.success = true;
result.message = "cleared chat log";
return true;
}
示例9: TraceSession
public TraceSession(Config cfg)
{
mConfig = cfg;
mClient = new GridClient();
mTracers = new List<ITracer>();
mController = null;
mConnectedSimName = null;
mNeedsReconnect = false;
mDisconnectTime = DateTime.Now;
mReconnectWait = TimeSpan.FromSeconds(30);
// We turn as many things off as possible -- features are *opt in* by
// default, meaning specific loggers must enable these features if they
// need them
mClient.Settings.MULTIPLE_SIMS = false;
mClient.Throttle.Asset = 0;
mClient.Throttle.Cloud = 0;
mClient.Throttle.Land = 0;
mClient.Throttle.Texture = 0;
mClient.Throttle.Wind = 0;
// Set up our session management callbacks
mClient.Network.OnConnected += new NetworkManager.ConnectedCallback(this.ConnectHandler);
mClient.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.DisconnectHandler);
mClient.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.SimConnectedHandler);
}
示例10: Excecute
public override bool Excecute(Automaton am, GridClient client, bool force)
{
if (!client.Network.Connected) { result.message = "Not Connected to grid"; return true; }
result.data = am.GetTPOffers();
result.success = true;
return true;
}
示例11: NameTracker
public NameTracker(GridClient conn)
{
client = conn;
client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);
agent_names_recieved = new Dictionary<UUID,String>();
agent_names_requested = new Dictionary<UUID, DateTime>();
}
示例12: Main
static void Main(string[] args)
{
int ircPort;
if (args.Length < 7 || !UUID.TryParse(args[3], out _MasterID) || !int.TryParse(args[5], out ircPort) || args[6].IndexOf('#') == -1)
Console.WriteLine("Usage: ircgateway.exe <firstName> <lastName> <password> <masterUUID> <ircHost> <ircPort> <#channel>");
else
{
_Client = new GridClient();
_Client.Network.OnLogin += new NetworkManager.LoginCallback(Network_OnLogin);
_Client.Self.ChatFromSimulator += new EventHandler<ChatEventArgs>(Self_ChatFromSimulator);
_Client.Self.IM += Self_IM;
_ClientLogin = _Client.Network.DefaultLoginParams(args[0], args[1], args[2], "", "IRCGateway");
_AutoJoinChannel = args[6];
_IRC = new IRCClient(args[4], ircPort, "SLGateway", "Second Life Gateway");
_IRC.OnConnected += new IRCClient.ConnectCallback(_IRC_OnConnected);
_IRC.OnMessage += new IRCClient.MessageCallback(_IRC_OnMessage);
_IRC.Connect();
string read = Console.ReadLine();
while (read != null) read = Console.ReadLine();
}
}
示例13: Scraper
public Scraper(GridClient theclient)
{
client = theclient;
Logger.Log("Starting scrape", Helpers.LogLevel.Info);
scraperlogic();
}
示例14: frmGroupInfo
public frmGroupInfo(Group group, GridClient client)
{
InitializeComponent();
while (!IsHandleCreated)
{
// Force handle creation
IntPtr temp = Handle;
}
GroupProfileCallback = new GroupManager.GroupProfileCallback(GroupProfileHandler);
GroupMembersCallback = new GroupManager.GroupMembersCallback(GroupMembersHandler);
GroupTitlesCallback = new GroupManager.GroupTitlesCallback(GroupTitlesHandler);
AvatarNamesCallback = new AvatarManager.AvatarNamesCallback(AvatarNamesHandler);
ImageReceivedCallback = new AssetManager.ImageReceivedCallback(Assets_OnImageReceived);
Group = group;
Client = client;
// Register the callbacks for this form
Client.Assets.OnImageReceived += ImageReceivedCallback;
Client.Groups.OnGroupProfile += GroupProfileCallback;
Client.Groups.OnGroupMembers += GroupMembersCallback;
Client.Groups.OnGroupTitles += GroupTitlesCallback;
Client.Avatars.OnAvatarNames += AvatarNamesCallback;
// Request the group information
Client.Groups.RequestGroupProfile(Group.ID);
Client.Groups.RequestGroupMembers(Group.ID);
Client.Groups.RequestGroupTitles(Group.ID);
}
示例15: Excecute
public override bool Excecute(Automaton am, GridClient client, bool force)
{
if (!client.Network.Connected) { result.message = "Not Connected to grid"; return true; }
client.Self.Crouch(true);
result.success = true;
return true;
}