Exemplo n.º 1
0
        public void Remove(BitChat chat)
        {
            //remove self from chat
            chat.RemoveSharedFile(this);

            //announce no participation
            SendFileShareUnparticipate(chat);

            //remove chat from list
            lock (_chats)
            {
                _chats.Remove(chat);

                if (_chats.Count == 0)
                {
                    _sharedFiles.Remove(_metaData.FileID);
                    this.Dispose();
                }
            }

            if (FileRemoved != null)
            {
                RaiseEventFileRemoved();
            }
        }
 private void btnRemove_Click(object sender, EventArgs e)
 {
     _chat.RemoveSharedFile(_sharedFile);
 }
Exemplo n.º 3
0
        public void Remove(BitChat chat)
        {
            //remove self from chat
            chat.RemoveSharedFile(this);

            //announce no participation
            SendFileShareUnparticipate(chat);

            //remove chat from list
            lock (_chats)
            {
                _chats.Remove(chat);

                if (_chats.Count == 0)
                {
                    _sharedFiles.Remove(_metaData.FileID);
                    this.Dispose();
                }
            }

            if (FileRemoved != null)
                RaiseEventFileRemoved();
        }