예제 #1
0
        protected UploadResultList ShowDialogWithResult(UploadRequestList objUploadRequests, UploadDialogSettings objUploadDialogSettingss)
        {
            _objUploadRequests       = objUploadRequests;
            _objUploadDialogSettings = objUploadDialogSettingss;

            ThreadStart objThreadStart = new ThreadStart(UploadThread);

            _objUploadThread = new Thread(objThreadStart);
            _objUploadThread.IsBackground = true;
            _objUploadThread.Start();

            this.ShowDialog();

            return(_objUploadResults);
        }
예제 #2
0
        public UploadResultList UploadWithDialog(UploadRequest objUploadRequest, UploadDialogSettings objUploadDialogSettings)
        {
            if (objUploadRequest == null)
            {
                throw new ArgumentNullException("objUploadRequest", "A valid non-null UploadRequest is expected");
            }
            if (objUploadDialogSettings == null)
            {
                throw new ArgumentNullException("objUploadDialogSettings", "A valid non-null UploadDialogSettings is expected");
            }

            UploadRequestList objUploadRequests = new UploadRequestList();

            objUploadRequests.Add(objUploadRequest);

            return(UploadWithDialog(objUploadRequests, objUploadDialogSettings));
        }
예제 #3
0
        public UploadResultList UploadWithDialog(UploadRequestList objUploadRequests, UploadDialogSettings objUploadDialogSettings)
        {
            if (objUploadRequests == null)
            {
                throw new ArgumentNullException("objUploadRequests", "A valid non-null UploadRequestList is expected");
            }

            UploadResultList objUploadResults = UploadDialog.ShowDialog(objUploadRequests, objUploadDialogSettings);

            return(objUploadResults);
        }
예제 #4
0
        public static UploadResultList ShowDialog(UploadRequestList objUploadRequests, UploadDialogSettings objUploadDialogSettingss)
        {
            if (objUploadRequests == null)
            {
                throw new ArgumentNullException("objUploadRequests", "A valid non-null UploadRequestList is expected");
            }
            if (objUploadDialogSettingss == null)
            {
                throw new ArgumentNullException("objUploadDialogSettingss", "A valid non-null UploadDialogSettings is expected");
            }

            UploadResultList objUploadResults = null;

            using (UploadDialog objFileUploadDialog = new UploadDialog())
            {
                objUploadResults = objFileUploadDialog.ShowDialogWithResult(objUploadRequests, objUploadDialogSettingss);
            }

            return(objUploadResults);
        }