示例#1
0
 // Separate thread
 private void eventsconsole_OnEventInfo(object sender, EventInfoReplyEventArgs e)
 {
     BeginInvoke(new MethodInvoker(() =>
     {
         EventInf(e.MatchedEvent);
     }));
 }
        private void Directory_EventDetails(object sender, EventInfoReplyEventArgs e)
        {
            float x, y;
            Helpers.GlobalPosToRegionHandle((float) e.MatchedEvent.GlobalPos.X, (float) e.MatchedEvent.GlobalPos.Y,
                                            out x, out y);
            StringBuilder sb =
                new StringBuilder("secondlife://" + e.MatchedEvent.SimName + "/" + x + "/" + y + "/0" +
                                  Environment.NewLine);
            sb.AppendLine(e.MatchedEvent.ToString());

            //sb.AppendFormat("       Name: {0} ({1})" + System.Environment.NewLine, e.MatchedEvent.Name, e.MatchedEvent.ID);
            //sb.AppendFormat("   Location: {0}/{1}/{2}" + System.Environment.NewLine, e.MatchedEvent.SimName, x, y);
            //sb.AppendFormat("       Date: {0}" + System.Environment.NewLine, e.MatchedEvent.Date);
            //sb.AppendFormat("Description: {0}" + System.Environment.NewLine, e.MatchedEvent.Desc);
            WriteLine(sb.ToString());
            Client.Directory.EventInfoReply -= Directory_EventDetails;
        }
示例#3
0
        void Directory_EventInfoReply(object sender, EventInfoReplyEventArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(() => Directory_EventInfoReply(sender, e)));
                return;
            }

            var evt = e.MatchedEvent;
            pnlEventDetail.Visible = true;
            pnlEventDetail.Tag = evt;
            btnTeleport.Enabled = btnShowOnMap.Enabled = true;

            txtEventName.Text = evt.Name;
            txtEventType.Text = evt.Category.ToString();
            txtEventMaturity.Text = evt.Flags.ToString();
            txtEventDate.Text = OpenMetaverse.Utils.UnixTimeToDateTime(evt.DateUTC).ToString("r");
            txtEventDuration.Text = string.Format("{0}:{1:00}", evt.Duration / 60u, evt.Duration % 60u);
            txtEventOrganizer.Text = instance.Names.Get(evt.Creator, string.Empty);
            txtEventOrganizer.Tag = evt.Creator;
            txtEventLocation.Text = string.Format("{0} ({1}, {2}, {3})", evt.SimName, Math.Round(evt.GlobalPos.X % 256), Math.Round(evt.GlobalPos.Y % 256), Math.Round(evt.GlobalPos.Z));
            txtEventDescription.Text = evt.Desc.Replace("\n", Environment.NewLine);
        }
 /// <summary>Raises the EventInfoReply event</summary>
 /// <param name="e">An EventInfoReplyEventArgs object containing the
 /// data returned from the data server</param>
 protected virtual void OnEventInfo(EventInfoReplyEventArgs e)
 {
     EventHandler<EventInfoReplyEventArgs> handler = m_EventInfoReply;
     if (handler != null)
         handler(this, e);
 }
        void Directory_EventInfoReply(object sender, EventInfoReplyEventArgs e)
        {
            Gtk.Application.Invoke(delegate {
                this.entry_name.Text=e.MatchedEvent.Name;
                this.entry_date.Text=e.MatchedEvent.Date.ToString();
                this.entry_location.Text=e.MatchedEvent.SimName;
                this.entry_cat.Text=e.MatchedEvent.Category.ToString();

                AsyncNameUpdate ud=new AsyncNameUpdate(e.MatchedEvent.Creator,false);
                ud.onNameCallBack += delegate(string namex,object[] values){this.entry_organiser.Text=namex;};
                ud.go();

                this.entry_duration.Text=e.MatchedEvent.Duration.ToString();
                this.textview_eventinfo.Buffer.Text=e.MatchedEvent.Desc;
                selected_event=e.MatchedEvent;
                this.button_notify.Sensitive=false;
                this.button_teleport.Sensitive=true;

            });
        }
示例#6
0
 // Separate thread
 private void eventsconsole_OnEventInfo(object sender, EventInfoReplyEventArgs e)
 {
     BeginInvoke((MethodInvoker)delegate
     {
         EventInf(e.MatchedEvent);
     });
 }
示例#7
0
 public virtual void Directory_OnEventInfo(Object sender, EventInfoReplyEventArgs e) { OnEvent("On-Event-Info", paramNamesOnEventInfo, paramTypesOnEventInfo, e.MatchedEvent); }