/// <summary> /// 文件被接收时触发事件 /// </summary> /// <param name="e"></param> protected virtual void OnFileSendAccept(FileSendEventArgs e) { FileTransfersItem item = e.SendFileManager.Tag as FileTransfersItem; if (item != null) { Form.ActiveForm.BeginInvoke(new MethodInvoker(delegate() { item.Start(); })); } if (FileSendAccept != null) { FileSendAccept(this, e); } }
/// <summary> /// 文件发送完成时触发事件 /// </summary> /// <param name="e"></param> protected virtual void OnFileSendComplete(FileSendEventArgs e) { FileTransfersItem item = e.SendFileManager.Tag as FileTransfersItem; if (item != null) { Form.ActiveForm.BeginInvoke(new MethodInvoker(delegate() { fileTansfersContainer.RemoveItem(item); item.Dispose(); })); } if (FileSendComplete != null) { FileSendComplete(this, e); } }