protected virtual void OnFileSendRefuse(FileSendEventArgs e)
 {
     if (FileSendRefuse != null)
     {
         FileSendRefuse(this, e);
     }
 }
 protected virtual void OnFileSendCancel(FileSendEventArgs e)
 {
     if (FileSendCancel != null)
     {
         FileSendCancel(this, e);
     }
 }
 protected virtual void OnFileSendComplete(FileSendEventArgs e)
 {
     if (FileSendComplete != null)
     {
         FileSendComplete(this, e);
     }
 }
 protected virtual void OnFileSendAccept(FileSendEventArgs e)
 {
     if (FileSendAccept != null)
     {
         FileSendAccept(this, e);
     }
 }
        private void FileSendRefuse(object sender, FileSendEventArgs e)
        {
            FileTransfersItem item =
                e.SendFileManager.Tag as FileTransfersItem;
            if (item != null)
            {
                BeginInvoke(new MethodInvoker(delegate()
                {
                    fileTansfersContainer1.RemoveItem(item);
                    item.Dispose();
                }));
            }

            AppendLog(string.Format("对方拒绝接收文件 {0} 。",e.SendFileManager.Name), true);
        }
        private void FileSendAccept(object sender, FileSendEventArgs e)
        {
            FileTransfersItem item =
                e.SendFileManager.Tag as FileTransfersItem;
            if (item != null)
            {
                //BeginInvoke(new MethodInvoker(delegate()
                //{
                item.Start();
                //}));
            }

            AppendLog(string.Format("对方同意接收文件 {0}。",e.SendFileManager.Name), true);
        }
 private void FileSendComplete(object sender, FileSendEventArgs e)
 {
     FileTransfersItem item =
         e.SendFileManager.Tag as FileTransfersItem;
     if (item != null)
     {
         BeginInvoke(new MethodInvoker(delegate()
         {
             fileTansfersContainer.RemoveItem(item);
             item.Dispose();
         }));
     }
     this.AppendSystemRtf(string.Format("文件 {0} 发送完成。", e.SendFileManager.Name));
 }
 private void FileSendAccept(object sender, FileSendEventArgs e)
 {
     FileTransfersItem item =
         e.SendFileManager.Tag as FileTransfersItem;
     item.Style = FileTransfersItemStyle.Cancel;
     if (item != null)
     {
         //BeginInvoke(new MethodInvoker(delegate()
         //{
         item.Start();
         //}));
     }
     this.AppendSystemRtf(string.Format("对方同意接收文件 {0}。", e.SendFileManager.Name));
 }