Mercurial > silverbladetech
view delete me/Glimpse/Glimpse Controls/ExceptionsViewer.xaml.vb @ 66:b41cd0075c35
Third count added
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sun, 22 Apr 2012 16:00:41 +0100 |
parents | 3591c26bd63e |
children |
line wrap: on
line source
Partial Public Class ExceptionsViewer Inherits UserControl Public Sub New() InitializeComponent() End Sub Private Sub ClearExceptions_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) GlimpseService.CreateInstance.HostExceptions.Clear() End Sub Private Sub ExceptionsViewer_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded Me.DataContext = GlimpseService.CreateInstance.HostExceptions If GlimpseService.CreateInstance.HostExceptions.Count > 0 Then Me.lbExceptions.SelectedIndex = 0 End If End Sub Private Sub lbExceptions_SelectionChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs) If Me.lbExceptions.SelectedItem IsNot Nothing AndAlso TypeOf Me.lbExceptions.SelectedItem Is ExceptionWrapper Then If DirectCast(Me.lbExceptions.SelectedItem, ExceptionWrapper).IsValidationException Then Me.tbAction.Visibility = Windows.Visibility.Visible Else Me.tbAction.Visibility = Windows.Visibility.Collapsed End If End If End Sub End Class