<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Client</title>
<style type="text/css">
html, body
{
height: 100%;
overflow: auto;
}
body
{
padding: 0;
margin: 0;
}
#silverlightControlHost
{
height: 100%;
text-align: center;
}
</style>
<script type="text/javascript" src="Silverlight.js"></script>
<script type="text/javascript">
function onSilverlightError(sender, args) {
var appSource = "";
if (sender != null && sender != 0) {
appSource = sender.getHost().Source;
}
var errorType = args.ErrorType;
var iErrorCode = args.ErrorCode;
if (errorType == "ImageError" || errorType == "MediaError") {
return;
}
var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n";
errMsg += "Code: " + iErrorCode + " \n";
errMsg += "Category: " + errorType + " \n";
errMsg += "Message: " + args.ErrorMessage + " \n";
if (errorType == "ParserError") {
errMsg += "File: " + args.xamlFile + " \n";
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
else if (errorType == "RuntimeError") {
if (args.lineNumber != 0) {
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
errMsg += "MethodName: " + args.methodName + " \n";
}
throw new Error(errMsg);
}
</script>
</head>
<body>
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="100%" height="100%">
<param name="source" value="ClientBin/SocketChat.xap" />
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40818.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration: none">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"
style="border-style: none" />
</a>
</object>
<iframe id="_sl_historyFrame" style="visibility: hidden; height: 0px; width: 0px;
border: 0px"></iframe>
<div style="display: none;">
<object id='x' name='x' classid="clsid:AB15B9A5-1573-448A-870C-2F60916CECD7">
</object>
</div>
</div>
<script type="text/javascript">
var fnCapture = function() {
try {
var x = document.getElementById('x');
if (x.Caption == undefined) {
if (confirm('提示:本功能需要ActiveX插件支持,您的机器未安装截图插件,现在就下载安装么?')) {
window.open('http://images.24city.com/jimmy/Capture/CaptureSetup.rar');
}
else {
alert('要使用本功能,请手动下载安装插件!');
window.open("http://images.24city.com/jimmy/Capture/test.htm");
}
}
else {
var _file = "c:\\temp.bmp";
var _file2 = "c:\\temp.jpg";
x.Capture(_file);
alert('截图已经保存至' + _file2);
}
}
catch (e) {
alert('出错啦!' + e);
}
}
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
Silverlight聊天室(基于Scoket机制)源码
共38个文件
cs:15个
csproj:4个
vspscc:4个
4星 · 超过85%的资源 需积分: 3 10 下载量 22 浏览量
2011-12-12
15:06:25
上传
评论
收藏 396KB ZIP 举报
温馨提示
基于silverlight socket通讯机制的聊天室 实现的功能: 1.文字聊天 2.允许本地图片发送 3.允许文件传送并保存到本地 4.文字颜色可自定义 5.允许私聊 6.在线列表查看 7.用户进入/离开聊天室的广播通知 8.用户呢称更改的广播通知 9.允许屏幕截图并保存jpg到本机(需要activeX支持)
资源推荐
资源详情
资源评论
收起资源包目录
silverlightchatroom-33308.zip (38个子文件)
Lib
Lib.csproj.vspscc 257B
ChatUser.cs 277B
ConstParameter.cs 795B
ChatMessage.cs 758B
Lib.csproj 3KB
Tools.cs 1KB
Properties
AssemblyInfo.cs 1KB
LengthType.cs 337B
FileSaveButton.cs 484B
Client
MainPage.xaml 6KB
control
ColorSelect.xaml.cs 2KB
ColorSelect.xaml 3KB
img
self.png 6KB
logo.png 916B
App.xaml 293B
MainPage.xaml.cs 32KB
App.xaml.cs 2KB
Client.csproj.vspscc 257B
Client.csproj 5KB
Properties
AppManifest.xml 213B
AssemblyInfo.cs 1KB
SocketChat.sln 3KB
Server
Program.cs 28KB
ClientWrapper.cs 484B
Policy.xml 373B
Server.csproj.vspscc 257B
Server.csproj 3KB
Properties
AssemblyInfo.cs 1KB
Client.Web
Client.Web.csproj.vspscc 257B
Web.config 7KB
ocx
CameraDll.dll 132KB
QQCaptureProj.ocx 586KB
Silverlight.js 8KB
ClientTestPage.aspx 4KB
ClientTestPage.html 4KB
Client.Web.csproj 4KB
Properties
AssemblyInfo.cs 1KB
SocketChat.vssscc 256B
共 38 条
- 1
资源评论
- 往生净土乘愿再来2013-01-22需要做个聊天室,但是这个比较难看懂。
- haishangqishi2014-03-14感谢提供资源!给我帮了大忙!
Tiger_ldy
- 粉丝: 13
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 使用 C 语言实现的计算非负整数的阶乘
- 2011-2021最新版本北京大学数字普惠金融指数(PKU-DFIIC).xlsx
- 县域数字乡村指数2018-2020(1).xlsx
- Docker容器配置进阶
- tensorflow-gpu-2.7.4-cp37-cp37m-manylinux2010-x86-64.whl
- 多段线、 圆、弧转多段线(仅我可见)
- tensorflow-2.7.2-cp38-cp38-manylinux2010-x86-64.whl
- 李慧琴C语言基础部分.zip
- yeyue-p8Yi4-ve4a83792.apk
- tensorflow-gpu-2.7.3-cp38-cp38-manylinux2010-x86-64.whl
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功