Mercurial > silverbladetech
changeset 66:b41cd0075c35
Third count added
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sun, 22 Apr 2012 16:00:41 +0100 |
parents | 5d0c5cc83a7a |
children | b0e369f1e948 |
files | SilverlightGlimpse/SilverlightGlimpse/Controls/ExceptionsViewer.xaml SilverlightGlimpse/SilverlightGlimpse/Controls/GlimpseViewer.xaml SilverlightGlimpse/SilverlightGlimpse/Controls/GlimpseViewer.xaml.cs |
diffstat | 3 files changed, 55 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/SilverlightGlimpse/SilverlightGlimpse/Controls/ExceptionsViewer.xaml Sun Apr 22 14:21:33 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Controls/ExceptionsViewer.xaml Sun Apr 22 16:00:41 2012 +0100 @@ -5,7 +5,7 @@ <Grid x:Name="LayoutRoot"> <Grid.ColumnDefinitions> - <ColumnDefinition Width="150" /> + <ColumnDefinition Width="225" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> @@ -51,7 +51,9 @@ <TextBlock x:Name="tbAction" Text="Action" - TextDecorations="Underline" /> + TextDecorations="Underline" + Visibility="Collapsed" /> + <TextBlock Grid.Row="1" FontSize="11" Text="{Binding Path=Action}"
--- a/SilverlightGlimpse/SilverlightGlimpse/Controls/GlimpseViewer.xaml Sun Apr 22 14:21:33 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Controls/GlimpseViewer.xaml Sun Apr 22 16:00:41 2012 +0100 @@ -3,46 +3,46 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" xmlns:localc="clr-namespace:SilverlightGlimpse.Controls"> + <UserControl.Resources> + <SolidColorBrush x:Name="noExceptionsFill" Color="SteelBlue" /> + <SolidColorBrush x:Name="noExceptionsBorder" Color="LightBlue" /> + <SolidColorBrush x:Name="hasExceptionsFill" Color="Red" /> + <SolidColorBrush x:Name="hasExceptionsBorder" Color="Salmon" /> + </UserControl.Resources> <Grid x:Name="LayoutRoot"> - <Grid.Resources> - <SolidColorBrush x:Name="noExceptionsBrush" Color="SteelBlue" /> - <SolidColorBrush x:Name="hasExceptionsBrush" Color="Red" /> - </Grid.Resources> - <Grid x:Name="layoutInstrumentPanel"> - <StackPanel Orientation="Horizontal"> - <Grid Margin="7"> - <Ellipse x:Name="elpValidationExceptions" - Width="40" - Height="40" - Fill="{StaticResource noExceptionsBrush}" - Stroke="LightBlue" - StrokeThickness="3" /> + <Grid.Resources> + <Style TargetType="Ellipse"> + <Setter Property="Width" Value="40" /> + <Setter Property="Height" Value="40" /> + <Setter Property="Fill" Value="{StaticResource noExceptionsFill}" /> + <Setter Property="Stroke" Value="{StaticResource noExceptionsBorder}" /> + <Setter Property="StrokeThickness" Value="3" /> + <Setter Property="Margin" Value="7" /> + </Style> + <Style TargetType="TextBlock"> + <Setter Property="HorizontalAlignment" Value="Center" /> + <Setter Property="VerticalAlignment" Value="Center" /> + <Setter Property="FontSize" Value="12" /> + <Setter Property="FontWeight" Value="Bold" /> + <Setter Property="Foreground" Value="White" /> + <Setter Property="Text" Value="0" /> + </Style> + </Grid.Resources> - <TextBlock x:Name="tbValidationExceptions" - HorizontalAlignment="Center" - VerticalAlignment="Center" - FontSize="12" - FontWeight="Bold" - Foreground="White" - Text="0" - ToolTipService.ToolTip="Binding Exception Count" /> + <StackPanel Orientation="Horizontal"> + <Grid> + <Ellipse x:Name="elpBindingErrors" ToolTipService.ToolTip="Binding Exception Count" /> + <TextBlock x:Name="tbBindingErrors" /> </Grid> - <Grid Margin="7"> - <Ellipse x:Name="elpUnhandledExceptions" - Width="40" - Height="40" - Fill="{StaticResource noExceptionsBrush}" - Stroke="LightBlue" - StrokeThickness="3" /> - <TextBlock x:Name="tbUnhandledExceptions" - HorizontalAlignment="Center" - VerticalAlignment="Center" - FontSize="12" - FontWeight="Bold" - Foreground="White" - Text="0" - ToolTipService.ToolTip="Unhandled Exception Count" /> + <Grid> + <Ellipse x:Name="elpValidationExceptions" ToolTipService.ToolTip="Validation Exception Count" /> + + <TextBlock x:Name="tbValidationExceptions" /> + </Grid> + <Grid> + <Ellipse x:Name="elpUnhandledExceptions" ToolTipService.ToolTip="Unhandled Exception Count" /> + <TextBlock x:Name="tbUnhandledExceptions" /> </Grid> <Button x:Name="btnExpand" Margin="7" @@ -53,27 +53,18 @@ </Grid> <Grid x:Name="layoutViewer" Visibility="Collapsed"> <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="*" /> + <RowDefinition Height="auto" /> </Grid.RowDefinitions> - <TextBlock Margin="3.5,0,0,0" - VerticalAlignment="Center" - FontFamily="Lucida Sans Unicode" - FontSize="18" - Foreground="SteelBlue" - Text="Silverlight Glimpse" /> - <Button x:Name="btnContract" - Margin="7" HorizontalAlignment="Right" - VerticalAlignment="Center" + VerticalAlignment="Top" Click="btnContract_Click" Content="Contract" /> <c:TabControl Grid.Row="1" - Width="500" - Height="250"> + Width="800" + Height="450"> <c:TabItem Header="Exceptions"> <localc:ExceptionsViewer />
--- a/SilverlightGlimpse/SilverlightGlimpse/Controls/GlimpseViewer.xaml.cs Sun Apr 22 14:21:33 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Controls/GlimpseViewer.xaml.cs Sun Apr 22 16:00:41 2012 +0100 @@ -29,9 +29,9 @@ int unhandledExceptionCount = 0; int validationExceptionCount = 0; - foreach (ExceptionWrapper ew in GlimpseService.CreateInstance.HostExceptions) + foreach (var ex in GlimpseService.CreateInstance.HostExceptions) { - if (ew.IsValidationException) + if (ex.IsValidationException) validationExceptionCount++; else unhandledExceptionCount++; @@ -39,15 +39,17 @@ tbValidationExceptions.Text = validationExceptionCount.ToString(); - elpValidationExceptions.Fill = validationExceptionCount == 0 - ? noExceptionsBrush - : hasExceptionsBrush; + //if (validationExceptionCount == 0) + //{ + // elpValidationExceptions.Fill = noExceptionsFill; + // elpValidationExceptions.Stroke = noExceptionsBorder; + //} - tbUnhandledExceptions.Text = unhandledExceptionCount.ToString(); + //tbUnhandledExceptions.Text = unhandledExceptionCount.ToString(); - elpUnhandledExceptions.Fill = unhandledExceptionCount == 0 - ? noExceptionsBrush - : hasExceptionsBrush; + //elpUnhandledExceptions.Fill = unhandledExceptionCount == 0 + // ? noExceptionsBrush + // : hasExceptionsBrush; } } } \ No newline at end of file