예제 #1
0
 public override void Uninitialize()
 {
     if (_fileDownload != null)
     {
         _fileDownload.Abort(null);
         _fileDownload = null;
     }
 }
예제 #2
0
        static void Main(string[] args)
        {
            NetworkCredential credential = new NetworkCredential("username", "password");
            WebdavSession     session    = new WebdavSession(credential);
            Resource          resource   = new Resource(session);

            resource.DownloadProgress += new DownloadProgressEventHandler(DownloadProgress);

            try
            {
                FileDownload fileDownload = resource.DownloadFile("http://myserver/dav/file1.txt", "c:\\temp\\file1.txt");

                //Press ENTER to abort download
                Console.Read();
                fileDownload.Abort();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.Read();
            }

            //Press ENTER to exit.
            Console.Read();
        }
예제 #3
0
 public override void Abort()
 {
     base.Abort();
     if (_fileDownload.Downloading)
     {
         _fileDownload.Abort(null);
     }
 }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        public void AbortUpdate()
        {
            StopAllCoroutines();

            if (verifier_ != null)
            {
                verifier_.Abort();
                verifier_ = null;
            }
            if (file_download_ != null)
            {
                file_download_.Abort();
                file_download_ = null;
            }
            if (ab_download_ != null)
            {
                ab_download_.Abort();
                ab_download_ = null;
            }
            SaveDownloadCacheData();
            UpdateState(emState.Abort);
            Done();
        }
예제 #5
0
    /// <summary>
    ///
    /// </summary>
    public void AbortUpdate()
    {
        StopAllCoroutines();

        if (_verifier != null)
        {
            _verifier.Abort();
            _verifier = null;
        }
        if (_file_download != null)
        {
            _file_download.Abort();
            _file_download = null;
        }
        if (_ab_download != null)
        {
            _ab_download.Abort();
            _ab_download = null;
        }
        SaveDownloadCacheData();
        UpdateState(EmState.Abort);
        Done();
    }