void client_FriendRemoved(object sender, FriendRemovedEventArgs e) { ThreadStart ts = delegate { this.lbFriends.Items.Remove(e.Friend); }; if (InvokeRequired) BeginInvoke(ts); else ts(); }
void Client_FriendRemoved(object sender, FriendRemovedEventArgs e) { if (__friendRemoved != null) __friendRemoved.Call(_host.ClientHost, ConvObj(e)); }
private void HandleFriendRemoved(ParseData pd) { DataReader dr = new DataReader(pd.Data); byte index = dr.ReadByte(); FriendUser removed = m_friendsList[index]; m_friendsList.RemoveAt(index); for (int i = index; i < m_friendsList.Count; i++) { m_friendsList[i].Index -= 1; } FriendRemovedEventArgs args = new FriendRemovedEventArgs(removed) { EventData = pd }; OnFriendRemoved(args); }