예제 #1
0
 /// <summary>
 /// 启动文件接收系统
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button8_Click(object sender, EventArgs e)
 {
     try
     {
         FileReceive = FileStart.StartFileReceive(this);
     }
     catch (Exception Ex) { MessageBox.Show(Ex.Message); return; }
     FileReceive.BufferSize = 191230;
     button8.Enabled        = false;
 }
예제 #2
0
        /// <summary>
        /// 启动文件接收系统
        /// </summary>
        /// <param name="receiveMust">IFileReceiveMust</param>
        /// <returns>IFileReceive</returns>
        public static IFileReceive StartFileReceive(IFileReceiveMust receiveMust)
        {
            if (fileReceive != null)
            {
                throw new Exception("已经启动了文件接收系统;");
            }
            fileReceive = new ReceiveFile(receiveMust);
            IFileReceive IfileReceive = fileReceive;

            return(IfileReceive);
        }