Example #1
0
 void Self_ChatSessionMemberLeft(object sender, ChatSessionMemberLeftEventArgs e)
 {
     if (e.SessionID == SessionId)
     {
         UpdateParticipantList();
     }
 }
        private void OnChatSessionMemeberLeft(object sender, ChatSessionMemberLeftEventArgs e)
        {
            GroupChannel chan;

            if (channels.TryGetValue(e.SessionID, out chan))
            {
                chan.OnMemberLeft(e.AgentID);
            }
        }
Example #3
0
        private void Self_OnChatSessionMemberLeft(object sender, ChatSessionMemberLeftEventArgs e)
        {
            if (e.SessionID == session)
            {
                BeginInvoke(new MethodInvoker(delegate()
                {
                    try
                    {
                        ListViewItem foundItem = lvwList.FindItemWithText(e.AgentID.ToString());

                        if (foundItem != null)
                        {
                            lvwList.Items.Remove(foundItem);
                        }
                    }
                    catch {; }

                    try
                    {
                        if (people.ContainsKey(e.AgentID))
                        {
                            lock (people)
                            {
                                string person           = people[e.AgentID];
                                ListViewItem foundItem2 = lvwList.FindItemWithText(person);

                                if (foundItem2 != null)
                                {
                                    lvwList.Items.Remove(foundItem2);
                                }

                                people.Remove(e.AgentID);
                            }
                        }
                    }
                    catch {; }
                }));
            }
        }