Пример #1
0
 public void WaitFinish()
 {
     if (DownloadFileThreadRunning)
     {
         EndDownloadFileProcess.WaitOne();
     }
 }
Пример #2
0
        public void StopDownloading()
        {
            if (DownloadFileThreadRunning)
            {
                DownloadFileThreadRunning = false;

                while (!EndDownloadFileProcess.WaitOne(200, false))
                {
                    System.Windows.Forms.Application.DoEvents();
                }

                DownloadProcessThread.Abort();
                DownloadProcessThread = null;
            }
        }