Exemple #1
0
        /// <summary>
        /// 上传当前文件
        /// </summary>
        /// <param name="initParams"></param>
        public void Upload(string initParams)
        {
            this.State = Constants.FileStates.Uploading;

            _fileUploader = new FileUploader(this);
            _fileUploader.UploadAdvanced(initParams);
            _fileUploader.UploadFinished += new EventHandler(fileUploader_UploadFinished);
        }
Exemple #2
0
        /// <summary>
        /// 取消上传,注:该文件仅在本类中的IsDeleted属性中使用
        /// </summary>
        //public void CancelUpload()
        //{
        //    if (_fileUploader != null && this.State == Constants.FileStates.Uploading)
        //        _fileUploader.CancelUpload();
        //}

        /// <summary>
        /// 当前文件上传完成时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void fileUploader_UploadFinished(object sender, EventArgs e)
        {
            _fileUploader = null;
            this.State    = Constants.FileStates.Finished;

            //CWViewUploadedImage cw = new CWViewUploadedImage();

            //cw.Closed += (o, eventArgs) =>
            //{
            //    if (cw.DialogResult == true)//确定并就隐藏当前sl应用窗口
            //        MessageBox.Show(cw.DialogResult.ToString());
            //};
            //cw.Show();
        }
Exemple #3
0
        /// <summary>
        /// 取消上传,注:该文件仅在本类中的IsDeleted属性中使用
        /// </summary>
        //public void CancelUpload()
        //{
        //    if (_fileUploader != null && this.State == Constants.FileStates.Uploading)
        //        _fileUploader.CancelUpload();
        //}

        /// <summary>
        /// 当前文件上传完成时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void fileUploader_UploadFinished(object sender, EventArgs e)
        {
            _fileUploader = null;
            this.State = Constants.FileStates.Finished;

            //CWViewUploadedImage cw = new CWViewUploadedImage();

            //cw.Closed += (o, eventArgs) =>
            //{
            //    if (cw.DialogResult == true)//确定并就隐藏当前sl应用窗口
            //        MessageBox.Show(cw.DialogResult.ToString());
            //};
            //cw.Show();
        }
Exemple #4
0
        /// <summary>
        /// 上传当前文件
        /// </summary>
        /// <param name="initParams"></param>
        public void Upload(string initParams)
        {
            this.State = Constants.FileStates.Uploading;

            _fileUploader = new FileUploader(this);            
            _fileUploader.UploadAdvanced(initParams);
            _fileUploader.UploadFinished += new EventHandler(fileUploader_UploadFinished);            
        }