Beispiel #1
0
        private void WriteToUser(agsXMPP.protocol.client.Message msg, FacebookUser user)
        {
            FacebookDoChat ch = FindChat(user);

            if (ch == null)
            {
                return;                         // it cant be that user is not found
            }
            string answer = ch.GetAnswer(msg);

            client.SendMessage(answer, user.name);
        }
Beispiel #2
0
        private FacebookDoChat FindChat(FacebookUser user)
        {
            FacebookDoChat ans = null;

            foreach (var t in chatList)
            {
                //if (t.User.Equals(user))
                if (t.User.name == user.name)
                {
                    ans = t;
                }
            }
            return(ans);
        }
Beispiel #3
0
        private void RemoveFromList(FacebookUser user)
        {
            if (chatList.Count <= 0)
            {
                return;
            }
            FacebookDoChat temp = null;

            foreach (var t in chatList)
            {
                if (t.User.name == user.name)
                {
                    temp = t;
                    break;
                }
            }
            if (temp == null)
            {
                return;
            }
            chatList.Remove(temp);
        }
Beispiel #4
0
        private void AddUser(FacebookUser user)
        {
            FacebookDoChat ch = new FacebookDoChat(user);

            chatList.AddLast(ch);
        }