<%@ 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 {
			width: 100%;
		}
		
		#statusDiv {
			border-width: 1px;
			border-style: solid;
			padding: 0px;
			position: relative;
			width: 100%;
			text-align: center;
			z-index: 1; 
		}
		
		#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(204, 204, 204);
		}

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

		.ProgressDisplay .ImageButton img {
			border-width: 2px; 
			border-style: outset;
			border-color: white;
			margin: 0px; 
			padding: 0px;
			height: 1.5em;
			vertical-align: top;
		}
-->
		</style>
	</head>
	<body>
		<form id="dummyForm" runat="server">
		<table id="progressDisplayCenterer">
		<tr>
		<td>
		<table id="progressDisplay" class="ProgressDisplay">
		<tr>
		<td width="15%">
			<span id="label" runat="server" class="Label">上传状态：</span>		</td>
		<td width="80%" 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 width="10%">
			<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>
