<commit_before>﻿<Page
    x:Class="Savvy.Views.AddTransaction.AddTransactionView"
    
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Savvy.Views.AddTransaction"
    xmlns:micro="using:Caliburn.Micro"
    xmlns:converter="using:Savvy.Converter"
    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
    
    Language="en-US"
    >
    <Page.Resources>
        <converter:BooleanToObjectConverter x:Key="BoolToInflowOutflowConverter"
                                            TrueValue="Outflow"
                                            FalseValue="Inflow" />
    </Page.Resources>
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0"
                    Padding="10">

            <ComboBox x:Name="AccountsComboBox"
                      ItemsSource="{Binding Accounts}" 
                      SelectedItem="{Binding SelectedAccount, Mode=TwoWay}"
                      Header="Account"
                      HorizontalAlignment="Stretch"
                      />

            <ComboBox x:Name="CategoriesComboBox"
                      ItemsSource="{Binding Categories}" 
                      SelectedItem="{Binding SelectedCategory, Mode=TwoWay}"
                      Header="Category"
                      HorizontalAlignment="Stretch"
                      />

            <AutoSuggestBox x:Name="PayeesAutoSuggestBox"
                            Header="Payee"
                            Text="{Binding SelectedPayeeName, Mode=TwoWay}"
                            TextChanged="PayeesAutoSuggestBox_OnTextChanged"
                            />

            <ToggleButton Content="{Binding IsOutflow, Converter={StaticResource BoolToInflowOutflowConverter}}" 
                          Margin="0, 10, 0, 0"
                          HorizontalAlignment="Stretch"
                          IsChecked="{Binding IsOutflow, Mode=TwoWay}"
                          />

            <TextBox x:Name="AmountTextBox"
                     Text="{Binding Amount, Mode=TwoWay}"
                     Header="Amount" 
                     InputScope="NumberFullWidth" 
                     />
            
            <TextBox x:Name="MemoTextBox"
                     Text="{Binding Memo, Mode=TwoWay}"
                     Header="Memo"
                     />
            <ToggleSwitch OnContent="Cleared" OffContent="Uncleared" IsOn="{Binding Cleared, Mode=TwoWay}" />
        </StackPanel>

        <CommandBar Grid.Row ="1">
            <AppBarButton Icon="Save"
                          Label="Save transaction"
                          micro:Message.Attach="Save"
                          />
        </CommandBar>
        
    </Grid>
</Page><commit_msg>Change the inflow-outflow toggle-button to a toggle-switch<commit_after>﻿<Page
    x:Class="Savvy.Views.AddTransaction.AddTransactionView"
    
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Savvy.Views.AddTransaction"
    xmlns:caliburn="using:Caliburn.Micro"
    xmlns:converter="using:Savvy.Converter"
    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
    >
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0"
                    Padding="10">

            <ComboBox x:Name="AccountsComboBox"
                      ItemsSource="{Binding Accounts}" 
                      SelectedItem="{Binding SelectedAccount, Mode=TwoWay}"
                      Header="Account"
                      HorizontalAlignment="Stretch"
                      />

            <ComboBox x:Name="CategoriesComboBox"
                      ItemsSource="{Binding Categories}" 
                      SelectedItem="{Binding SelectedCategory, Mode=TwoWay}"
                      Header="Category"
                      HorizontalAlignment="Stretch"
                      />

            <AutoSuggestBox x:Name="PayeesAutoSuggestBox"
                            Header="Payee"
                            Text="{Binding SelectedPayeeName, Mode=TwoWay}"
                            TextChanged="PayeesAutoSuggestBox_OnTextChanged"
                            />

            <TextBox x:Name="AmountTextBox"
                     Text="{Binding Amount, Mode=TwoWay}"
                     Header="Amount" 
                     InputScope="NumberFullWidth" 
                     />
                
            <ToggleSwitch OnContent="Outflow" 
                          OffContent="Inflow" 
                          IsOn="{Binding IsOutflow, Mode=TwoWay}"
                          />
            
            <TextBox x:Name="MemoTextBox"
                     Text="{Binding Memo, Mode=TwoWay}"
                     Header="Memo"
                     />
            
            <ToggleSwitch OnContent="Cleared" 
                          OffContent="Uncleared" 
                          IsOn="{Binding Cleared, Mode=TwoWay}" 
                          />
        </StackPanel>

        <CommandBar Grid.Row ="1">
            <AppBarButton Icon="Save"
                          Label="Save transaction"
                          caliburn:Message.Attach="Save"
                          />
        </CommandBar>
        
    </Grid>
</Page>
{'fraction_non_alphanumeric': 0.10467855940760687, 'fraction_numerical': 0.007573207674183777, 'mean_word_length': 1.445679012345679, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5522917', 'n_tokens_mistral': 1611, 'n_tokens_neox': 1409, 'n_words': 187}