Esempio n. 1
0
 /// <summary>
 /// 启动文件发送系统
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button5_Click(object sender, EventArgs e)
 {
     try
     {
         FileSend = FileStart.StartFileSend(this);
     }
     catch (Exception Ex) { MessageBox.Show(Ex.Message); return; }
     FileSend.BufferSize = 191230;
     button5.Enabled     = false;
 }
Esempio n. 2
0
        /// <summary>
        /// 启动文件发送系统;
        /// </summary>
        /// <param name="sendMust">IFileSendMust</param>
        /// <returns>IFileSend</returns>
        public static IFileSend StartFileSend(IFileSendMust sendMust)
        {
            if (fileSend != null)
            {
                throw new Exception("已经启动了文件发送系统;");
            }
            fileSend = new SendFile(sendMust);
            IFileSend IfileSend = fileSend;

            return(IfileSend);
        }