Exemple #1
0
 //Separate thread
 private void Directory_OnPlacesReply(object sender, PlacesReplyEventArgs e)
 {
     BeginInvoke(new MethodInvoker(() =>
     {
         PlacesReply(e.QueryID, e.MatchedPlaces);
     }));
 }
 /// <summary>Raises the PlacesReply event</summary>
 /// <param name="e">A PlacesReplyEventArgs object containing the
 /// data returned from the data server</param>
 protected virtual void OnPlaces(PlacesReplyEventArgs e)
 {
     EventHandler<PlacesReplyEventArgs> handler = m_Places;
     if (handler != null)
         handler(this, e);
 }
        void Directory_PlacesReply(object sender, PlacesReplyEventArgs e)
        {
            if(e.QueryID!=queryid)
                    return;

                places_found += e.MatchedPlaces.Count;
                Gtk.Application.Invoke(delegate {

                    this.label_info.Text = "Search returned " + places_found.ToString() + " results";

                foreach(OpenMetaverse.DirectoryManager.PlacesSearchData place in e.MatchedPlaces)
                {
                    Vector3 pos=new Vector3(((int)place.GlobalX)&0x0000FF,((int)place.GlobalY)&0x0000FF,place.GlobalZ);
                    store.AppendValues(place.Name,place.SimName,place.Dwell.ToString(),MainClass.prettyvector(pos,2),pos,place.SnapshotID);
                }

             });
        }