예제 #1
0
 protected virtual void OnFileSendRefuse(FileSendEventArgs e)
 {
     if (FileSendRefuse != null)
     {
         FileSendRefuse(this, e);
     }
 }
예제 #2
0
 protected virtual void OnFileSendCancel(FileSendEventArgs e)
 {
     if (FileSendCancel != null)
     {
         FileSendCancel(this, e);
     }
 }
예제 #3
0
 protected virtual void OnFileSendComplete(FileSendEventArgs e)
 {
     if (FileSendComplete != null)
     {
         FileSendComplete(this, e);
     }
 }
예제 #4
0
 protected virtual void OnFileSendAccept(FileSendEventArgs e)
 {
     if (FileSendAccept != null)
     {
         FileSendAccept(this, e);
     }
 }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
 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));
 }
예제 #8
0
 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));
 }