Esempio n. 1
0
 //Separate thread
 private void Directory_OnEventsReply(object sender, DirEventsReplyEventArgs e)
 {
     BeginInvoke(new MethodInvoker(() =>
     {
         EventsReply(e.QueryID, e.MatchedEvents);
     }));
 }
 private void Directory_DirEvents(object sender, DirEventsReplyEventArgs e)
 {
     if (e.MatchedEvents[0].ID == 0 && e.MatchedEvents.Count == 1)
     {
         WriteLine("No Results matched your search string");
     }
     else
     {
         foreach (DirectoryManager.EventsSearchData ev in e.MatchedEvents)
         {
             WriteLine("Event ID: {0} Event Name: {1} Event Date: {2}", ev.ID, ev.Name, ev.Date);
         }
     }
     resultCount = e.MatchedEvents.Count;
     waitQuery.Set();
 }
Esempio n. 3
0
        private void Directory_OnEventsReply(object sender, DirEventsReplyEventArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke((MethodInvoker)delegate { Directory_OnEventsReply(sender, e); });
                return;
            }

            BeginInvoke((MethodInvoker)delegate { EventsReply(e.QueryID, e.MatchedEvents); });
        }
Esempio n. 4
0
        void Directory_DirEventsReply(object sender, DirEventsReplyEventArgs e)
        {
            if (e.QueryID != eventSearch) return;

            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(() => Directory_DirEventsReply(sender, e)));
                return;
            }

            lvwEvents.BeginUpdate();

            foreach (var evt in e.MatchedEvents)
            {
                if (evt.ID == 0) continue;

                ListViewItem item = new ListViewItem();
                item.Name = "evt" + evt.ID.ToString();
                item.Text = evt.Name;
                item.Tag = evt;
                item.SubItems.Add(new ListViewItem.ListViewSubItem(item, evt.Date));

                lvwEvents.Items.Add(item);
            }

            lvwEvents.Sort();
            lvwEvents.EndUpdate();

            eventMatches += e.MatchedEvents.Count;
            btnNextEvent.Enabled = eventMatches > eventsPerPage;
            btnPrevEvent.Enabled = eventStart != 0;

            if (e.MatchedEvents.Count > 0 && e.MatchedEvents[e.MatchedEvents.Count - 1].ID == 0)
                eventMatches -= 1;

            lblNrEvents.Visible = true;
            lblNrEvents.Text = string.Format("{0} events found", eventMatches > eventsPerPage ? "More than " + (eventStart + eventsPerPage).ToString() : (eventStart + eventMatches).ToString());
        }
 /// <summary>Raises the DirEventsReply event</summary>
 /// <param name="e">An DirEventsReplyEventArgs object containing the
 /// data returned from the data server</param>
 protected virtual void OnDirEvents(DirEventsReplyEventArgs e)
 {
     EventHandler<DirEventsReplyEventArgs> handler = m_DirEvents;
     if (handler != null)
         handler(this, e);
 }
        void Directory_DirEventsReply(object sender, DirEventsReplyEventArgs e)
        {
            if(e.QueryID!=queryid)
                    return;

                events_found += e.MatchedEvents.Count;

                Gtk.Application.Invoke(delegate {

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

                foreach(OpenMetaverse.DirectoryManager.EventsSearchData anevent in e.MatchedEvents)
                {
                    store.AppendValues(anevent.Name,anevent.Date.ToString(),anevent);
                }

             });
        }
Esempio n. 7
0
 //Separate thread
 private void Directory_OnEventsReply(object sender, DirEventsReplyEventArgs e)
 {
     BeginInvoke((MethodInvoker)delegate
     {
         EventsReply(e.QueryID, e.MatchedEvents);
     });
 }
Esempio n. 8
0
 public virtual void Directory_OnEventsReply(Object sender, DirEventsReplyEventArgs e) { OnEvent("On-Events-Reply", paramNamesOnEventsReply, paramTypesOnEventsReply, e.QueryID, e.MatchedEvents); }