diff Glimpse/Glimpse Controls/LoadExceptionViewer.xaml.vb @ 59:3591c26bd63e

MVVMLight added
author Steven Hollidge <stevenhollidge@hotmail.com>
date Sat, 21 Apr 2012 19:20:28 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Glimpse/Glimpse Controls/LoadExceptionViewer.xaml.vb	Sat Apr 21 19:20:28 2012 +0100
@@ -0,0 +1,25 @@
+Partial Public Class LoadExceptionViewer
+    Inherits UserControl
+
+    Public Sub New()
+        InitializeComponent()
+    End Sub
+
+    Public Sub New(ByVal e As Exception, ByVal strSourceLocation As String)
+        InitializeComponent()
+        Me.txtSourceLocation.Text = String.Concat("Source Location: ", strSourceLocation)
+
+        Dim ex As Exception = e
+
+        While ex IsNot Nothing
+            Me.lbExceptions.Items.Add(ex)
+            ex = ex.InnerException
+        End While
+
+        If Me.lbExceptions.Items.Count > 0 Then
+            Me.lbExceptions.SelectedIndex = 0
+        End If
+
+    End Sub
+
+End Class