Mercurial > pub > bltoolkit
comparison Demo/Silverlight/Client.Web/ClientTestPage.aspx @ 0:f990fcb411a9
Копия текущей версии из github
| author | cin |
|---|---|
| date | Thu, 27 Mar 2014 21:46:09 +0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f990fcb411a9 |
|---|---|
| 1 <%@ Page Language="C#" AutoEventWireup="true" %> | |
| 2 | |
| 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| 4 <html xmlns="http://www.w3.org/1999/xhtml" > | |
| 5 <head runat="server"> | |
| 6 <title>Client</title> | |
| 7 <style type="text/css"> | |
| 8 html, body { | |
| 9 height: 100%; | |
| 10 overflow: auto; | |
| 11 } | |
| 12 body { | |
| 13 padding: 0; | |
| 14 margin: 0; | |
| 15 } | |
| 16 #silverlightControlHost { | |
| 17 height: 100%; | |
| 18 text-align:center; | |
| 19 } | |
| 20 </style> | |
| 21 <script type="text/javascript" src="Silverlight.js"></script> | |
| 22 <script type="text/javascript"> | |
| 23 function onSilverlightError(sender, args) { | |
| 24 var appSource = ""; | |
| 25 if (sender != null && sender != 0) { | |
| 26 appSource = sender.getHost().Source; | |
| 27 } | |
| 28 | |
| 29 var errorType = args.ErrorType; | |
| 30 var iErrorCode = args.ErrorCode; | |
| 31 | |
| 32 if (errorType == "ImageError" || errorType == "MediaError") { | |
| 33 return; | |
| 34 } | |
| 35 | |
| 36 var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ; | |
| 37 | |
| 38 errMsg += "Code: "+ iErrorCode + " \n"; | |
| 39 errMsg += "Category: " + errorType + " \n"; | |
| 40 errMsg += "Message: " + args.ErrorMessage + " \n"; | |
| 41 | |
| 42 if (errorType == "ParserError") { | |
| 43 errMsg += "File: " + args.xamlFile + " \n"; | |
| 44 errMsg += "Line: " + args.lineNumber + " \n"; | |
| 45 errMsg += "Position: " + args.charPosition + " \n"; | |
| 46 } | |
| 47 else if (errorType == "RuntimeError") { | |
| 48 if (args.lineNumber != 0) { | |
| 49 errMsg += "Line: " + args.lineNumber + " \n"; | |
| 50 errMsg += "Position: " + args.charPosition + " \n"; | |
| 51 } | |
| 52 errMsg += "MethodName: " + args.methodName + " \n"; | |
| 53 } | |
| 54 | |
| 55 throw new Error(errMsg); | |
| 56 } | |
| 57 </script> | |
| 58 </head> | |
| 59 <body> | |
| 60 <form id="form1" runat="server" style="height:100%"> | |
| 61 <div id="silverlightControlHost"> | |
| 62 <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> | |
| 63 <param name="source" value="ClientBin/Client.xap"/> | |
| 64 <param name="onError" value="onSilverlightError" /> | |
| 65 <param name="background" value="white" /> | |
| 66 <param name="minRuntimeVersion" value="4.0.50401.0" /> | |
| 67 <param name="autoUpgrade" value="true" /> | |
| 68 <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none"> | |
| 69 <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/> | |
| 70 </a> | |
| 71 </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div> | |
| 72 </form> | |
| 73 </body> | |
| 74 </html> |
