<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<style type="text/css">
	#airForm table th {
		font-weight: normal;
		cursor: default;
	}
	#airForm table th,
	#airForm table td {
		/*border: 1px solid red;*/
	}
</style>

<div class="box">
	<div class="title"><%: Html.Language("RoomStatus")%></div>
	<div class="container">
		<div class="content">
			<table style="width:100%;">
				<tr>
					<td style="text-align:center;width:20%;"><span class="RoomNumber"><%: Model.RoomNumber %></span></td>
					<td style="text-align:center;width:20%;"><span class="RoomStatus"><%: Model.RoomStatus %></span></td>
					<td style="text-align:center;width:20%;"><span class="Status"><%: Model.HostStatus %></span></td>
					<td style="text-align:center;width:20%;"><span class="IP"><%: Model.IP %></span></td>
					<td style="text-align:center;width:20%;"><a href="javascript:void(0)" class="easyui-linkbutton" onclick="changeAirSetting()"  <%: (bool)ViewData["EnableAirSetting"] ? "" : "disabled='disabled'" %> ><%:Html.Language("SendData")%></a></td>
				</tr>
			</table>
		</div>
	</div>
</div>

<form id="airForm" method="post" action="#">

<div class="clearfix" style="height:120px;position:relative;">

	<div class="box" style="width:49.5%;position:absolute;left:0;top:0;">
		<div class="title"><%: Html.Language("AirConditioningInformationDisplay")%></div>
		<div class="container" style="height:100px;">
			<div class="content">
	
				<table style="width:100%;">
					<tr>
						<th><%: Html.Language("AirConditioningSerialNumber")%></th>
						<td>
							<input id="cbxModalID" name="ModalID" class="easyui-combobox" style="width:80px;" 
								data-options="
									url: '/HostAir/LoadHostAirs?hostID=' + <%: Model.HostID %>,
									editable: false,
									panelHeight: 'auto',
									valueField: 'ModalTypeID',
									textField: 'CustomerName',
									onLoadSuccess: cbxModalIDOnLoadSuccess,
									onSelect: cbxModalIDOnSelect
									" />
						</td>
                        <th><%: Html.Language("TheWindWpeed")%></th>
						<td>
							<input name="Speed" class="easyui-combobox" style="width:60px;" disabled="disabled"
								data-options="
									editable: false,
									panelHeight: 'auto',
									valueField: 'value',
									textField: 'text',
									data: [
										{ value: '0', text: lang.Stop, selected: true },
										{ value: '1', text: lang.low },
										{ value: '2', text: lang.Middle },
										{ value: '3', text: lang.HighSpeed },
										{ value: '4', text: lang.Automatic }
									]
									" />	
						</td>
					</tr>
					<tr>
						<th><%: Html.Language("AirConditioningControls")%></th>
						<td><input name="ControlTypeName" class="easyui-textbox" style="width:80px;" readonly="readonly" /></td>
						<th><%: Html.Language("ValveStatus")%></th>
						<td><input name="Valve" class="easyui-textbox" style="width:60px;" readonly="readonly" /></td>
					</tr>
					<tr>
						<th><%: Html.Language("IndoorTemperature")%></th>
						<td><input name="CurrentTemp" class="easyui-numberbox" style="width:80px;" readonly="readonly" data-options="suffix:'℃'" /></td>
					</tr>
				</table>
	
			</div>
		</div>
	</div>
	
	<div class="box" style="width:49.5%;position:absolute;right:0;top:0;">
		<div class="title"><%: Html.Language("BasicSetup")%></div>
		<div class="container" style="height:100px;">
			<div class="content">
	
				<table style="width:100%;">
					<tr>
						<th><%: Html.Language("ModelWay")%></th>
						<td>
							<input id="cbxColdHotMode" name="ColdHotMode" class="easyui-combobox" style="width:60px;" 
								data-options="
									editable: false,
									panelHeight: 'auto',
									valueField: 'value',
									textField: 'text',
									data: [
										{ value: '0', text: lang.Manually, selected: true },
										{ value: '1', text: lang.Automatic }
									],
									onSelect: cbxColdHotModeOnSelect
								" />
						</td>
						<th><%: Html.Language("WindSpeed")%></th>
						<td>
							<input name="Speed" class="easyui-combobox" style="width:60px;"
								data-options="
									editable: false,
									panelHeight: 'auto',
									valueField: 'value',
									textField: 'text',
									data: [
										{ value: '0', text: lang.Stop, selected: true },
										{ value: '1', text: lang.low },
										{ value: '2', text: lang.Middle },
										{ value: '3', text: lang.HighSpeed },
										{ value: '4', text: lang.Automatic }
									]
									" />	
						</td>
					</tr>
					<tr>
						<th><%: Html.Language("HotAndColdMode")%></th>
						<td>
							<input id="cbxMode" name="Mode" class="easyui-combobox" style="width:60px;" 
								data-options="
									editable: false,
									panelHeight: 'auto',
									valueField: 'value',
									textField: 'text',
									data: [
										{ value: '0', text: '', selected: true },
										{ value: '1', text: lang.Refrigeration },
										{ value: '2', text: lang.Heating },
										{ value: '4', text: lang.BlowingIn },
										{ value: '8', text: lang.Dehumidification }
									]
								" />
						</td>
						<th><%: Html.Language("Locktopic")%></th>
						<td><input id="chkIsLockTemp" name="IsLockTemp" type="checkbox" /></td>
					</tr>
					<tr>
						<th><%: Html.Language("TemperatureSetting")%></th>
						<td><input name="SettingTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:15,max:35,suffix:'℃'" /></td>
						<th><%: Html.Language("LockTheTemperature")%></th>
						<td><input id="txtLockTemp" name="LockTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:15,max:35,suffix:'℃'" /></td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>

<div id="Div1" class="box">
	<div class="title"><%: Html.Language("ProfessionalSettings")%></div>
	<div class="container">
		<div class="content">
			<table style="width:100%;">
				<tr>
					<th><%: Html.Language("KeepTemperature")%></th>
					<td><input name="KeepTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
					<th><%: Html.Language("LowestTemperature")%></th>
					<td><input name="LowerTemp" class="easyui-numberspinner" value="16" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
					<th><%: Html.Language("HeatTransitionDelay")%></th>
					<td><input name="ColdHotSwitchDelayTime" class="easyui-numberspinner" value="30" style="width:60px;" data-options="required:true,min:30,max:60,editable:false,increment:10" /></td>
					<th><%: Html.Language("AssociatedState")%></th>
					<td><input id="chkRelateRoomStatus" name="RelateRoomStatus" type="checkbox" /></td>
				</tr>
				<tr>
					<th><%: Html.Language("TemperatureCompensated")%></th>
					<td><input name="CompensatoryTemp" class="easyui-numberspinner" value="0" style="width:60px;" data-options="required:true,min:-6,max:6,precision:1,increment:0.1,suffix:'℃'" /></td>
					<th><%: Html.Language("HighestTemperature")%></th>
					<td><input name="HightTemp" class="easyui-numberspinner" value="33" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
					<th><%: Html.Language("WelcomeModeTime")%></th>
					<td><input name="WelcomeTime" class="easyui-numberspinner" value="30" style="width:60px;" data-options="required:true,min:0,max:255" /></td>
					<th><%: Html.Language("AssociatedMagnetic")%></th>
					<td><input id="chkRelateDoorContact" name="RelateDoorContact" type="checkbox" /></td>
				</tr>
				<tr>
					<th><%: Html.Language("InitialTemperature")%></th>
					<td><input name="InitTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
					<th><%: Html.Language("HeatDeflection")%></th>
					<td><input id="txtHotDevition" name="HotDevition" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" /></td>
					<th></th><td></td>
					<th><%: Html.Language("StoppedFanRunsWhenTemperaturesReached")%></th>
					<td><input id="chkFanStop" type="checkbox" /></td>
				</tr>
				<tr>
					<th><%: Html.Language("DeadZoneTemperature")%></th>
					<td><input id="txtDeadTemp" name="DeadTemp" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" /></td>
					<th><%: Html.Language("ColdBias")%></th>
					<td><input id="txtColdDevition" name="ColdDevition" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" /></td>
					<th></th><td></td>
					<th><%: Html.Language("TheWindTurbineForbiddenToRunAtHighSpeed")%></th>
					<td><input id="chkDisableFanHighSpeed" type="checkbox" /></td>
				</tr>
			</table>
		</div>
	</div>
</div>
</form>
<script type="text/javascript" src="/Scripts/room-status-air-condition.js"></script>
<% switch ((int)Session["isCN"]){case 1: %>
<script type="text/javascript" src="/Scripts/en-US.js"></script>
<% break; case 2: %>
<script type="text/javascript" src="/Scripts/zh-TW.js"></script>
<% break;default: %>
<script type="text/javascript" src="/Scripts/zh-CN.js"></script>
<% break; } %>