您目前尚未登陆,请选择【登陆】或【注册
首页->上传下载->51aspx大文件上传并显示进度和上传速率示例及组建源码>>WebbUpload/UploadStatus.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:51aspx大文件上传并显示进度和上传速率示例及组建源码
当前文件:文件类型 LargeFileUpload/WebbUpload/UploadStatus.cs打开代码结构图
普通视图
		            
1using System; 2using System.Web; 3 4namespace Webb.WAVE.Controls.Upload 5{ 6 /// <summary> 7 /// 8 /// </summary> 9 internal class UploadStatus:IDisposable 10 { 11 public enum UploadState : byte 12 { 13 Initializing = 0, 14 Uploading = 1, 15 Uploaded = 2, 16 Moving = 3, 17 Completed = 4, 18 Error = 5 19 } 20 21 Fields 31 32 properties 120 121 public UploadStatus() 122 { 123 this.m_beginTime = System.DateTime.Now; 124 this.m_fileCount = 0; //1 125 this.m_fileName = string.Empty; 126 this.m_dataLength = 100L; //100 127 this.m_readLength = 0L; //1 128 this.m_uploadID = Guid.NewGuid().ToString(); 129 this.m_status = UploadState.Initializing; 130 this.m_isActive = true; 131 } 132 133 public void ResetBeginTime() 134 { 135 this.m_beginTime = System.DateTime.Now; 136 } 137 138 public void GetUploadStatus(string m_uploadGUID) 139 { 140 UploadStatus m_status = HttpContext.Current.Application[("Upload_Status_"+m_uploadGUID)] as UploadStatus; 141 if(m_status!=null) 142 { 143 this.m_beginTime = m_status.BeginTime; 144 this.m_fileCount = m_status.FileCount; 145 this.m_fileName = m_status.FileName; 146 this.m_dataLength = m_status.AllDataLength; 147 this.m_readLength = m_status.ReadData; 148 this.m_uploadID = m_status.UploadGUID; 149 this.m_status = m_status.Status; 150 this.m_isActive = true; 151 } 152 else 153 { 154 this.m_isActive = false; 155 } 156 } 157 un-initializtion and dispose 166 } 167} 168
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:51aspx大文件上传并显示进度和上传速率示例及组建源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号