<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script type="text/javascript" src="Script/Ajax.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" />
<title>Desktop Viewer</title>
</head>
<script type="text/javascript">
var data = { Code: 0, Img: "", ZoomX: 5, ZoomY: 5 };
var refreshfreq = 500;
function NewServerMessage(response, action) {
if (response == "") return;
var message = eval('(' + response + ')');
switch (message.Code) {
case 0:
break;
case 1:
var img = document.getElementById("img");
img.setAttribute("src", message.Img);
var field = document.getElementById("zoomx");
field.innerHTML = data.ZoomX.toString();
field = document.getElementById("zoomy");
field.innerHTML = data.ZoomY.toString();
var t = setTimeout("req()", refreshfreq);
break;
}
}
function listen() {
var t = setTimeout(" req()", 1000);
}
function req() {
ajax.SendRequest(NewServerMessage, window.location.href + "?op=listen&set={'ZoomX':'" + data.ZoomX + "','ZoomY':'" + data.ZoomY + "'}", true);
}
function SumAreaWidth(val) {
var img = document.getElementById("img");
var width = img.getAttribute("width");
var newwidth = parseInt(width, 0) + val;
img.setAttribute("width", newwidth);
}
function SumAreaHeight(val) {
var img = document.getElementById("img");
var width = img.getAttribute("height");
var newwidth = parseInt(width, 0) + val;
img.setAttribute("height", newwidth);
}
function SumZoomXFactor(val) {
data.ZoomX += val;
if (data.ZoomX <= 0) data.ZoomX = 1;
}
function SumZoomYFactor(val) {
data.ZoomY += val;
if (data.ZoomY <= 0) data.ZoomY = 1;
}
function UpdateRefresh() {
var freq = parseInt(document.getElementById("freq").value);
if (freq > 0) {
refreshfreq = freq;
}
document.getElementById("freq").value = refreshfreq.toString();
}
</script>
<body style="background: url('background.jpg');">
<div style="width: 600px; margin-left: 10%; margin-right: auto; margin-top: 30px;">
<div id="viewer">
<h1>
Desktop Viewer:</h1>
<img width="500" height="300" id="img" />
</div>
<div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
Area width:
<input type="button" value="+" onclick="javascript:SumAreaWidth(+40);" />
<input type="button" value="-" onclick="javascript:SumAreaWidth(-40);" />
</td>
<td>
Zoom X:
<input type="button" value="+" onclick="javascript:SumZoomXFactor(+1);" />
<input type="button" value="-" onclick="javascript:SumZoomXFactor(-1);" />
<span id="zoomx"></span>
</td>
<td>
</td>
</tr>
<tr>
<td>
Area height:
<input type="button" value="+" onclick="javascript:SumAreaHeight(+40);" />
<input type="button" value="-" onclick="javascript:SumAreaHeight(-40);" />
</td>
<td>
Zoom Y:
<input type="button" value="+" onclick="javascript:SumZoomYFactor(+1);" />
<input type="button" value="-" onclick="javascript:SumZoomYFactor(-1);" />
<span id="zoomy"></span>
</td>
</tr>
<tr>
<td colspan="2">
Refresh Frequency (ms):
<input type="text" id="freq" value="500" /> (is not advisable to set under 100)
<input type="button" value="Update" onclick="javascript:UpdateRefresh(-1);" />
</td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
listen();
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
C#编写的Http服务端
共105个文件
cs:45个
html:8个
dll:8个
4星 · 超过85%的资源 需积分: 50 333 下载量 87 浏览量
2016-05-14
07:05:34
上传
评论 3
收藏 2.89MB ZIP 举报
温馨提示
C#编写的Http服务端
资源推荐
资源详情
资源评论
收起资源包目录
C#编写的Http服务端 (105个子文件)
app.config 2KB
webserver.tester.exe.config 2KB
app.config 1KB
app.config 969B
app.config 192B
HttpApplicationManager.cs 13KB
Server.cs 12KB
ChatServer.cs 11KB
HttpService.cs 10KB
httphelper.cs 9KB
HttpApplicationBase.cs 7KB
DesktopViewer.cs 5KB
SessionManager.cs 5KB
Form1.Designer.cs 5KB
Program.cs 3KB
SocketComunicator.cs 3KB
Resources.Designer.cs 3KB
Settings.Designer.cs 3KB
BufferManager.cs 3KB
WebServer.cs 2KB
applicationServerBase.cs 2KB
Form1.cs 2KB
httprequest.cs 2KB
Settings.Designer.cs 2KB
SocketAsyncEventArgPool.cs 2KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
ApplicationSettings.cs 1KB
enumerations.cs 1KB
Service.cs 1KB
rawResponse.cs 1KB
Settings.Designer.cs 1KB
Settings.Designer.cs 1KB
enumerations.cs 902B
Helper.cs 886B
interfaces.cs 819B
socketconnection.cs 818B
byteextension.cs 817B
applicationResponse.cs 674B
AsyncUserToken.cs 646B
ApplicationRecordInfo.cs 634B
Program.cs 512B
applicationRequest.cs 498B
HttpResponse.cs 484B
rawRequest.cs 355B
5.Tester.csproj 5KB
Demos.csproj 4KB
4.Server.csproj 4KB
3.BizApplication.csproj 4KB
2.ComunicationLayer.csproj 3KB
1.SocketEngine.csproj 3KB
0.ServerCommonLibrary.csproj 3KB
chat.css 2KB
chat.css 2KB
style.css 377B
style.css 377B
room.css 13B
room.css 13B
Newtonsoft.Json.dll 346KB
Newtonsoft.Json.dll 346KB
BizApplication.dll 21KB
Demos.dll 13KB
Server.dll 12KB
msdn_socketengine.dll 11KB
ServerCommonLibrary.dll 7KB
ComunicationLayer.dll 6KB
webserver.tester.exe 11KB
index.html 4KB
index.html 4KB
room2.html 4KB
room2.html 4KB
index.html 2KB
index.html 2KB
404.html 409B
404.html 409B
background.jpg 381KB
background.jpg 381KB
background.jpg 89KB
background.jpg 89KB
cornerlefttop.jpg 77KB
cornerlefttop.jpg 77KB
Ajax.js 2KB
Ajax.js 2KB
Ajax.js 2KB
Ajax.js 2KB
Form1.resx 6KB
Resources.resx 5KB
Settings.settings 895B
Settings.settings 617B
Settings.settings 200B
Settings.settings 200B
CustomWebServer.sln 8KB
5.Tester.csproj.user 227B
Demos.csproj.user 227B
0.ServerCommonLibrary.csproj.user 227B
共 105 条
- 1
- 2
资源评论
- moonk-z2017-10-30只能用作简单参考
- qq_367763112018-12-06好东西呀,好东西哈哈
huixch
- 粉丝: 9
- 资源: 31
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功