<Page x:Class="cosifacile.LeggiCodice"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:WpfKb="clr-namespace:WpfKb.Controls;assembly=WpfKb"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"            
      mc:Ignorable="d" 
      d:DesignHeight="1920" d:DesignWidth="1080"
	Title="LeggiCodice" Unloaded="Page_Unloaded" Loaded="Page_Loaded">

    <!--<ScrollViewer  Height="1000" Width="1080" VerticalAlignment="Top">-->
        <Grid Background="White">
            <Grid HorizontalAlignment="Center" VerticalAlignment="Top" Width="1080" Height="200">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="530" />
                    <ColumnDefinition Width="20" />
                    <ColumnDefinition Width="530" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="200" />
                </Grid.RowDefinitions>
                <Image x:Name="imgRP" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Source="images/logo.png" Grid.Column="0" />
                <Image x:Name="imgLogo" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="500" Source="images/logo.png" Grid.Column="2" />
            </Grid>
        <Label x:Name="lblCard" FontFamily="Raleway ExtraBold Italic" Foreground="#75af61" FontSize="36" Margin="0,220,0,0" HorizontalAlignment="Center" VerticalAlignment="Top">Avvicina il codice a barre della tua Carta Fedeltà</Label>
        <Label x:Name="lblOrder" FontFamily="Raleway ExtraBold Italic" Foreground="#75af61" FontSize="36" Margin="0,220,0,0" HorizontalAlignment="Center" VerticalAlignment="Top">Avvicina il codice a barre del tuo ordine</Label>
        <Label FontFamily="Raleway ExtraBold Italic" Foreground="#75af61" FontSize="36" Margin="0,270,0,0" HorizontalAlignment="Center" VerticalAlignment="Top">al lettore o in alternativa digita</Label>
        <Label FontFamily="Raleway ExtraBold Italic" Foreground="#75af61" FontSize="36" Margin="0,320,0,0" HorizontalAlignment="Center" VerticalAlignment="Top">il codice qui sotto e premi CONFERMA</Label>
            
            <Image HorizontalAlignment="Center" Height="599" Margin="0,493,0,0" VerticalAlignment="Top" Width="1000" Source="images/bar-code.png"/>
            <TextBox x:Name="txtCode" MaxLength="20" FontSize="72" FontFamily="Arial" FontWeight="ExtraBold" HorizontalAlignment="Center" Height="129" Margin="0,963,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="857"/>
            <Grid x:Name="grdKbd" Height="600" Width="950" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,1200,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="500" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="150" />
                    <RowDefinition Height="150" />
                    <RowDefinition Height="150" />
                    <RowDefinition Height="150" />
                </Grid.RowDefinitions>
                <Grid x:Name="grd7" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="0" Grid.Row="0" Tag="7">
                    <Label x:Name="btn7" Grid.Column="0" Grid.Row="0" Content="7" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>
                <Grid x:Name="grd8" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="1" Grid.Row="0" Tag="8">
                    <Label x:Name="btn8" Content="8" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>
                <Grid x:Name="grd9" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="2" Grid.Row="0" Tag="9">
                    <Label x:Name="btn9" Content="9" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>

                <Grid x:Name="grd4" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="0" Grid.Row="1" Tag="4">
                    <Label x:Name="btn4" Grid.Column="0" Grid.Row="0" Content="4" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>
                <Grid x:Name="grd5" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="1" Grid.Row="1" Tag="5">
                    <Label x:Name="btn5" Content="5" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>
                <Grid x:Name="grd6" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="2" Grid.Row="1" Tag="6">
                    <Label x:Name="btn6" Content="6" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>

                <Grid x:Name="grd1" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="0" Grid.Row="2" Tag="1">
                    <Label x:Name="btn1" Grid.Column="0" Grid.Row="0" Content="1" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>
                <Grid x:Name="grd2" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="1" Grid.Row="2" Tag="2">
                    <Label x:Name="btn2" Content="2" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>
                <Grid x:Name="grd3" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="2" Grid.Row="2" Tag="3">
                    <Label x:Name="btn3" Content="3" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>

                <Grid x:Name="grdhome" Background="#4EA245" Margin="5" Grid.Column="0" Grid.Row="3" Tag="1" MouseUp="grdhome_MouseUp">
                    <Label x:Name="btnHome" Grid.Column="0" Grid.Row="0" Content="" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="fontawesome" FontSize="60" />
                </Grid>
                <Grid x:Name="grd0" Background="#75af61" Margin="5" MouseUp="grd_MouseUp" Grid.Column="1" Grid.Row="3" Tag="0">
                    <Label x:Name="btn0" Content="0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Arial Regular" FontSize="60" />
                </Grid>
                <Grid x:Name="grdCanc" Background="#4EA245" Margin="5" Grid.Column="2" Grid.Row="3" Tag="3" MouseUp="grdCanc_MouseUp">
                    <Label x:Name="btnCnc" Content="" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="fontawesome" FontSize="60" />
                </Grid>

                <Grid x:Name="grdCancel" Background="#4EA245" Margin="5" Grid.Column="3" Grid.Row="0" MouseUp="grdCancel_MouseUp">
                    <Label FontFamily="fontawesome" FontSize="50" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,250,0"></Label>
                    <Label x:Name="btnCancel" Content="ANNULLA" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="50,0,0,0" FontFamily="Arial Regular" FontSize="50" />
                </Grid>
                <Grid x:Name="grdHelp" Background="#4EA245" Margin="5" Grid.Column="3" Grid.Row="1" MouseUp="grdHelp_MouseUp">
                    <Label FontFamily="fontawesome" FontSize="50" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,350,0"></Label>
                    <Label x:Name="btnHelp" Content="ASSISTENZA" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="50,0,0,0" FontFamily="Arial Regular" FontSize="50" />
                </Grid>
                <Grid x:Name="grdConfirm" Background="#0D553F" Margin="5" Grid.Column="3" Grid.Row="2" Grid.RowSpan="2" MouseUp="grdConfirm_MouseUp">
                    <Label FontFamily="fontawesome" FontSize="50" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,300,0"></Label>
                    <Label x:Name="btnConfirm" Content="CONFERMA" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="50,0,0,0" FontFamily="Arial Regular" FontSize="50" />
                </Grid>


            </Grid>
            <Grid Width="1000" Height="50" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,40">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50" />
                    <ColumnDefinition Width="450" />
                    <ColumnDefinition Width="350" />
                    <ColumnDefinition Width="150" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50" />
                </Grid.RowDefinitions>
                <Label x:Name="lblClessidra" Content="" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"
                   FontSize="30" Grid.Column="0" Grid.Row="0" FontFamily="fontawesome" Foreground="#0D553F"/>
                <Label x:Name="lblTimer" Content="" HorizontalAlignment="left" Margin="0" VerticalAlignment="Center" FontFamily="Arial Regular"
                    Foreground="#0D553F" FontSize="30" Grid.Column="1" Grid.Row="0"/>
                <Label x:Name="lblBack" Content="" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center"
                   FontSize="30" Grid.Column="2" Grid.Row="0" FontFamily="fontawesome" Foreground="#0D553F" MouseUp="lblBack_MouseUp"/>
                <Label x:Name="lblAnnulla" Content="ANNULLA" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" FontFamily="Arial Regular"
                    Foreground="#0D553F" FontSize="30" Grid.Column="3" Grid.Row="0" MouseUp="lblAnnulla_MouseUp"/>
            </Grid>
            
        <Grid x:Name="grdNotFound" Width="1080" Height="1920" Visibility="Hidden">
                <Grid.Background>
                    <SolidColorBrush Opacity="0.5" Color="Black"/>
                </Grid.Background>
                <Border BorderBrush="White" BorderThickness="10,10,10,10" CornerRadius="10,10,10,10" Height="660" Width="990">
                    <Grid Background="White">
                        <Image HorizontalAlignment="Center" Source="images/logo_small.png" Width="200" Margin="0,0,0,0" VerticalAlignment="Bottom"/>
                        <Grid x:Name="grdClose" HorizontalAlignment="Right" Height="50" Margin="0,0,0,0" VerticalAlignment="Top" Width="200" MouseUp="grdClose_MouseUp">
                            <Label Content="" FontFamily="fontawesome" FontSize="40" Foreground="Gray" HorizontalAlignment="Right" Margin="0,0,130,0"></Label>
                            <Label Content="CHIUDI" FontFamily="Raleway Light" FontSize="36" Foreground="Gray" HorizontalAlignment="Right"></Label>
                        </Grid>
                        <TextBlock x:Name="nfMessage" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" FontFamily="Raleway ExtraBold Italic" Foreground="#0D553f" FontSize="36" Margin="0,0,0,0" TextWrapping="Wrap">NUMERO ORDINE <LineBreak/>O NUMERO CARTA FEDELTA'<LineBreak/>NON RICONOSCIUTO.</TextBlock>
                    </Grid>
                </Border>
            </Grid>

        <Grid x:Name="grdHelpPopUp" Width="1080" Height="1920" Visibility="Hidden">
            <Grid.Background>
                <SolidColorBrush Opacity="0.5" Color="Black"/>
            </Grid.Background>
            <Border BorderBrush="White" BorderThickness="10,10,10,10" CornerRadius="10,10,10,10" Height="660" Width="990">
                <Grid Background="White">
                    <Image HorizontalAlignment="Center" Source="images/logo_small.png" Width="200" Margin="0,0,0,0" VerticalAlignment="Bottom"/>
                    <Grid x:Name="grdCloseHelp" HorizontalAlignment="Right" Height="50" Margin="0,0,0,0" VerticalAlignment="Top" Width="200" MouseUp="grdClose_MouseUp">
                        <Label Content="" FontFamily="fontawesome" FontSize="40" Foreground="Gray" HorizontalAlignment="Right" Margin="0,0,130,0"></Label>
                        <Label Content="CHIUDI" FontFamily="Raleway Light" FontSize="36" Foreground="Gray" HorizontalAlignment="Right"></Label>
                    </Grid>
                    <TextBlock x:Name="helpMessage" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" FontFamily="Raleway ExtraBold Italic" Foreground="#0D553f" FontSize="36" Margin="0,0,0,0" TextWrapping="Wrap">NUMERO ORDINE <LineBreak/>O NUMERO CARTA FEDELTA'<LineBreak/>NON RICONOSCIUTO.</TextBlock>
                </Grid>
            </Border>
        </Grid>
        <Grid x:Name="grdLoading" Width="1080" Height="1920" Visibility="Hidden">
            <Grid.Background>
                <SolidColorBrush Opacity="0.5" Color="Black"/>
            </Grid.Background>
            <Border BorderBrush="White" BorderThickness="10,10,10,10" CornerRadius="10,10,10,10" Height="660" Width="990">
                <Grid Background="White">
                    <Label Content="" HorizontalAlignment="Center" Margin="0,50,0,0" VerticalAlignment="Top"
                   FontSize="350" FontFamily="fontawesome" Foreground="#0D553F"/>
                    <Image HorizontalAlignment="Center" Source="images/logo_small.png" Width="200" Margin="0,0,0,0" VerticalAlignment="Bottom"/>
                    <MediaElement HorizontalAlignment="Center" Height="300" VerticalAlignment="Top" Width="300" Source="images/loadingImage.gif" x:Name="loader" Visibility="Hidden" Margin="0,100,0,0"/>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" FontFamily="Raleway ExtraBold Italic" Foreground="#0D553f" FontSize="36" Margin="0,350,0,0" TextWrapping="Wrap">ELABORAZIONE DATI IN CORSO</TextBlock>
                </Grid>
            </Border>
        </Grid>
    </Grid>
        

    <!--</ScrollViewer>-->
</Page>
