<commit_before>﻿<Page
    x:Class="TestAppUWP.Samples.Map.MapPage"
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:maps="using:Windows.UI.Xaml.Controls.Maps"
    xmlns:map="using:TestAppUWP.Samples.Map"
    mc:Ignorable="d"
    DataContext="{Binding RelativeSource={RelativeSource Self}, Converter={StaticResource ViewModelLocator}}">
    <Page.Resources>
        <DataTemplate x:Key="DataTemplate" x:DataType="map:Customer">
            <StackPanel Margin="4,0" Padding="0,8" BorderBrush="LightGray" BorderThickness="0,0,0,1">
                <TextBlock><Run Text="{x:Bind Number}"/> Multi: <Run Text="{x:Bind Multi}" /></TextBlock>
                <TextBlock>AppointmentFlag: <Run Text="{x:Bind AppointmentFlag}" FontWeight="SemiBold"/><LineBreak/>
IsPhoneCall: <Run Text="{x:Bind IsPhoneCall}" FontWeight="SemiBold"/>,
vcra: <Run Text="{x:Bind VisitsCreateRecurringAppointments}" FontWeight="SemiBold"/></TextBlock>
                <TextBlock><Run Text="{x:Bind Latitude}"/> / <Run Text="{x:Bind Longitude}"/></TextBlock>
            </StackPanel>
        </DataTemplate>
    </Page.Resources>

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <map:RenderPlygonFlag Grid.Row="1" Grid.Column="0" Width="50" Height="50" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <map:RenderImageFlag Grid.Row="1" Grid.Column="0" x:Name="RenderImageFlag" Width="50" Height="50" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <maps:MapControl x:Name="MapControl" Grid.Row="1" Grid.Column="0"
                         HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                         RotateInteractionMode="GestureAndControl" ZoomInteractionMode="GestureAndControl" TiltInteractionMode="GestureAndControl"
                         MapElementClick="RoutePlanMapControl_OnMapElementClick" MapTapped="RoutePlanMapControl_OnMapTapped" />
        <ListView Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" x:Name="ListView"
                  ItemsSource="{x:Bind _viewModel.Customers, Mode=OneWay}"
                  ItemTemplate="{StaticResource DataTemplate}" ItemClick="ListViewBase_OnItemClick" IsItemClickEnabled="True">
            <ListView.ItemContainerStyle>
                <Style TargetType="ListViewItem">
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                </Style>
            </ListView.ItemContainerStyle>
        </ListView>
    </Grid>
    <Page.BottomAppBar>
        <CommandBar>
            <CommandBar.Content>
                <StackPanel Margin="12,8,12,0" Orientation="Horizontal">
                    <ComboBox ItemsSource="{x:Bind _viewModel.BingMapsKeys}" DisplayMemberPath="Item1" SelectedValuePath="Item2" 
                              SelectedValue="{x:Bind _viewModel.MapServiceToken, Mode=TwoWay}" />
                    <TextBox Margin="12,0" MinWidth="200" KeyDown="UIElement_OnKeyDown" PlaceholderText="search place"/>
                </StackPanel>
            </CommandBar.Content>
            <CommandBar.PrimaryCommands>
                <AppBarButton Icon="Refresh" Click="ReloadCustomers" Label="Reload customers"/>
                <AppBarButton Command="{x:Bind _viewModel}" CommandParameter="Route" Label="Route">
                    <AppBarButton.Icon>
                        <FontIcon Glyph="&#xE816;"/>
                    </AppBarButton.Icon>
                </AppBarButton>
                <AppBarButton Command="{x:Bind _viewModel}" CommandParameter="DistanceMatrix" Label="Distance Matrix">
                    <AppBarButton.Icon>
                        <FontIcon Glyph="&#xF0E2;"/>
                    </AppBarButton.Icon>
                </AppBarButton>
            </CommandBar.PrimaryCommands>
        </CommandBar>
    </Page.BottomAppBar>
</Page><commit_msg>Add AppBarButton to start operation that use bing maps transactions<commit_after>﻿<Page
    x:Class="TestAppUWP.Samples.Map.MapPage"
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:maps="using:Windows.UI.Xaml.Controls.Maps"
    xmlns:map="using:TestAppUWP.Samples.Map"
    mc:Ignorable="d"
    DataContext="{Binding RelativeSource={RelativeSource Self}, Converter={StaticResource ViewModelLocator}}">
    <Page.Resources>
        <DataTemplate x:Key="DataTemplate" x:DataType="map:Customer">
            <StackPanel Margin="4,0" Padding="0,8" BorderBrush="LightGray" BorderThickness="0,0,0,1">
                <TextBlock><Run Text="{x:Bind Number}"/> Multi: <Run Text="{x:Bind Multi}" /></TextBlock>
                <TextBlock>AppointmentFlag: <Run Text="{x:Bind AppointmentFlag}" FontWeight="SemiBold"/><LineBreak/>
IsPhoneCall: <Run Text="{x:Bind IsPhoneCall}" FontWeight="SemiBold"/>,
vcra: <Run Text="{x:Bind VisitsCreateRecurringAppointments}" FontWeight="SemiBold"/></TextBlock>
                <TextBlock><Run Text="{x:Bind Latitude}"/> / <Run Text="{x:Bind Longitude}"/></TextBlock>
            </StackPanel>
        </DataTemplate>
    </Page.Resources>

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <map:RenderPlygonFlag Grid.Row="1" Grid.Column="0" Width="50" Height="50" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <map:RenderImageFlag Grid.Row="1" Grid.Column="0" x:Name="RenderImageFlag" Width="50" Height="50" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <maps:MapControl x:Name="MapControl" Grid.Row="1" Grid.Column="0"
                         HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                         RotateInteractionMode="GestureAndControl" ZoomInteractionMode="GestureAndControl" TiltInteractionMode="GestureAndControl"
                         MapElementClick="RoutePlanMapControl_OnMapElementClick" MapTapped="RoutePlanMapControl_OnMapTapped" />
        <ListView Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" x:Name="ListView"
                  ItemsSource="{x:Bind _viewModel.Customers, Mode=OneWay}"
                  ItemTemplate="{StaticResource DataTemplate}" ItemClick="ListViewBase_OnItemClick" IsItemClickEnabled="True">
            <ListView.ItemContainerStyle>
                <Style TargetType="ListViewItem">
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                </Style>
            </ListView.ItemContainerStyle>
        </ListView>
    </Grid>
    <Page.BottomAppBar>
        <CommandBar>
            <CommandBar.Content>
                <StackPanel Margin="12,8,12,0" Orientation="Horizontal">
                    <ComboBox ItemsSource="{x:Bind _viewModel.BingMapsKeys}" DisplayMemberPath="Item1" SelectedValuePath="Item2" 
                              SelectedValue="{x:Bind _viewModel.MapServiceToken, Mode=TwoWay}"
                              IsEnabled="{x:Bind _viewModel.CommandsEnabled, Mode=OneWay}"/>
                    <TextBox Margin="12,0" MinWidth="200" KeyDown="UIElement_OnKeyDown" PlaceholderText="search place"
                             IsEnabled="{x:Bind _viewModel.CommandsEnabled, Mode=OneWay}"/>
                </StackPanel>
            </CommandBar.Content>
            <CommandBar.PrimaryCommands>
                <AppBarButton Icon="Refresh" Click="ReloadCustomers" Label="Reload customers"
                              Command="{x:Bind _viewModel}"/>
                <AppBarButton Command="{x:Bind _viewModel}" CommandParameter="Route" Label="Route">
                    <AppBarButton.Icon>
                        <FontIcon Glyph="&#xE816;"/>
                    </AppBarButton.Icon>
                </AppBarButton>
                <AppBarButton Command="{x:Bind _viewModel}" CommandParameter="DistanceMatrix" Label="Distance Matrix">
                    <AppBarButton.Icon>
                        <FontIcon Glyph="&#xF0E2;"/>
                    </AppBarButton.Icon>
                </AppBarButton>
                <AppBarButton Command="{x:Bind _viewModel}" CommandParameter="Transactions" Label="Transactions"
                              Icon="Play"/>
            </CommandBar.PrimaryCommands>
        </CommandBar>
    </Page.BottomAppBar>
</Page>
{'fraction_non_alphanumeric': 0.1349612994658236, 'fraction_numerical': 0.013081870707511174, 'mean_word_length': 2.830480167014614, 'pattern_counts': {'":': 0, '<': 134, '<?xml version=': 0, '>': 134, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6065968', 'n_tokens_mistral': 2716, 'n_tokens_neox': 2472, 'n_words': 364}