private void _chat_FileAdded(BitChat sender, SharedFile sharedFile) { SharedFileItem item = new SharedFileItem(sharedFile, _chat); item.FileRemoved += OnFileRemoved; lstFiles.AddItem(item); }
private void chat_FileAdded(BitChat.Peer peer, MessageItem message, SharedFile sharedFile) { SharedFileItem item = new SharedFileItem(sharedFile, _chat); item.FileRemoved += sharedFile_FileRemoved; item.ShareFile += view_ShareFile; lstFiles.AddItem(item); if (!peer.IsSelf) { MessageNotification(_chat, null, peer.PeerCertificate.IssuedTo.Name + " shared a file"); } }
private void sharedFile_FileRemoved(object sender, EventArgs e) { SharedFileItem item = sender as SharedFileItem; lstFiles.RemoveItem(item); }