Beispiel #1
0
 private void FinishCallBack(PiceData data, bool ok)
 {
     lock (_dict)
     {
         _dict[data] = Status.Finish;
     }
 }
Beispiel #2
0
 private void FinishCallback(PiceData data, bool isSuccess)
 {
     lock (_pices)
     {
         if (!isSuccess)
         {
             _pices[data] = Status.Wait;
             return;
         }
         if (_fileStream.CanWrite)
         {
             _fileStream.Seek(data.Offsite, SeekOrigin.Begin);
             _fileStream.Write(data.Data, 0, data.Data.Length);
         }
         _pices[data] = Status.Finish;
         Progress();
     }
 }
Beispiel #3
0
 public bool DownloadPice(PiceData data)
 {
     return(DownloadPice(data.Entry, data.WriteStream, data.Offsite, data.Size));
 }