<%@ Page language="c#" AutoEventWireup="false" Inherits="Mytaoyuan.Com.Upload.ProgressPage" %>
<%@ Register TagPrefix="Upload" Namespace="Mytaoyuan.Com.Upload" Assembly="Mytaoyuan.Com.Upload" %>
<html>
	<head>
		<title>上传进度</title>	
		<style type="text/css">
<!--
		body, form, table, tr, td {
			margin: 0px;
			border: 0px none;
			padding: 0px;
		}

		#progressDisplayCenterer {
			vertical-align: middle;
			width: 100%;
			height: 100%;
		}
		
		#progressDisplay {
			vertical-align: middle;
			width: 100%;
		}
		
		#barTd {
			
		}
		
		#statusDiv {
			  position: relative;
			  width: 100%;
			  z-index: 1;
			  border: 1px solid #dfdfdf;
			  height: 29px;
			  line-height: 29px;
			  text-align: center;
			  color: #1DA7DD;
		}
		
		#barDiv,#barDetailsDiv {
			border: 0px none ; 
			margin: 0px; 
			padding: 0px; 
			position: absolute; 
			top: 0pt; 
			left: 0pt; 
			z-index: -1; 
			height: 100%;
			width: 75%;
		}
		.ProgressDisplay {
			font-size: 12px;
		}

		.ProgressDisplay .StatusMessage {
			margin: 1px;
			height: 1.5em;
		}

		.ProgressDisplay .ProgressBar {
			background-color: rgb(223, 223, 223);
		}

		.ProgressDisplay .ImageButton {
			border-width: 0px; 
			margin: 0px; 
			padding: 0px;
			background-color: inherit;
		}

		.ProgressDisplay .ImageButton img {
			  margin: 0px;
			  padding: 0px;
			  height: 31px;
			  vertical-align: top;
		}
-->
		</style>
	</head>
	<body>
		<form id="dummyForm" runat="server">
		<table id="progressDisplayCenterer">
		<tr>
		<td>
		<table id="progressDisplay" class="ProgressDisplay">
		<tr>
		<td style="width:70px;text-align:right;color:#656565;">
			<span id="label" runat="server" class="Label">上传状态：</span>		</td>
		<td id="barTd" >
			<div id="statusDiv" runat="server" class="StatusMessage">&#160;
				<Upload:DetailsSpan id="normalInProgress" runat="server" WhenStatus="NormalInProgress" style="font-weight: normal; white-space: nowrap;">
					<%# FormatCount(BytesRead) %>/<%# FormatCount(BytesTotal) %> <%# CountUnits %>
					(<%# String.Format("{0:0%}", FractionComplete) %>) 速度： <%# FormatRate(BytesPerSec) %>
					剩余时间： <%# FormatTimeSpan(TimeRemaining) %> 
				</Upload:DetailsSpan>
				<Upload:DetailsSpan id="chunkedInProgress" runat="server" WhenStatus="ChunkedInProgress" style="font-weight: normal; white-space: nowrap;">
					<%# FormatCount(BytesRead) %> <%# CountUnits %>
					速度： <%# FormatRate(BytesPerSec) %>
					剩余时间： <%# FormatTimeSpan(TimeElapsed) %> 
				</Upload:DetailsSpan>
				<Upload:DetailsSpan id="completed" runat="server" WhenStatus="Completed">
					完成：<%# FormatCount(BytesRead) %> <%# CountUnits %>
					总共 <%# FormatRate(BytesPerSec) %>
					用时 <%# FormatTimeSpan(TimeElapsed) %>
				</Upload:DetailsSpan>
				<Upload:DetailsSpan id="cancelled" runat="server" WhenStatus="Cancelled">
					上传被取消！
				</Upload:DetailsSpan>
				<Upload:DetailsSpan id="rejected" runat="server" WhenStatus="Rejected">
					上传被拒绝： <%# Rejection != null ? Rejection.Message : "" %>
				</Upload:DetailsSpan>
				<Upload:DetailsSpan id="error" runat="server" WhenStatus="Failed">
					错误： <%# Failure != null ? Failure.Message : "" %>
				</Upload:DetailsSpan>
				<Upload:DetailsDiv id="barDetailsDiv" runat="server" UseHtml4="true"
					 Width='<%# Unit.Percentage(Math.Floor(100*FractionComplete)) %>' class="ProgressBar"></Upload:DetailsDiv>	
			</div>
		</td>
		<td style="width:50px;">
			<asp:HyperLink id="cancel" runat="server" Visible='<%# CancelVisible %>' NavigateUrl='<%# CancelUrl %>' title="取消上传" class="ImageButton" ><img id="cancelImage" runat="server" src="pics/cancel.png" alt="取消上传" /></asp:HyperLink>
			<asp:HyperLink id="refresh" runat="server" Visible='<%# StartRefreshVisible %>' NavigateUrl='<%# StartRefreshUrl %>' title="刷新" class="ImageButton" ><img id="refreshImage" runat="server" src="pics/refresh.png" alt="刷新" /></asp:HyperLink>
			<asp:HyperLink id="stopRefresh" runat="server" Visible='<%# StopRefreshVisible %>' NavigateUrl='<%# StopRefreshUrl %>' title="停止刷新" class="ImageButton"><img id="stopRefreshImage" runat="server" src="pics/stop_refresh.png" alt="停止刷新" /></asp:HyperLink>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</form>
	</body>
</html>
