Exemplo n.º 1
0
 private void downloader_DownloadCompleted(object sender, DownloadCompleteEventArgs e)
 {
     if (DownloadCompleted != null)
     {
         DownloadCompleted(sender, e);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 触发下载完成事件
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnDownloadCompleted(DownloadCompleteEventArgs e)
 {
     if (DownloadCompleted != null)
     {
         DownloadCompleted(this, e);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 异步完成方法
 /// </summary>
 /// <param name="exception"></param>
 /// <param name="canceled"></param>
 /// <param name="asyncOp"></param>
 private void CompletionMethod(Exception exception, bool canceled, AsyncOperation asyncOp)
 {
     if (!canceled)
     {
         lock (userStateToLifetime.SyncRoot)
         {
             userStateToLifetime.Remove(asyncOp.UserSuppliedState);
         }
     }
     DownloadCompleteEventArgs e = new DownloadCompleteEventArgs(exception, canceled, asyncOp.UserSuppliedState);
     e.Manifest = manifest;
     asyncOp.PostOperationCompleted(onCompletedDelegate, e);
     current = null;
 }
Exemplo n.º 4
0
 void DownloadCompleted(object sender, DownloadCompleteEventArgs e)
 {
     mList.Add(e.Manifest);
     if (mList.Count == mLen)
     {
         updater.Activate(mList.ToArray());
         mList.Clear();
     }
 }