资源简介

1:服务器端采用webservice; 2:SilverLight端可同时选择多个文件; 3:显示每个文件的上传进度; 4:采用SilverLight3 详细说明:http://blog.csdn.net/luminji/archive/2009/12/11/4987539.aspx

资源截图

代码片段和文件信息

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 SilverlightApplication6
{
    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)
            {
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     58880  2009-12-11 17:43  SilverlightApplication6.suo

     文件        306  2009-12-10 09:49  SilverlightApplication6\App.xaml

     文件       2359  2009-12-10 09:49  SilverlightApplication6\App.xaml.cs

     文件       1324  2009-12-10 10:31  SilverlightApplication6\Bin\Debug\AppManifest.xaml

     文件      18336  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\de\System.ComponentModel.DataAnnotations.resources.dll

     文件      38808  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\de\System.Windows.Controls.Data.Input.resources.dll

     文件     116608  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\de\System.Windows.Controls.Data.resources.dll

     文件     173936  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\de\System.Windows.Controls.resources.dll

     文件      11624  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\de\System.Windows.Data.resources.dll

     目录          0  2009-12-10 10:31  SilverlightApplication6\Bin\Debug\de

     文件      17824  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\es\System.ComponentModel.DataAnnotations.resources.dll

     文件      38792  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\es\System.Windows.Controls.Data.Input.resources.dll

     文件     116608  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\es\System.Windows.Controls.Data.resources.dll

     文件     173936  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\es\System.Windows.Controls.resources.dll

     文件      11640  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\es\System.Windows.Data.resources.dll

     目录          0  2009-12-10 10:31  SilverlightApplication6\Bin\Debug\es

     文件      18336  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\fr\System.ComponentModel.DataAnnotations.resources.dll

     文件      38808  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\fr\System.Windows.Controls.Data.Input.resources.dll

     文件     116616  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\fr\System.Windows.Controls.Data.resources.dll

     文件     173952  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\fr\System.Windows.Controls.resources.dll

     文件      11640  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\fr\System.Windows.Data.resources.dll

     目录          0  2009-12-10 10:31  SilverlightApplication6\Bin\Debug\fr

     文件      17824  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\it\System.ComponentModel.DataAnnotations.resources.dll

     文件      38792  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\it\System.Windows.Controls.Data.Input.resources.dll

     文件     116608  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\it\System.Windows.Controls.Data.resources.dll

     文件     173936  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\it\System.Windows.Controls.resources.dll

     文件      11624  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\it\System.Windows.Data.resources.dll

     目录          0  2009-12-10 10:31  SilverlightApplication6\Bin\Debug\it

     文件      18832  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\ja\System.ComponentModel.DataAnnotations.resources.dll

     文件      38808  2009-07-21 16:43  SilverlightApplication6\Bin\Debug\ja\System.Windows.Controls.Data.Input.resources.dll

............此处省略101个文件信息

评论

共有 条评论