comparison delete me/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
comparison
equal deleted inserted replaced
58:241e2f22ed3c 59:3591c26bd63e
1 Partial Public Class LoadExceptionViewer
2 Inherits UserControl
3
4 Public Sub New()
5 InitializeComponent()
6 End Sub
7
8 Public Sub New(ByVal e As Exception, ByVal strSourceLocation As String)
9 InitializeComponent()
10 Me.txtSourceLocation.Text = String.Concat("Source Location: ", strSourceLocation)
11
12 Dim ex As Exception = e
13
14 While ex IsNot Nothing
15 Me.lbExceptions.Items.Add(ex)
16 ex = ex.InnerException
17 End While
18
19 If Me.lbExceptions.Items.Count > 0 Then
20 Me.lbExceptions.SelectedIndex = 0
21 End If
22
23 End Sub
24
25 End Class