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(); } }); }
private void Friends_OnFriendOnline(object sender, FriendInfoEventArgs e) { if (Announce) { Talker.Say("Your friend " + e.Friend.Name + " came on line."); } }
public override void Friends_OnFriendRights(object sender, FriendInfoEventArgs e) { var friend = e.Friend; AddName2Key(friend.Name, friend.UUID); base.Friends_OnFriendRights(sender, e); }
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); }
private void Friends_OnFriendRights(object sender, FriendInfoEventArgs e) { if (InvokeRequired) { BeginInvoke(new MethodInvoker(() => Friends_OnFriendRights(sender, e))); return; } BeginInvoke(new MethodInvoker(delegate() { RefreshFriendsList(); })); }
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); }
void Friends_FriendUpdate(object sender, FriendInfoEventArgs e) { RefreshFriends(); }