示例#1
0
 private void DownloadProgress(object sender, ProgressChangedEventArgs e)
 {
     HttpDownload download = sender as HttpDownload;
     if (download != null && this.HttpDataReceived != null)
         this.HttpDataReceived(download.Guid, e);
 }
示例#2
0
        void DownloadProgress(object sender, ProgressChangedEventArgs e)
        {
            byte[] data = (byte[])e.UserState;
            if (_data == null)
            {
                _data = new byte[data.Length];
                Array.Copy(data, 0, _data, 0, _data.Length);
            }
            else
            {
                byte[] b = new byte[_data.Length];
                Array.Copy(_data, 0, b, 0, b.Length);

                _data = new byte[_data.Length + data.Length];
                Array.Copy(b, 0, _data, 0, b.Length);
                Array.Copy(data, 0, _data, b.Length, data.Length);
            }
        }
示例#3
0
 void ResponseReceived(object sender, ProgressChangedEventArgs e)
 {
     HttpDownload download = sender as HttpDownload;
     if (download != null && this.HttpResponseReceived != null)
         this.HttpResponseReceived(download.Guid, e);
 }