comparison Glimpse/Glimpse Controls/ExceptionsViewer.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 ExceptionsViewer
2 Inherits UserControl
3
4 Public Sub New()
5 InitializeComponent()
6 End Sub
7
8 Private Sub ClearExceptions_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
9 GlimpseService.CreateInstance.HostExceptions.Clear()
10 End Sub
11
12 Private Sub ExceptionsViewer_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
13 Me.DataContext = GlimpseService.CreateInstance.HostExceptions
14 If GlimpseService.CreateInstance.HostExceptions.Count > 0 Then
15 Me.lbExceptions.SelectedIndex = 0
16 End If
17 End Sub
18
19 Private Sub lbExceptions_SelectionChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs)
20
21 If Me.lbExceptions.SelectedItem IsNot Nothing AndAlso TypeOf Me.lbExceptions.SelectedItem Is ExceptionWrapper Then
22
23 If DirectCast(Me.lbExceptions.SelectedItem, ExceptionWrapper).IsValidationException Then
24 Me.tbAction.Visibility = Windows.Visibility.Visible
25
26 Else
27 Me.tbAction.Visibility = Windows.Visibility.Collapsed
28 End If
29
30 End If
31
32 End Sub
33
34 End Class