Пример #1
0
        private void HandleFriendAdded(ParseData pd)
        {
            DataReader dr = new DataReader(pd.Data);
            int nextIndex = m_friendsList.Count;
            FriendUser newFriend = __ParseNewFriend(dr, nextIndex);
            m_friendsList.Add(newFriend);

            FriendAddedEventArgs args = new FriendAddedEventArgs(newFriend) { EventData = pd };
            OnFriendAdded(args);
        }
Пример #2
0
 void client_FriendAdded(object sender, FriendAddedEventArgs e)
 {
     ThreadStart ts = delegate
     {
         this.lbFriends.Items.Add(e.NewFriend);
     };
     if (InvokeRequired)
         BeginInvoke(ts);
     else
         ts();
 }
Пример #3
0
 void Client_FriendAdded(object sender, FriendAddedEventArgs e)
 {
     if (__friendAdded != null)
         __friendAdded.Call(_host.ClientHost, ConvObj(e));
 }