Beispiel #1
0
 /// <summary>
 /// Creates a queue and initializes resources
 /// </summary>
 public DownloadQueue()
 {
     indirici      = null;
     elements      = new List <QueueElement>();
     downloadSpeed = 0;
     queuePaused   = true;
 }
Beispiel #2
0
        void createNextDownload()
        {
            QueueElement elt = getFirstNotCompletedElement();

            if (string.IsNullOrEmpty(elt.Url))
            {
                return;
            }
            indirici = new HTTPDownloader(elt.Url, elt.Destination);
            indirici.DownloadCompleted       += indirici_DownloadCompleted;
            indirici.DownloadProgressChanged += indirici_DownloadProgressChanged;
            indirici.StartAsync();
            currentElement   = elt;
            queuePaused      = false;
            startEventRaised = false;
        }