Mercurial > silverbladetech
comparison SilverlightGlimpse/Controls/LoadExceptionViewer.xaml.cs @ 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 using System; | |
2 | |
3 namespace SilverlightGlimpse.Controls | |
4 { | |
5 public partial class LoadExceptionViewer | |
6 { | |
7 public LoadExceptionViewer() | |
8 { | |
9 InitializeComponent(); | |
10 } | |
11 | |
12 public LoadExceptionViewer(Exception e, string sourceLocation) | |
13 : this() | |
14 { | |
15 this.txtSourceLocation.Text = string.Concat("Source Location: ", sourceLocation); | |
16 | |
17 Exception ex = e; | |
18 | |
19 while (ex != null) | |
20 { | |
21 this.lbExceptions.Items.Add(ex); | |
22 ex = ex.InnerException; | |
23 } | |
24 | |
25 if (this.lbExceptions.Items.Count > 0) | |
26 { | |
27 this.lbExceptions.SelectedIndex = 0; | |
28 } | |
29 } | |
30 } | |
31 } |