示例#1
0
 //public static List<Download> getAllDownloads()
 //{
 //    List<Download> dlp = new List<Download>();
 //    foreach (DownloadPackage dlp_ in downloads)
 //    {
 //        foreach (Download dl in dlp_.getDownloads())
 //        {
 //            dlp.Add(dl);
 //        }
 //    }
 //    return dlp;
 //}
 public static void ScheduleDownload(Download dl)
 {
     downloads.Add(dl);
     App.InvokeAction(delegate { DownloadControl dc = new DownloadControl(dl); App.mainWindow.listBox_downloadManager.Items.Add(dc); });
     Download();
 }
示例#2
0
        //public static List<Download> getAllDownloads()
        //{
        //    List<Download> dlp = new List<Download>();
        //    foreach (DownloadPackage dlp_ in downloads)
        //    {
        //        foreach (Download dl in dlp_.getDownloads())
        //        {
        //            dlp.Add(dl);
        //        }
        //    }
        //    return dlp;
        //}

        public static void ScheduleDownload(Download dl)
        {
            downloads.Add(dl);
            App.InvokeAction(delegate { DownloadControl dc = new DownloadControl(dl); App.mainWindow.listBox_downloadManager.Items.Add(dc); });
            Download();
        }