void Parcels_ParcelInfoReply(object sender, ParcelInfoReplyEventArgs e) { if (e.Parcel.ID != parcelID) { return; } if (InvokeRequired) { if (!instance.MonoRuntime || IsHandleCreated) { BeginInvoke(new MethodInvoker(() => Parcels_ParcelInfoReply(sender, e))); } return; } this.parcel = e.Parcel; pnlDetail.Visible = true; if (parcel.SnapshotID != UUID.Zero) { SLImageHandler img = new SLImageHandler(instance, parcel.SnapshotID, ""); img.Dock = DockStyle.Fill; pnlDetail.Controls.Add(img); pnlDetail.Disposed += (object senderx, EventArgs ex) => { img.Dispose(); }; img.BringToFront(); } btnTeleport.Enabled = true; btnShowOnMap.Enabled = true; if (parcelLocation) { localPosition = new Vector3(); localPosition.X = parcel.GlobalX % 256; localPosition.Y = parcel.GlobalY % 256; localPosition.Z = parcel.GlobalZ; } if (decodedLandmark == null) { txtParcelName.Text = string.Format("{0} - {1} ", parcel.Name, parcel.SimName); } else { txtParcelName.Text = string.Format("{0} - {1} ({2}, {3}, {4}) ", parcel.Name, parcel.SimName, (int)decodedLandmark.Position.X, (int)decodedLandmark.Position.Y, (int)decodedLandmark.Position.Z); } txtParcelDescription.Text = parcel.Description; }
void Parcels_ParcelInfoReply(object sender, ParcelInfoReplyEventArgs e) { if (e.Parcel.ID != parcelID) { return; } if (InvokeRequired) { if (!instance.MonoRuntime || IsHandleCreated) { BeginInvoke(new MethodInvoker(() => Parcels_ParcelInfoReply(sender, e))); } return; } parcel = e.Parcel; pnlDetail.Visible = true; if (parcel.SnapshotID != UUID.Zero) { SLImageHandler img = new SLImageHandler(instance, parcel.SnapshotID, "") { Dock = DockStyle.Fill }; pnlDetail.Controls.Add(img); pnlDetail.Disposed += (senderx, ex) => { img.Dispose(); }; img.BringToFront(); } btnTeleport.Enabled = true; btnShowOnMap.Enabled = true; if (parcelLocation) { localPosition = new Vector3 { X = parcel.GlobalX % 256, Y = parcel.GlobalY % 256, Z = parcel.GlobalZ }; } txtParcelName.Text = decodedLandmark == null ? $"{parcel.Name} - {parcel.SimName} " : $"{parcel.Name} - {parcel.SimName} ({(int) decodedLandmark.Position.X}, {(int) decodedLandmark.Position.Y}, {(int) decodedLandmark.Position.Z}) "; txtParcelDescription.Text = parcel.Description; }
void Parcels_ParcelInfoReply(object sender, ParcelInfoReplyEventArgs e) { if (e.Parcel.ID != parcelID) return; if (InvokeRequired) { if (!instance.MonoRuntime || IsHandleCreated) BeginInvoke(new MethodInvoker(() => Parcels_ParcelInfoReply(sender, e))); return; } this.parcel = e.Parcel; pnlDetail.Visible = true; if (parcel.SnapshotID != UUID.Zero) { SLImageHandler img = new SLImageHandler(instance, parcel.SnapshotID, ""); img.Dock = DockStyle.Fill; pnlDetail.Controls.Add(img); pnlDetail.Disposed += (object senderx, EventArgs ex) => { img.Dispose(); }; img.BringToFront(); } btnTeleport.Enabled = true; btnShowOnMap.Enabled = true; if (parcelLocation) { localPosition = new Vector3(); localPosition.X = parcel.GlobalX % 256; localPosition.Y = parcel.GlobalY % 256; localPosition.Z = parcel.GlobalZ; } if (decodedLandmark == null) { txtParcelName.Text = string.Format("{0} - {1} ", parcel.Name, parcel.SimName); } else { txtParcelName.Text = string.Format("{0} - {1} ({2}, {3}, {4}) ", parcel.Name, parcel.SimName, (int)decodedLandmark.Position.X, (int)decodedLandmark.Position.Y, (int)decodedLandmark.Position.Z); } txtParcelDescription.Text = parcel.Description; }