Exemplo n.º 1
0
 public void Avatar_OnAvatarGroups(object sender, AvatarGroupsReplyEventArgs e)
 {
     lock (avatarGroups)
     {
         avatarGroups[e.AvatarID] = e.Groups;
     }
     if ( GroupsLookupEvents.ContainsKey(e.AvatarID) )
     {
         GroupsLookupEvents[e.AvatarID].Set();
     }
 }
Exemplo n.º 2
0
        void Avatars_AvatarGroupsReply(object sender, AvatarGroupsReplyEventArgs e)
        {
            if (e.AvatarID != agentID) return;

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

            lvwGroups.BeginUpdate();

            foreach (AvatarGroup g in e.Groups)
            {
                if (!lvwGroups.Items.ContainsKey(g.GroupID.ToString()))
                {
                    ListViewItem item = new ListViewItem();
                    item.Name = g.GroupID.ToString();
                    item.Text = g.GroupName;
                    item.Tag = g;
                    item.SubItems.Add(new ListViewItem.ListViewSubItem(item, g.GroupTitle));

                    lvwGroups.Items.Add(item);
                }
            }

            lvwGroups.EndUpdate();
        }
Exemplo n.º 3
0
 ///<summary>Raises the AvatarGroupsReply Event</summary>
 /// <param name="e">A AvatarGroupsReplyEventArgs object containing
 /// the data sent from the simulator</param>
 protected virtual void OnAvatarGroupsReply(AvatarGroupsReplyEventArgs e)
 {
     EventHandler<AvatarGroupsReplyEventArgs> handler = m_AvatarGroupsReply;
     if (handler != null)
         handler(this, e);
 }
Exemplo n.º 4
0
 // CALLBACKS
 // These are all assigned to LibSL callbacks in Connect.cs. This determines their argument order.
 // The if(!active) check is to ensure they don't get called after we've logged off. This is a
 // LibSL bug.
 // These almost all perform the same task:
 // 1) Create a hashtable
 // 2) Place various passed-in arguments in the hashtable
 // 3) Optionally, loop through one of the arguments if necessary, and add this to the hashtable
 //    as a bunch more hashtables.
 // 4) Enqueue the hashtable in the message queue. This is periodically emptied by the client.
 public void Avatars_AvatarGroupsReply(object sender, AvatarGroupsReplyEventArgs e)
 {
     Hashtable item = new Hashtable();
     item.Add("MessageType", "AvatarGroups");
     item.Add("AvatarID", e.AvatarID);
     item.Add("Groups", e.Groups);
     enqueue(item);
 }
Exemplo n.º 5
0
        private void Avatars_OnGroupsReply(object sender, AvatarGroupsReplyEventArgs e)
        {
            if (e.AvatarID != agentID) return;

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

            //lvGroups.Items.Clear();

            foreach (AvatarGroup group in e.Groups)
            {
                ListViewItem lvi = new ListViewItem();
                lvi.Text = group.GroupName;
                lvi.Tag = group;

                if (!lvGroups.Items.Contains(lvi))
                {
                    lvGroups.Items.Add(lvi);
                }
            }
        }
Exemplo n.º 6
0
 public virtual void Avatars_OnAvatarGroups(object sender, AvatarGroupsReplyEventArgs e) { OnEvent("On-Avatar-Groups", paramNamesOnAvatarGroups, paramTypesOnAvatarGroups, e); }
Exemplo n.º 7
0
        private void Avatars_AvatarGroupsReply(object sender, AvatarGroupsReplyEventArgs e)
        {
            if (e.AvatarID != targetID) return;
            lock (ReceivedProfileEvent)
            {
                foreach (AvatarGroup group in e.Groups)
                {
                    Groups.Add(group.GroupID);
                }

                ReceivedGroups = true;

                if (ReceivedInterests && ReceivedProperties && ReceivedGroups)
                    ReceivedProfileEvent.Set();
            }
        }