aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/BitResultsView.xaml
blob: 170422bc3f12914b692cd02580c9f8b47d630530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight:
<UserControl x:Class="Tango.PPC.UI.Dialogs.BitResultsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:local="clr-namespace:Tango.PPC.UI.Dialogs"
             mc:Ignorable="d" 
             Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="750" Height="1000" d:DataContext="{d:DesignInstance Type=local:BitResultsViewVM, IsDesignTimeCreatable=False}">
    <Grid Margin="20">
        <DockPanel>

            <Grid DockPanel.Dock="Bottom" Margin="0 20 0 0">
                <touch:TouchButton HorizontalAlignment="Center" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="180" Height="50" VerticalAlignment="Bottom">CLOSE</touch:TouchButton>
            </Grid>

            <StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center">
                <Image Source="../Images/bit_new.png" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Width="110" />
                <TextBlock VerticalAlignment="Center" Margin="0 10 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Machine BIT Results</TextBlock>
            </StackPanel>

            <Grid>
                <touch:TouchSimpleDataGrid FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoDarkForegroundBrush}" Visibility="{Binding IsFree,Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0 20 0 0" IsReadOnly="True" ItemsSource="{Binding Results}" Background="{StaticResource TangoPrimaryBackgroundBrush}" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}" HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" CanUserSortColumns="False" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="40" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled">
                    <DataGrid.Resources>
                        <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="{x:Type DataGridColumnHeader}">
                            <Setter Property="Background" Value="{StaticResource TangoDarkForegroundBrush}" />
                            <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}" />
                            <Setter Property="Padding" Value="5"></Setter>
                        </Style>
                    </DataGrid.Resources>
                    <DataGrid.CellStyle>
                        <Style TargetType="{x:Type DataGridCell}">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type DataGridCell}">
                                        <Grid Background="{TemplateBinding Background}">
                                            <ContentPresenter VerticalAlignment="Center" />
                                        </Grid>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter Property="Background" Value="Transparent"></Setter>
                                    <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </DataGrid.CellStyle>
                    <DataGrid.RowStyle>
                        <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
                            <Style.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter Property="Background" Value="Transparent"></Setter>
                                    <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" />
                                </Trigger>
                                <Trigger Property="IsFocused" Value="True">
                                    <Setter Property="Background" Value="Transparent"></Setter>
                                    <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </DataGrid.RowStyle>
                    <DataGrid.Columns>
                        <DataGridTemplateColumn Header="" Width="40">
                            <DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <touch:TouchIcon Width="16">
                                        <touch:TouchIcon.Style>
                                            <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
                                                <Setter Property="Icon" Value="SkipNextCircleOutline"></Setter>
                                                <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter>
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding BitResult.Status}" Value="Passed">
                                                        <Setter Property="Icon" Value="Check"></Setter>
                                                        <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding BitResult.Status}" Value="Failed">
                                                        <Setter Property="Icon" Value="Alert"></Setter>
                                                        <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding BitResult.Status}" Value="Warning">
                                                        <Setter Property="Icon" Value="Alert"></Setter>
                                                        <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </touch:TouchIcon.Style>
                                    </touch:TouchIcon>
                                </DataTemplate>
                            </DataGridTemplateColumn.CellTemplate>
                        </DataGridTemplateColumn>
                        <DataGridTemplateColumn Header="Test" Width="360">
                            <DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <TextBlock TextTrimming="CharacterEllipsis">
                                        <Run>#</Run><Run Text="{Binding BitType.Code,Mode=OneWay}"></Run>
                                        <Run Text="{Binding BitType.Description,Mode=OneWay}"></Run>
                                    </TextBlock>
                                </DataTemplate>
                            </DataGridTemplateColumn.CellTemplate>
                        </DataGridTemplateColumn>
                        <!--<DataGridTextColumn Header="Subject" Width="100" Binding="{Binding BitType.Subject}" />-->
                        <DataGridTextColumn Header="Description" Width="1*" Binding="{Binding BitResult.Description}" />
                    </DataGrid.Columns>
                </touch:TouchSimpleDataGrid>

                <Grid Visibility="{Binding IsFree,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
                    <StackPanel VerticalAlignment="Center">
                        <touch:TouchBusyIndicator Width="100" Height="100" IsIndeterminate="True" Foreground="{StaticResource TangoGrayBrush}" StrokeThickness="3" />
                        <TextBlock HorizontalAlignment="Center" Margin="0 15 0 0" FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">Fetching BIT results, please wait...</TextBlock>
                    </StackPanel>
                </Grid>

                <Grid Visibility="{Binding BitSuccessful,Converter={StaticResource BooleanToVisibilityConverter}}">
                    <StackPanel VerticalAlignment="Center">
                        <touch:TouchIcon Icon="Check" Width="100" Height="100" Foreground="{StaticResource TangoSuccessBrush}" />
                        <TextBlock HorizontalAlignment="Center" Margin="0 15 0 0" FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">All tests passed successfully</TextBlock>
                    </StackPanel>
                </Grid>
            </Grid>
        </DockPanel>
    </Grid>
</UserControl>