void Avatars_PickInfoReply(object sender, PickInfoReplyEventArgs e) { if (e.PickID != requestedPick) return; if (InvokeRequired) { BeginInvoke(new MethodInvoker(() => Avatars_PickInfoReply(sender, e))); return; } lock (pickCache) { if (!pickCache.ContainsKey(e.PickID)) pickCache.Add(e.PickID, e.Pick); } currentPick = e.Pick; if (pickPicturePanel.Controls.Count > 0) pickPicturePanel.Controls[0].Dispose(); pickPicturePanel.Controls.Clear(); if (agentID == client.Self.AgentID || e.Pick.SnapshotID != UUID.Zero) { SLImageHandler img = new SLImageHandler(instance, e.Pick.SnapshotID, string.Empty); img.Dock = DockStyle.Fill; img.SizeMode = PictureBoxSizeMode.StretchImage; pickPicturePanel.Controls.Add(img); if (agentID == client.Self.AgentID) { img.AllowUpdateImage = true; ProfilePick p = e.Pick; img.ImageUpdated += (psender, pe) => { img.UpdateImage(pe.NewImageID); p.SnapshotID = pe.NewImageID; client.Self.PickInfoUpdate(p.PickID, p.TopPick, p.ParcelID, p.Name, p.PosGlobal, p.SnapshotID, p.Desc); }; } } pickTitle.Text = e.Pick.Name; pickDetail.Text = e.Pick.Desc; if (!parcelCache.ContainsKey(e.Pick.ParcelID)) { pickLocation.Text = string.Format("Unkown parcel, {0} ({1}, {2}, {3})", e.Pick.SimName, ((int)e.Pick.PosGlobal.X) % 256, ((int)e.Pick.PosGlobal.Y) % 256, ((int)e.Pick.PosGlobal.Z) % 256 ); client.Parcels.RequestParcelInfo(e.Pick.ParcelID); } else { Parcels_ParcelInfoReply(this, new ParcelInfoReplyEventArgs(parcelCache[e.Pick.ParcelID])); } }
///<summary>Raises the PickInfoReply Event</summary> /// <param name="e">A PickInfoReplyEventArgs object containing /// the data sent from the simulator</param> protected virtual void OnPickInfoReply(PickInfoReplyEventArgs e) { EventHandler<PickInfoReplyEventArgs> handler = m_PickInfoReply; if (handler != null) handler(this, e); }
void Avatars_PickInfoReply(object sender, PickInfoReplyEventArgs e) { if(!this.picks_waiting.Contains(e.PickID)) return; picks_waiting.Remove(e.PickID); Gtk.Application.Invoke(delegate { aPick tpick= new aPick(e.Pick.SnapshotID,e.Pick.Name,e.Pick.Desc,e.Pick.Name,e.Pick.SimName,e.Pick.PosGlobal); Gtk.Label lable=new Gtk.Label(e.Pick.Name.Substring(0,e.Pick.Name.Length>10?10:e.Pick.Name.Length)); this.ShowAll(); this.notebook_picks.InsertPage(tpick,lable,-1); this.notebook_picks.ShowAll(); }); }
private void Avatars_OnPicksInfoReply(object sender, PickInfoReplyEventArgs e) { if (InvokeRequired) { BeginInvoke(new MethodInvoker(() => Avatars_OnPicksInfoReply(sender, e))); return; } this.BeginInvoke(new MethodInvoker(delegate() { txtTitle.Text = e.Pick.Name; txtDescription.Text = e.Pick.Desc; txtSlurl.Text = "None"; })); pickUUID = e.Pick.ParcelID; client.Parcels.RequestParcelInfo(e.Pick.ParcelID); PickImageID = e.Pick.SnapshotID; if (!instance.ImageCache.ContainsImage(PickImageID)) { client.Assets.RequestImage(PickImageID, ImageType.Normal, Assets_OnImageReceived); } else { BeginInvoke( new OnSetPickImage(SetPickImage), new object[] { PickImageID, instance.ImageCache.GetImage(PickImageID) }); } }
public virtual void Avatars_OnPickInfo(object sender, PickInfoReplyEventArgs e) { OnEvent("On-Pick-Info", paramNamesOnPickInfo, paramTypesOnPickInfo, e); }
private void Avatars_PickInfoReply(object sender, PickInfoReplyEventArgs e) { Client.Self.PickInfoUpdate(e.PickID, e.Pick.TopPick, e.Pick.ParcelID, e.Pick.Name, e.Pick.PosGlobal, e.Pick.SnapshotID, e.Pick.Desc); }