<commit_before>﻿<Window x:Class="hTunes.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="hTunes" Height="450" Width="750" Icon="icon.png"
        Closing="Window_Closing">
    <Window.Resources>
        <ControlTemplate x:Key="MusicButton" TargetType="Button">
            <Border Name="Border" BorderThickness="2" CornerRadius="5"
                Background="ForestGreen">
                <Border.Effect>
                    <DropShadowEffect Color="Black" Direction="320" ShadowDepth="3" BlurRadius="5" Opacity="0.5" />
                </Border.Effect>
                <ContentPresenter HorizontalAlignment="Center"
                              VerticalAlignment="Center"                                 
                              TextBlock.FontWeight="Bold"  
                              TextBlock.Foreground="Black"
                              Content="{TemplateBinding Content}">
                </ContentPresenter>
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="Border" Property="Effect">
                        <Setter.Value>
                            <DropShadowEffect Color="Black" Direction="320" ShadowDepth="0" BlurRadius="5" Opacity="0.5" />
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="45"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <MediaElement x:Name="player" Visibility="Hidden" LoadedBehavior="Manual"></MediaElement>
        <StackPanel Grid.Column="0" Grid.ColumnSpan="2">
            <ToolBar HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="40">
                <Button x:Name="openButton" Height="32" VerticalAlignment="Top" Width="75" ToolTip="Open..." Click="openButton_Click">
                    <Image Source="folder.png"></Image>
                </Button>
                <Button x:Name="newPlaylistButton" ToolTip="New Playlist.." Height="32" VerticalAlignment="Top" Width="75" Click="newPlaylistButton_Click">
                    <Image Source="playlist.png"></Image>
                </Button>
                <Button x:Name="aboutButton" ToolTip="About" Height="32" VerticalAlignment="Top" Width="75" Click="aboutButton_Click">
                    <Image Source="about.png"></Image>
                </Button>
                <TextBox Height="32" Margin="0" TextWrapping="Wrap" Text="Search..." HorizontalAlignment="Right" VerticalAlignment="Top" Width="120" KeyUp="SearchBox_KeyUp" GotFocus="TextBox_GotFocus" LostFocus="TextBox_LostFocus" />
            </ToolBar>
        </StackPanel>

        <ListBox x:Name="playlistListBox" Margin="10,0,10,10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" AllowDrop="False"/>

        <DataGrid  Grid.Column="1" Grid.Row="1" SelectionMode="Single" AutoGenerateColumns="False" x:Name="musicDatagrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanUserAddRows="False"
                   MouseMove="musicDatagrid_MouseMove" PreviewMouseLeftButtonDown="musicDatagrid_PreviewMouseLeftButtonDown">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding id}" Visibility="Hidden"/>
                <DataGridTextColumn Binding="{Binding title}" Header="Title"/>
                <DataGridTextColumn Binding="{Binding artist}" Header="Artist"/>
                <DataGridTextColumn Binding="{Binding album}" Header="Album"/>
                <DataGridTextColumn Binding="{Binding genre}" Header="Genre"/>
            </DataGrid.Columns>
            <DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    <Border Background="AliceBlue">
                        <StackPanel Orientation="Horizontal">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="100"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="40"/>
                                    <ColumnDefinition Width="15"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>

                                <StackPanel Grid.Column="0" Grid.Row="0" VerticalAlignment="Center">
                                    <Image Source="{Binding albumImage}"/>    
                                </StackPanel>
                                <StackPanel Grid.Column="2" Grid.Row="0" VerticalAlignment="Center">
                                    <TextBlock Text="{Binding title}" />
                                    <TextBlock Text="{Binding artist}" />
                                    <TextBlock Text="{Binding length}" />
                                    <TextBlock>
                                        <Hyperlink NavigateUri="{Binding url}">More Info</Hyperlink>
                                    </TextBlock>
                                </StackPanel>
                            </Grid>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </DataGrid.RowDetailsTemplate>

        </DataGrid>

        <StackPanel Grid.Column="1" Grid.Row="2" VerticalAlignment="Center">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

                <StackPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Button Content="Play" Click="PlayButton_Click" Template="{StaticResource MusicButton}"></Button>    
                </StackPanel>
                <StackPanel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Button Content="Stop" Click="StopButton_Click" Template="{StaticResource MusicButton}"></Button>
                </StackPanel>
                <StackPanel Grid.Column="3" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Button Content="Show" Click="ShowButton_Click" Template="{StaticResource MusicButton}"></Button>
                </StackPanel>
            </Grid>
        </StackPanel>

    </Grid>
</Window><commit_msg>Removed show button<commit_after>﻿<Window x:Class="hTunes.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="hTunes" Height="450" Width="750" Icon="icon.png"
        Closing="Window_Closing">
    <Window.Resources>
        <ControlTemplate x:Key="MusicButton" TargetType="Button">
            <Border Name="Border" BorderThickness="2" CornerRadius="5"
                Background="ForestGreen">
                <Border.Effect>
                    <DropShadowEffect Color="Black" Direction="320" ShadowDepth="3" BlurRadius="5" Opacity="0.5" />
                </Border.Effect>
                <ContentPresenter HorizontalAlignment="Center"
                              VerticalAlignment="Center"                                 
                              TextBlock.FontWeight="Bold"  
                              TextBlock.Foreground="Black"
                              Content="{TemplateBinding Content}">
                </ContentPresenter>
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="Border" Property="Effect">
                        <Setter.Value>
                            <DropShadowEffect Color="Black" Direction="320" ShadowDepth="0" BlurRadius="5" Opacity="0.5" />
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="45"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <MediaElement x:Name="player" Visibility="Hidden" LoadedBehavior="Manual"></MediaElement>
        <StackPanel Grid.Column="0" Grid.ColumnSpan="2">
            <ToolBar HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="40">
                <Button x:Name="openButton" Height="32" VerticalAlignment="Top" Width="75" ToolTip="Open..." Click="openButton_Click">
                    <Image Source="folder.png"></Image>
                </Button>
                <Button x:Name="newPlaylistButton" ToolTip="New Playlist.." Height="32" VerticalAlignment="Top" Width="75" Click="newPlaylistButton_Click">
                    <Image Source="playlist.png"></Image>
                </Button>
                <Button x:Name="aboutButton" ToolTip="About" Height="32" VerticalAlignment="Top" Width="75" Click="aboutButton_Click">
                    <Image Source="about.png"></Image>
                </Button>
                <TextBox Height="32" Margin="0" TextWrapping="Wrap" Text="Search..." HorizontalAlignment="Right" VerticalAlignment="Top" Width="120" KeyUp="SearchBox_KeyUp" GotFocus="TextBox_GotFocus" LostFocus="TextBox_LostFocus" />
            </ToolBar>
        </StackPanel>

        <ListBox x:Name="playlistListBox" Margin="10,0,10,10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" AllowDrop="False"/>

        <DataGrid  Grid.Column="1" Grid.Row="1" SelectionMode="Single" AutoGenerateColumns="False" x:Name="musicDatagrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanUserAddRows="False"
                   MouseMove="musicDatagrid_MouseMove" PreviewMouseLeftButtonDown="musicDatagrid_PreviewMouseLeftButtonDown">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding id}" Visibility="Hidden"/>
                <DataGridTextColumn Binding="{Binding title}" Header="Title"/>
                <DataGridTextColumn Binding="{Binding artist}" Header="Artist"/>
                <DataGridTextColumn Binding="{Binding album}" Header="Album"/>
                <DataGridTextColumn Binding="{Binding genre}" Header="Genre"/>
            </DataGrid.Columns>
            <DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    <Border Background="AliceBlue">
                        <StackPanel Orientation="Horizontal">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="100"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="40"/>
                                    <ColumnDefinition Width="15"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>

                                <StackPanel Grid.Column="0" Grid.Row="0" VerticalAlignment="Center">
                                    <Image Source="{Binding albumImage}"/>    
                                </StackPanel>
                                <StackPanel Grid.Column="2" Grid.Row="0" VerticalAlignment="Center">
                                    <TextBlock Text="{Binding title}" />
                                    <TextBlock Text="{Binding artist}" />
                                    <TextBlock Text="{Binding length}" />
                                    <TextBlock>
                                        <Hyperlink NavigateUri="{Binding url}">More Info</Hyperlink>
                                    </TextBlock>
                                </StackPanel>
                            </Grid>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </DataGrid.RowDetailsTemplate>

        </DataGrid>

        <StackPanel Grid.Column="1" Grid.Row="2" VerticalAlignment="Center">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

                <StackPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Button Content="Play" Click="PlayButton_Click" Template="{StaticResource MusicButton}"></Button>    
                </StackPanel>
                <StackPanel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Button Content="Stop" Click="StopButton_Click" Template="{StaticResource MusicButton}"></Button>
                </StackPanel>
            </Grid>
        </StackPanel>

    </Grid>
</Window>
{'fraction_non_alphanumeric': 0.1226309139407553, 'fraction_numerical': 0.013617857644251018, 'mean_word_length': 1.709585393685812, 'pattern_counts': {'":': 0, '<': 235, '<?xml version=': 0, '>': 235, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4486056', 'n_tokens_mistral': 3665, 'n_tokens_neox': 3216, 'n_words': 546}