/// <summary> /// Add a files to the list of files to be downloaded /// </summary> /// <param name="url">the URL to download the file from</param> /// <param name="targetlocation">the target location to save the file to</param> /// <returns></returns> public Boolean AddFile(string url, string targetlocation) { _files.Add(url, targetlocation); Size = new Size(Size.Width, Size.Height + 50); // make room for new control // create new control FileDownloadProgressBar control = new FileDownloadProgressBar { Location = new Point(0, 63 + _files.Count*50 - 50) }; control.CreateDownload(url, targetlocation); _downloads.Add(url, control); Controls.Add(control); Logger.Log(LogLevel.Info, "FileDownloader", "Added download: " + control.Filename + " from " + control.Url); return true; }
/// <summary> /// Add a files to the list of files to be downloaded /// </summary> /// <param name="url">the URL to download the file from</param> /// <param name="targetlocation">the target location to save the file to</param> /// <returns></returns> public Boolean AddFile(string url, string targetlocation) { _files.Add(url, targetlocation); Size = new Size(Size.Width, Size.Height + 50); // make room for new control // create new control FileDownloadProgressBar control = new FileDownloadProgressBar { Location = new Point(0, 63 + _files.Count * 50 - 50) }; control.CreateDownload(url, targetlocation); _downloads.Add(url, control); Controls.Add(control); Logger.Log(LogLevel.Info, "FileDownloader", "Added download: " + control.Filename + " from " + control.Url); return(true); }