<commit_before>﻿<Window x:Class="TemplateBuilder.View.MainWindow.MainWindowView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:model="clr-namespace:TemplateBuilder.Model;assembly="
        xmlns:view="clr-namespace:TemplateBuilder.View;assembly="
        xmlns:local="clr-namespace:TemplateBuilder.ViewModel;assembly="
        xmlns:conv="clr-namespace:TemplateBuilder.ViewModel.Converters;assembly="
        mc:Ignorable="d"
        x:Name="mainWindow"
        Title="MainWindow" Height="525" Width="525">

    <Window.Resources>
        <conv:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
        <conv:EnumToBooleanConverter x:Key="EnumToBooleanConverter" />
        <conv:BooleanToOppositeBooleanConverter x:Key="BooleanToOppositeBooleanConverter" />
        <conv:EnumToVisibilityConverter x:Key="EnumToVisibilityConverter" />
        <conv:RadToDegConverter x:Key="RadToDegConverter" />
        <conv:MultiplyConverter x:Key="MultiplyConverter" />
        <conv:ScaleConverter x:Key="ScaleConverter" />
        
        <!-- Styles -->
        <Style x:Key="baseStyle">
            <Setter Property="TextBlock.FontSize" Value="12" />
            <Setter Property="TextBlock.FontFamily" Value="Calibri" />
            <Setter Property="FrameworkElement.Margin" Value="2.5, 0, 0, 2.5" />
        </Style>
        <Style x:Key="toolbarStackStyle">
            <Setter Property="FrameworkElement.Margin" Value="0, 5, 0, 5" />
        </Style>
        <Style x:Key="iconsStyle" TargetType="Button">
            <Setter Property="Width" Value="40" />
            <Setter Property="Height" Value="40" />
            <Setter Property="Margin" Value="2.5" />
        </Style>
        <Style x:Key="controlTextStyle" BasedOn="{StaticResource baseStyle}">
            <Setter Property="TextBlock.FontSize" Value="10" />
        </Style>
        <Style x:Key="toolbarTitleStyle" BasedOn="{StaticResource baseStyle}">
            <Setter Property="TextBlock.FontWeight" Value="Bold" />
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
        </Style>
    </Window.Resources>

    <Window.InputBindings>
        <KeyBinding Key="t" Command="{Binding TerminationButtonPressCommand}"/>
        <KeyBinding Key="b" Command="{Binding BifuricationButtonPressCommand}"/>
        <KeyBinding Key="Esc" Command="{Binding EscapePressCommand}"/>
    </Window.InputBindings>

    <DockPanel x:Name="sidePanel">
        <ToolBarTray DockPanel.Dock="Left" Orientation="Vertical"
                     HorizontalAlignment="Center" VerticalAlignment="Stretch">
            <!-- Data Toolbar -->
            <ToolBar x:Name="dataToolbar">
                <TextBlock Style="{StaticResource toolbarTitleStyle}">Data Toolbar</TextBlock>
                <!-- Load/Save buttons -->
                <StackPanel Style="{StaticResource toolbarStackStyle}" Orientation="Horizontal">
                    <Button x:Name="saveTemplate"
                            VerticalAlignment="Top"
                            ToolTip="Saves the current template"
                            Style="{StaticResource iconsStyle}"
                            Command="{Binding Path=SaveTemplateCommand}">
                        <Image Source="pack://application:,,,/Resources/Icons/Save.ico" />
                    </Button>
                    <Button x:Name="loadFile"
                            VerticalAlignment="Top"
                            ToolTip="Loads the next capture for templating"
                            Style="{StaticResource iconsStyle}"
                            Command="{Binding Path=LoadFileCommand}">
                        <Image Source="{Binding Path=LoadIcon}" />
                    </Button>
                </StackPanel>
                <!-- Scanner type dropdown -->
                <StackPanel Style="{StaticResource toolbarStackStyle}">
                    <TextBlock Style="{StaticResource controlTextStyle}">Scanner Type:</TextBlock>
                    <ComboBox x:Name="scannerTypeComboBox" VerticalAlignment="Top"
                            Width="100"
                            ItemsSource="{Binding Path=ScannerTypes}"
                            SelectedItem="{Binding Path=FilteredScannerType}"
                              ToolTip="Load a capture from a specific scanner.">
                        <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                    </ComboBox>
                </StackPanel>
                <!-- Template status radiobuttons -->
                <StackPanel Style="{StaticResource toolbarStackStyle}">
                    <TextBlock Style="{StaticResource controlTextStyle}">Template Status:</TextBlock>
                    <RadioButton x:Name="getTemplatedCaptureButton" GroupName="isGetTemplatedCapture"
                                 IsChecked="{Binding Path=IsGetTemplatedCapture}"
                                 ToolTip="Load a capture that already has a template">
                        Templated
                    </RadioButton>
                    <RadioButton x:Name="getUntemplatedCaptureButton" GroupName="isGetTemplatedCapture"
                                 IsChecked="{Binding Path=IsGetTemplatedCapture, Converter={StaticResource BooleanToOppositeBooleanConverter}}"
                                 ToolTip="Load a capture that has not yet got a template">
                        Untemplated
                    </RadioButton>
                </StackPanel>
            </ToolBar>
            <!-- Templating Toolbar -->
            <ToolBar x:Name="templatingToolbar" VerticalAlignment="Bottom">
                <TextBlock Style="{StaticResource toolbarTitleStyle}">Templating Toolbar</TextBlock>
                <!-- Minutia Type radiobuttons -->
                <StackPanel Style="{StaticResource toolbarStackStyle}">
                    <TextBlock Style="{StaticResource controlTextStyle}">Minutia Type:</TextBlock>
                    <RadioButton IsChecked="{Binding Path=InputMinutiaType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:MinutiaType.Termination}}"
                                 IsEnabled="{Binding Path=IsTemplating}"
                                 GroupName="inputMinutiaType"
                                 ToolTip="Record a termination (T)">
                        Termination
                    </RadioButton>
                    <RadioButton IsChecked="{Binding Path=InputMinutiaType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:MinutiaType.Bifurication}}"
                                 IsEnabled="{Binding Path=IsTemplating}"
                                 GroupName="inputMinutiaType"
                                 ToolTip="Record a bifurication (B)">
                        Bifurication
                    </RadioButton>
                </StackPanel>
            </ToolBar>
        </ToolBarTray>
        <!-- Guidance Text -->
        <TextBlock x:Name="promptBanner" Text="{Binding Path=PromptText}" DockPanel.Dock="Top"
                   TextAlignment="Center" FontSize="30" Foreground="Red"
                   Style="{StaticResource baseStyle}"/>
        
        <!-- MAIN CONTENT -->
        <Grid Margin="0,51,0,0"><commit_msg>WORK: Updated layout to look a little bit more pretty. (Expander and GroupBoxes)<commit_after>﻿<Window x:Class="TemplateBuilder.View.MainWindow.MainWindowView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:model="clr-namespace:TemplateBuilder.Model;assembly="
        xmlns:view="clr-namespace:TemplateBuilder.View;assembly="
        xmlns:local="clr-namespace:TemplateBuilder.ViewModel;assembly="
        xmlns:conv="clr-namespace:TemplateBuilder.ViewModel.Converters;assembly="
        mc:Ignorable="d"
        x:Name="mainWindow"
        Title="MainWindow" Height="525" Width="525">

    <Window.Resources>
        <conv:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
        <conv:EnumToBooleanConverter x:Key="EnumToBooleanConverter" />
        <conv:BooleanToOppositeBooleanConverter x:Key="BooleanToOppositeBooleanConverter" />
        <conv:EnumToVisibilityConverter x:Key="EnumToVisibilityConverter" />
        <conv:RadToDegConverter x:Key="RadToDegConverter" />
        <conv:MultiplyConverter x:Key="MultiplyConverter" />
        <conv:ScaleConverter x:Key="ScaleConverter" />
        
        <!-- Styles -->
        <Style x:Key="baseStyle">
            <Setter Property="TextBlock.FontSize" Value="12" />
            <Setter Property="TextBlock.FontFamily" Value="Calibri" />
            <Setter Property="FrameworkElement.Margin" Value="2.5, 0, 0, 2.5" />
        </Style>
        <Style x:Key="toolbarStackStyle">
            <Setter Property="FrameworkElement.Margin" Value="0, 5, 0, 5" />
        </Style>
        <Style x:Key="iconsStyle" TargetType="Button">
            <Setter Property="Width" Value="40" />
            <Setter Property="Height" Value="40" />
            <Setter Property="Margin" Value="2.5" />
        </Style>
        <Style x:Key="controlTextStyle" BasedOn="{StaticResource baseStyle}">
            <Setter Property="TextBlock.FontSize" Value="10" />
        </Style>
        <Style x:Key="toolsTitleStyle" BasedOn="{StaticResource baseStyle}">
            <Setter Property="TextBlock.FontWeight" Value="Bold" />
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
        </Style>
        <Style x:Key="toolsSectionStyle" BasedOn="{StaticResource baseStyle}">
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
        </Style>
        
        <!-- Data Templates -->
        <DataTemplate x:Key="headerTemplate">
            <TextBlock Text="{Binding}"
                       Style="{StaticResource toolsTitleStyle}"/>
        </DataTemplate>
        <DataTemplate x:Key="sectionTemplate">
            <TextBlock Text="{Binding}"
                       Style="{StaticResource toolsSectionStyle}"/>
        </DataTemplate>
    </Window.Resources>

    <Window.InputBindings>
        <KeyBinding Key="t" Command="{Binding TerminationButtonPressCommand}"/>
        <KeyBinding Key="b" Command="{Binding BifuricationButtonPressCommand}"/>
        <KeyBinding Key="Esc" Command="{Binding EscapePressCommand}"/>
    </Window.InputBindings>

    <DockPanel x:Name="sidePanel">
        <ToolBarTray DockPanel.Dock="Left" Orientation="Vertical"
                     HorizontalAlignment="Center" VerticalAlignment="Stretch">
            <!-- Data Toolbar -->
            <ToolBar x:Name="dataToolbar">
                <GroupBox Header="Data Tools"
                          HeaderTemplate="{StaticResource headerTemplate}">
                    <StackPanel Style="{StaticResource toolbarStackStyle}" Orientation="Vertical">
                        <!-- Load/Save buttons -->
                        <StackPanel Style="{StaticResource toolbarStackStyle}" Orientation="Horizontal">
                            <Button x:Name="saveTemplate"
                            VerticalAlignment="Top"
                            ToolTip="Saves the current template"
                            Style="{StaticResource iconsStyle}"
                            Command="{Binding Path=SaveTemplateCommand}">
                                <Image Source="pack://application:,,,/Resources/Icons/Save.ico" />
                            </Button>
                            <Button x:Name="loadFile"
                            VerticalAlignment="Top"
                            ToolTip="Loads the next capture for templating"
                            Style="{StaticResource iconsStyle}"
                            Command="{Binding Path=LoadFileCommand}">
                                <Image Source="{Binding Path=LoadIcon}" />
                            </Button>
                        </StackPanel>
                        <Expander Name="myExpander" Header="Load Options" 
                                  ExpandDirection="Down" IsExpanded="True"
                                  HeaderTemplate="{StaticResource sectionTemplate}"> 
                            <StackPanel Orientation="Vertical">
                                <!-- Scanner type dropdown -->
                                <StackPanel Style="{StaticResource toolbarStackStyle}">
                                    <Label Style="{StaticResource controlTextStyle}">Scanner Type:</Label>
                                    <ComboBox x:Name="scannerTypeComboBox" VerticalAlignment="Top"
                                    Width="100"
                                    ItemsSource="{Binding Path=ScannerTypes}"
                                    SelectedItem="{Binding Path=FilteredScannerType}"
                                      ToolTip="Load a capture from a specific scanner.">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"/>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>
                                </StackPanel>
                                <!-- Template status radiobuttons -->
                                <StackPanel Style="{StaticResource toolbarStackStyle}">
                                    <Label Style="{StaticResource controlTextStyle}">Template Status:</Label>
                                    <RadioButton x:Name="getTemplatedCaptureButton" GroupName="isGetTemplatedCapture"
                                         IsChecked="{Binding Path=IsGetTemplatedCapture}"
                                         ToolTip="Load a capture that already has a template">
                                        Templated
                                    </RadioButton>
                                    <RadioButton x:Name="getUntemplatedCaptureButton" GroupName="isGetTemplatedCapture"
                                         IsChecked="{Binding Path=IsGetTemplatedCapture, Converter={StaticResource BooleanToOppositeBooleanConverter}}"
                                         ToolTip="Load a capture that has not yet got a template">
                                        Untemplated
                                    </RadioButton>
                                </StackPanel>
                            </StackPanel>
                        </Expander>
                    </StackPanel>
                </GroupBox>
                <!-- Templating Group -->
                <GroupBox Header="Templating Tools"
                          HeaderTemplate="{StaticResource headerTemplate}">
                    <!-- Minutia Type radiobuttons -->
                <StackPanel Style="{StaticResource toolbarStackStyle}">
                    <TextBlock Style="{StaticResource controlTextStyle}">Minutia Type:</TextBlock>
                    <RadioButton IsChecked="{Binding Path=InputMinutiaType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:MinutiaType.Termination}}"
                                 IsEnabled="{Binding Path=IsTemplating}"
                                 GroupName="inputMinutiaType"
                                 ToolTip="Record a termination (T)">
                        Termination
                    </RadioButton>
                    <RadioButton IsChecked="{Binding Path=InputMinutiaType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:MinutiaType.Bifurication}}"
                                 IsEnabled="{Binding Path=IsTemplating}"
                                 GroupName="inputMinutiaType"
                                 ToolTip="Record a bifurication (B)">
                        Bifurication
                    </RadioButton>
                </StackPanel>
                </GroupBox>
            </ToolBar>
        </ToolBarTray>
        <!-- Guidance Text -->
        <TextBlock x:Name="promptBanner" Text="{Binding Path=PromptText}" DockPanel.Dock="Top"
                   TextAlignment="Center" FontSize="30" Foreground="Red"
                   Style="{StaticResource baseStyle}"/>
        
        <!-- MAIN CONTENT -->
        <Grid Margin="0,51,0,0">
{'fraction_non_alphanumeric': 0.10933888118354138, 'fraction_numerical': 0.006010171058714748, 'mean_word_length': 1.792029686995805, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 0, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4536571', 'n_tokens_mistral': 4251, 'n_tokens_neox': 3894, 'n_words': 666}