<!--
    DrFx - FxCop Report Translator and Visualizer.
    Copyright (C) 2010 Sasa Yuan
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
    
<Application x:Class="Sasa.QualityTools.DrFx.Explorer.ExecutionContext"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:report="clr-namespace:Sasa.QualityTools.DrFx.Explorer.Report"
             StartupUri="MainWindow.xaml"
             ShutdownMode="OnMainWindowClose">
    <Application.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="FontFamily" Value="MS UI Gothic"/>
        </Style>
        <DataTemplate x:Key="AssemblyTemplate" DataType="report:FxCopIssueRelationship">
            <Grid Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Horizontal">
                    <Image Source="/Resources/assembly.bmp" Margin="3,1,3,1" Width="16"/>
                    <TextBlock Text="{Binding Assembly.BaseName, StringFormat=アセンブリ \{0\} に対する警告}" FontSize="10" TextWrapping="Wrap" Margin="0,0,3,0" VerticalAlignment="Center"/>
                </StackPanel>
                <TextBlock Grid.Row="1" Text="{Binding Issue.Content}" FontWeight="Bold" TextWrapping="Wrap"  Margin="10"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="NamespaceTemplate" DataType="report:FxCopIssueRelationship">
            <Grid Margin="10" Background="LightPink">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Horizontal">
                    <Image Source="/Resources/namespace.bmp" Margin="3,1,3,1" Width="16"/>
                    <TextBlock Text="{Binding Namespace.Name, StringFormat=名前空間 \{0\} に対する警告}" TextWrapping="Wrap" Margin="0,0,3,0" VerticalAlignment="Center"/>
                </StackPanel>
                <TextBlock Grid.Row="1" Text="{Binding Issue.Content}" FontSize="14" FontWeight="Bold" TextWrapping="Wrap"  Margin="10"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="TypeTemplate" DataType="report:FxCopIssueRelationship">
            <Grid Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Horizontal">
                    <Image Source="/Resources/class.bmp" Margin="3,1,3,1" Width="16"/>
                    <TextBlock Text="{Binding Type.Name, StringFormat=型 \{0\} に対する警告}" TextWrapping="Wrap" Margin="0,0,3,0" VerticalAlignment="Center"/>
                </StackPanel>
                <TextBlock Grid.Row="1" Text="{Binding Issue.Content}" FontSize="14" FontWeight="Bold" TextWrapping="Wrap"  Margin="10"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="MemberTemplate" DataType="report:FxCopIssueRelationship">
            <Grid Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Horizontal">
                    <Image Source="/Resources/method.bmp" Margin="3,1,3,1" Width="16"/>
                    <TextBlock Text="{Binding Member.Name, StringFormat=メンバー \{0\} に対する警告}" TextWrapping="Wrap" Margin="0,0,3,0" VerticalAlignment="Center"/>
                </StackPanel>
                <TextBlock Grid.Row="1" Text="{Binding Issue.Content}" FontSize="14" FontWeight="Bold" TextWrapping="Wrap"  Margin="10"/>
            </Grid>
        </DataTemplate>
    </Application.Resources>
</Application>
