<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Domain" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
	<meta http-equiv="cache-control" content="max-age=0" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />
	<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
	<meta http-equiv="pragma" content="no-cache" />
	<title>房间号：<%: ViewData["RoomNumber"] %></title>
	<link type="text/css" rel="stylesheet" href="/Styles/WeiXin/common.css" />
	<link type="text/css" rel="stylesheet" href="/Styles/WeiXin/tip.css" />
	<link type="text/css" rel="stylesheet" href="/Styles/WeiXin/tv.css" />
	<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
	<script type="text/javascript" src="/Scripts/WeiXin/tip.js"></script>
	<script type="text/javascript">
		$(function () {

			$('#tv-panel a').click(function () { 

				if ($(this).hasClass('off')) {
				    $(this).removeClass('off');
					$(this).addClass('on');
				}
				else if ($(this).hasClass('on')) {
				    $(this).removeClass('on');
					$(this).addClass('off');
				}

				$.ajax({
					url: '/WeiXin/Television',
					type: 'POST',
					dataType: 'JSON',
					data: {
						RoomNumber: $('#hfRoomNumber').val(),
						Key: $(this).attr('key')
					},
					success: function (r) {
						if (!r.IsSuccess) {
							showTip(r.Message);
						}
						
					}
				});
			});
		});
	</script>
</head>
<body>
	<%--<input id="hfTvModalId" type="hidden" name="TvModalId" value='<%: ViewData["TvModalId"] %>' />
	--%><input id="hfRoomNumber" type="hidden" name="RoomNumber" value='<%: ViewData["RoomNumber"] %>' />
	<div id="tv-panel">
		<div id="top" class="clearfix">
			<a id="tv-mute" href="javascript:void(0)" key='<%: TvKey.Mute.ToString() %>'><span
				class="icon icon-tv-mute"></span></a><a id="tv-switch" href="javascript:void(0)"
					class="off" key='<%: TvKey.Power.ToString() %>'><span class="icon icon-tv-switch">
					</span></a>
		</div>
		<div id="middle" class="clearfix">
			<div id="voice-panel" class="clearfix">
				<a id="tv-voice-inc" href="javascript:void(0)" key='<%: TvKey.VoiceInc.ToString() %>'>
					+</a> <span class="text">音量</span> <a id="tv-voice-dec" href="javascript:void(0)"
						key='<%: TvKey.VoiceDec.ToString() %>'>-</a>
			</div>
			<div id="dir-panel">
				<div style="width: 150px; height: 150px; position: relative; margin: 0 auto;">
					<a id="tv-key-up" href="javascript:void(0)" key='<%: TvKey.Up.ToString() %>'><span
						class="icon icon-tv-key-up"></span></a><a id="tv-key-left" href="javascript:void(0)"
							key='<%: TvKey.Left.ToString() %>'><span class="icon icon-tv-key-left"></span>
					</a><a id="tv-key-ok" href="javascript:void(0)" key='<%: TvKey.Ok.ToString() %>'>确定
					</a><a id="tv-key-right" href="javascript:void(0)" key='<%: TvKey.Right.ToString() %>'>
						<span class="icon icon-tv-key-right"></span></a><a id="tv-key-down" href="javascript:void(0)"
							key='<%: TvKey.Down.ToString() %>'><span class="icon icon-tv-key-down"></span>
					</a>
				</div>
			</div>
			<div id="channel-panel" class="clearfix">
				<a id="tv-channel-inc" href="javascript:void(0)" key='<%: TvKey.ChannelInc.ToString() %>'>
					+</a> <span class="text">频道</span> <a id="tv-channel-dec" href="javascript:void(0)"
						key='<%: TvKey.ChannelDec.ToString() %>'>-</a>
			</div>
		</div>
		<div id="bottom" class="clearfix">
			<a id="tv-key-home" key='<%: TvKey.Home.ToString() %>'><i class="icon icon-tv-key-home">
			</i><em class="text">主页</em> </a><a id="tv-key-menu" key='<%: TvKey.Menu.ToString() %>'>
				<i class="icon icon-tv-key-menu"></i><em class="text">菜单</em> </a><a id="tv-key-source"
					key='<%: TvKey.Source.ToString() %>'><i class="icon icon-tv-key-source"></i><em class="text">
						信源</em> </a><a id="tv-key-replay" key='<%: TvKey.Replay.ToString() %>'><i class="icon icon-tv-key-replay">
						</i><em class="text">回看</em> </a>
		</div>
	</div>
	<% Html.RenderPartial("Footer"); %>
</body>
</html>
