-
大小: 596KB文件类型: .rar金币: 2下载: 0 次发布日期: 2021-06-01
- 语言: 其他
- 标签: Silverlight 显示图片
资源简介
Silverlight客户端获取服务器文件路径或文件流,并通过路径直接显示服务器端图片

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace ShowImgDemo
{
public partial class App : Application
{
public App()
{
this.Startup += this.Application_Startup;
this.Exit += this.Application_Exit;
this.UnhandledException += this.Application_UnhandledException;
InitializeComponent();
}
private void Application_Startup(object sender StartupEventArgs e)
{
this.RootVisual = new MainPage();
}
private void Application_Exit(object sender EventArgs e)
{
}
private void Application_UnhandledException(object sender ApplicationUnhandledExceptionEventArgs e)
{
// 如果应用程序是在调试器外运行的,则使用浏览器的
// 异常机制报告该异常。在 IE 上,将在状态栏中用一个
// 黄色警报图标来显示该异常,而 Firefox 则会显示一个脚本错误。
if (!System.Diagnostics.Debugger.IsAttached)
{
// 注意: 这使应用程序可以在已引发异常但尚未处理该异常的情况下
// 继续运行。
// 对于生产应用程序,此错误处理应替换为向网站报告错误
// 并停止应用程序。
e.Handled = true;
Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
}
}
private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
{
try
{
string errorMsg = e.Exceptionobject.Message + e.Exceptionobject.StackTrace;
errorMsg = errorMsg.Replace(‘“‘ ‘\‘‘).Replace(“\r\n“ @“\n“);
System.Windows.Browser.HtmlPage.Window.Eval(“throw new Error(\“Unhandled Error in Silverlight Application “ + errorMsg + “\“);“);
}
catch (Exception)
{
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 294 2012-08-10 15:13 ShowImgDemo\ShowImgDemo\App.xaml
文件 2351 2012-08-10 15:13 ShowImgDemo\ShowImgDemo\App.xaml.cs
文件 353 2012-08-10 15:29 ShowImgDemo\ShowImgDemo\Bin\Debug\AppManifest.xaml
文件 12800 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\Bin\Debug\ShowImgDemo.dll
文件 22016 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\Bin\Debug\ShowImgDemo.pdb
文件 7842 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\Bin\Debug\ShowImgDemo.xap
文件 2843 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\Bin\Debug\ShowImgDemoTestPage.html
文件 3935 2012-08-16 14:32 ShowImgDemo\ShowImgDemo\img\click.JPG
文件 854 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\MainPage.xaml
文件 1771 2012-08-16 14:22 ShowImgDemo\ShowImgDemo\MainPage.xaml.cs
文件 1783 2012-08-10 15:13 ShowImgDemo\ShowImgDemo\obj\Debug\App.g.cs
文件 1783 2012-08-10 15:13 ShowImgDemo\ShowImgDemo\obj\Debug\App.g.i.cs
文件 7228 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 5507 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 2293 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\MainPage.g.cs
文件 2293 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\MainPage.g.i.cs
文件 881 2012-08-10 15:29 ShowImgDemo\ShowImgDemo\obj\Debug\ShowImgDemo.csproj.FileListAbsolute.txt
文件 12800 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\ShowImgDemo.dll
文件 5385 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\ShowImgDemo.g.resources
文件 22016 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\ShowImgDemo.pdb
文件 513 2012-08-16 14:34 ShowImgDemo\ShowImgDemo\obj\Debug\XapCacheFile.xm
文件 207 2012-08-10 15:13 ShowImgDemo\ShowImgDemo\Properties\AppManifest.xm
文件 1318 2012-08-10 15:13 ShowImgDemo\ShowImgDemo\Properties\AssemblyInfo.cs
文件 4864 2012-08-16 14:32 ShowImgDemo\ShowImgDemo\ShowImgDemo.csproj
文件 1226 2012-08-16 14:32 ShowImgDemo\ShowImgDemo\ShowImgDemo.csproj.user
文件 1422 2012-08-10 15:13 ShowImgDemo\ShowImgDemo.sln
..A..H. 29184 2012-08-16 14:34 ShowImgDemo\ShowImgDemo.suo
文件 4096 2012-08-16 14:21 ShowImgDemo\ShowImgDemo.Web\bin\ShowImgDemo.Web.dll
文件 7680 2012-08-16 14:21 ShowImgDemo\ShowImgDemo.Web\bin\ShowImgDemo.Web.pdb
....... 7842 2012-08-16 14:34 ShowImgDemo\ShowImgDemo.Web\ClientBin\ShowImgDemo.xap
............此处省略36个文件信息
- 上一篇:速达3000netv8.53
- 下一篇:石文孝第二版通信网理论与基础课后答案
相关资源
- AsyncTask文件控制暂停和继续,在状态
- FPGA彩条显示
- uboot到linux logo显示不间断 补丁
- LCD显示温度+串口接收温度.rar
- 基于MFC扩展CListCtrl子项显示图片并叠
- 在大图中查找小图显示位置
- 直观端口查看器,详细显示可疑进程
- 基于c8051f020的AD转换程序及LCD显示程序
- PB做的托盘程序(最小化后在左下角显
- 实时显示钢筋标注面积V0.44
- [免费]msp430f149控制PS2键盘并用1602显示
- 武汉理工大学 单片机课程设计 16*16点
- 【单片机】51单片机数码管显示万年历
- 12864滚动显示汉字
- 25.数码管显示0-99
- 利用译码器74HC595的点阵显示程序和电
- STC12C5A60S2 CH4521 驱动数码管 显示
- ADC0809数字电压表 LCD1602显示 汇编程序
- 广东工业大学汇编实验二用表格形式
- 课程设计蔬菜大棚自动控制系统,包
- 带时间温度显示的室内灯光控制系统
- 图片存储到数据库保存二进制文件并
- 三维地形的仿真显示实现了对地图的
- 制作万年历 日期 农历 温度显示
- CH454键盘与数码管显示程序
- 16x16点阵(滚动显示)论文 程序
- lcd12684显示程序
- 上传大文件并显示进度条控件实例
- GTK实现数字表显示
- 一个mfc前端显示秒表
评论
共有 条评论