Ejemplo n.º 1
0
        internal ProgressData GetProgressData()
        {
            RadUploadProgressData progressData = new RadUploadProgressData();

            if (this.StateStore != null)
            {
                this.PopulateProgressData(progressData);
            }
            return(progressData);
        }
Ejemplo n.º 2
0
        private void PopulateProgressData(RadUploadProgressData progressData)
        {
            FileHeaderInfo info = this.FindLastUploadedFile();

            progressData.CurrentOperationText = string.Empty;
            if (info != null)
            {
                progressData.CurrentOperationText = info.FileName;
            }
            progressData.PrimaryTotal      = this.FormatBytes(this.RequestLength);
            progressData.PrimaryValue      = this.FormatBytes(this.StateStore.CurrentRequestBytesCount);
            progressData.PrimaryPercent    = (int)Math.Round((decimal)((this.StateStore.CurrentRequestBytesCount / this.RequestLength) * 100M));
            progressData.SecondaryValue    = this.GetCompleteFileCount();
            progressData.Speed             = this.GetFormattedSpeed();
            progressData.TimeElapsed       = this.ElapsedMilliseconds;
            progressData.TimeEstimated     = this.GetEstimatedTime();
            progressData.RequestLength     = this.RequestLength;
            progressData.CompleteBytes     = this.StateStore.CurrentRequestBytesCount;
            progressData.OperationComplete = this.UploadComplete;
        }
 private void PopulateProgressData(RadUploadProgressData progressData)
 {
     FileHeaderInfo info = this.FindLastUploadedFile();
     progressData.CurrentOperationText = string.Empty;
     if (info != null)
     {
         progressData.CurrentOperationText = info.FileName;
     }
     progressData.PrimaryTotal = this.FormatBytes(this.RequestLength);
     progressData.PrimaryValue = this.FormatBytes(this.StateStore.CurrentRequestBytesCount);
     progressData.PrimaryPercent = (int)Math.Round((decimal)((this.StateStore.CurrentRequestBytesCount / this.RequestLength) * 100M));
     progressData.SecondaryValue = this.GetCompleteFileCount();
     progressData.Speed = this.GetFormattedSpeed();
     progressData.TimeElapsed = this.ElapsedMilliseconds;
     progressData.TimeEstimated = this.GetEstimatedTime();
     progressData.RequestLength = this.RequestLength;
     progressData.CompleteBytes = this.StateStore.CurrentRequestBytesCount;
     progressData.OperationComplete = this.UploadComplete;
 }
 internal ProgressData GetProgressData()
 {
     RadUploadProgressData progressData = new RadUploadProgressData();
     if (this.StateStore != null)
     {
         this.PopulateProgressData(progressData);
     }
     return progressData;
 }