Beispiel #1
0
        public void DownloadUpdates(string cycle)
        {
            if (File.Exists(waitFilePath))
            {
                return;
            }
            //Delete All Files

            Dictionary <String, bool> updateCheckList = new Dictionary <string, bool>();

            //Loop through subs for HHDownload set, download
            foreach (Subscription subscription in Subscriptions)
            {
                if (subscription.Type.Equals("DownloadSet") && HasCurrentCycle(subscription.Cycle, cycle))
                {
                    if (File.Exists(Path.Combine(subscription.Destination, subscription.FileName)))
                    {
                        File.Delete(Path.Combine(subscription.Destination, subscription.FileName));
                    }
                    bool fileDownloaded = RequestHandler.StartDownloadSetRequest(
                        ServiceAddress.GetDownloadUpdateURL(Settings, User, subscription)
                        , subscription);
                    updateCheckList.Add(subscription.Name, fileDownloaded);
                }
            }
        }