<!--
Copyright (c) 2018, Rene Lergner - wpinternals.net - @Heathcliff74xda

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-->

<UserControl x:Class="WPinternals.RegistrationView"
             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:local="clr-namespace:WPinternals"
             mc:Ignorable="d" 
             d:DesignWidth="700">
    <Border BorderThickness="1" BorderBrush="#FFD4D4D4" HorizontalAlignment="Stretch" VerticalAlignment="Center">
        <Grid>
            <local:FlowDocumentScrollViewerNoMouseWheel Margin="45,25,45,75" VerticalScrollBarVisibility="Auto">
                <FlowDocument x:Name="Document" FontFamily="Segoe UI" FontSize="12" PagePadding="0">
                    <local:Paragraph>
                        <Run Text="Registration" FontSize="18" FontWeight="Bold" Foreground="#FF3753A6" />
                        <LineBreak />
                        <LineBreak />
                        <Run Text="This software needs to be registered. Your personal data will not be shared or sold. Information is collected for the purpose of improving the software." />
                        <LineBreak />
                        <LineBreak />
                        <Grid >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="150" />
                                <ColumnDefinition Width="350" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <TextBlock Grid.Row="0" Grid.Column="0" Text="Name" Margin="0,3,0,0" />
                            <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" Margin="0,0,0,10" Height="24" VerticalContentAlignment="Center"/>
                            <TextBlock Grid.Row="1" Grid.Column="0" Text="Email" Margin="0,3,0,0" />
                            <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Email, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" Margin="0,0,0,10" Height="24" />
                            <TextBlock Grid.Row="2" Grid.Column="0" Text="Skype ID (optional)" Margin="0,3,0,0" />
                            <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding SkypeID, Mode=TwoWay}" HorizontalAlignment="Stretch" Margin="0,0,0,10" Height="24" />
                            <TextBlock Grid.Row="3" Grid.Column="0" Text="Telegram ID (optional)" Margin="0,3,0,0" />
                            <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding TelegramID, Mode=TwoWay}" HorizontalAlignment="Stretch" Height="24" />
                        </Grid>
                    </local:Paragraph>
                </FlowDocument>
            </local:FlowDocumentScrollViewerNoMouseWheel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,80,45,25">
                <Button Command="{Binding Path=ContinueCommand, Mode=OneWay}" Content="Register" Width="100" Height="Auto" Padding="0,5" IsEnabled="{Binding Path=IsRegistrationComplete, Mode=OneWay}" />
                <Button Command="{Binding Path=ExitCommand, Mode=OneWay}" Content="Exit" Width="100" Height="Auto" Padding="0,5" Margin="10,0,0,0" />
            </StackPanel>
        </Grid>
    </Border>
</UserControl>
