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 {; }
                }));
            }
        }
Exemple #2
0
 public void RemoveImage(UUID imageID)
 {
     try
     {
         if (ContainsImage(imageID))
         {
             cache.Remove(imageID);
         }
     }
     catch (Exception ex)
     {
         Logger.Log("Image cache: " + ex.Message, Helpers.LogLevel.Error);
     }
 }