Esempio n. 1
0
        void Friends_FriendOnline(object sender, FriendInfoEventArgs e)
        {
            if (!instance.GlobalSettings["show_friends_online_notifications"])
            {
                return;
            }

            ThreadPool.QueueUserWorkItem(sync =>
            {
                string name           = instance.Names.Get(e.Friend.UUID, true);
                MethodInvoker display = () =>
                {
                    DisplayNotification(e.Friend.UUID, name + " is online");
                    RefreshFriendsList();
                };

                if (InvokeRequired)
                {
                    BeginInvoke(display);
                }
                else
                {
                    display();
                }
            });
        }
Esempio n. 2
0
 private void Friends_OnFriendOnline(object sender, FriendInfoEventArgs e)
 {
     if (Announce)
     {
         Talker.Say("Your friend " + e.Friend.Name + " came on line.");
     }
 }
Esempio n. 3
0
        public override void Friends_OnFriendRights(object sender, FriendInfoEventArgs e)
        {
            var friend = e.Friend;

            AddName2Key(friend.Name, friend.UUID);
            base.Friends_OnFriendRights(sender, e);
        }
Esempio n. 4
0
        public void Friends_FriendOnOffline(object sender, FriendInfoEventArgs e)
        {
            Hashtable hash = new Hashtable();

            hash.Add("MessageType", "FriendOnOffline");
            hash.Add("Name", e.Friend.Name);
            hash.Add("ID", e.Friend.UUID);
            hash.Add("TheirRights", e.Friend.TheirFriendRights);
            hash.Add("MyRights", e.Friend.MyFriendRights);
            hash.Add("Online", e.Friend.IsOnline);
            enqueue(hash);
        }
Esempio n. 5
0
        private void Friends_OnFriendRights(object sender, FriendInfoEventArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(() => Friends_OnFriendRights(sender, e)));
                return;
            }

            BeginInvoke(new MethodInvoker(delegate()
            {
                RefreshFriendsList();
            }));
        }
Esempio n. 6
0
        public override void Friends_OnFriendOnline(object sender, FriendInfoEventArgs e)
        {
            var  friend = e.Friend;
            UUID id     = friend.UUID;

            if (friend.IsOnline && !string.IsNullOrEmpty(friend.Name) && friend.Name == client.MasterName)
            {
                client.Self.InstantMessage(id, "Hello Master");
            }
            if (!string.IsNullOrEmpty(friend.Name))
            {
                AddName2Key(friend.Name, id);
            }
            DeclareAvatarProfile(id);
            client.Friends.TrackFriend(id);
            //base.Friends_OnFriendOnline(friend);
        }
Esempio n. 7
0
 void Friends_FriendUpdate(object sender, FriendInfoEventArgs e)
 {
     RefreshFriends();
 }
Esempio n. 8
0
 void Friends_FriendUpdate(object sender, FriendInfoEventArgs e)
 {
     RefreshFriends();
 }