Exemple #1
0
        public DownloadResultList DownloadWithDialog(DownloadRequestList objDownloadRequests, DownloadDialogSettings objDownloadDialogSettings)
        {
            if (objDownloadRequests == null)
            {
                throw new ArgumentNullException("objDownloadRequests", "A valid non-null DownloadRequestList is expected");
            }
            if (objDownloadDialogSettings == null)
            {
                throw new ArgumentNullException("objDownloadDialogSettings", "A valid non-null DownloadDialogSettings is expected");
            }

            DownloadResultList objDownloadResults = DownloadDialog.ShowDialog(objDownloadRequests, objDownloadDialogSettings);

            return(objDownloadResults);
        }
Exemple #2
0
        public static DownloadResultList ShowDialog(DownloadRequestList objDownloadRequests, DownloadDialogSettings objDownloadDialogSettings)
        {
            if (objDownloadRequests == null)
            {
                throw new ArgumentNullException("objDownloadRequests", "A valid non-null DownloadRequestList is expected");
            }
            if (objDownloadDialogSettings == null)
            {
                throw new ArgumentNullException("objDownloadDialogSettings", "A valid non-null DownloadDialogSettings is expected");
            }

            DownloadResultList objDownloadResults = null;

            using (DownloadDialog objFileDownloadDialog = new DownloadDialog())
            {
                objDownloadResults = objFileDownloadDialog.ShowDialogWithResult(objDownloadRequests, objDownloadDialogSettings);
            }

            return(objDownloadResults);
        }