Exemplo n.º 1
0
        /// <summary>
        ///   下载
        /// </summary>
        bool Download(string file_name)
        {
            download_ = new HttpAsyDownload(URL);
            download_.Start(RootPath, file_name, _OnDownloadNotifyCallback, _OnDownloadErrorCallback);

            return(true);
        }
Exemplo n.º 2
0
 /// <summary>
 ///   下载错误回调
 /// </summary>
 void _OnDownloadErrorCallback(HttpAsyDownload d)
 {
     IsDone    = true;
     ErrorCode = d.ErrorCode;
 }
Exemplo n.º 3
0
 /// <summary>
 ///   下载进度通知回调
 /// </summary>
 void _OnDownloadNotifyCallback(HttpAsyDownload d, long size)
 {
     CompletedSize = d.CompletedLength;
     TotalSize     = d.Length;
     UpdateState();
 }