<ContentDialog
    x:Class="PCUT.Pages.SvgNestSettingDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:PCUT"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    x:Name="NestSettingDialog"
    Title="SETTINGS"
    PrimaryButtonText="Save"
    SecondaryButtonText="Cancel"
    PrimaryButtonStyle="{StaticResource PrimaryDialogButton}"
    SecondaryButtonStyle="{StaticResource CloseDialogButton}"
    PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
    SecondaryButtonClick="ContentDialog_SecondaryButtonClick">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <!--<RowDefinition/>
            <RowDefinition/>-->
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.8*"/>
            <ColumnDefinition Width="0.2*"/>
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Row="0" Grid.Column="0" Text="Max number of run:"/>
        <TextBox Grid.Row="0" Grid.Column="1" InputScope="Number" Text="{x:Bind NestSettings.MaxNumberOfRun, Mode=TwoWay}" BeforeTextChanging="TextBox_ValidateInt"/>
        <TextBlock Grid.Row="1" Grid.Column="0" Text="Max time run (minutes):"/>
        <TextBox Grid.Row="1" Grid.Column="1" InputScope="Number" Text="{x:Bind NestSettings.MaxRuntimeInMinute, Mode=TwoWay}" BeforeTextChanging="TextBox_ValidateInt"/>
        <TextBlock Grid.Row="2" Grid.Column="0" Text="Space between parts (mm):"/>
        <TextBox Grid.Row="2" Grid.Column="1" InputScope="Number" Text="{x:Bind NestSettings.Spacing, Mode=TwoWay}" BeforeTextChanging="TextBox_ValidateDouble"/>
        <TextBlock Grid.Row="3" Grid.Column="0" Text="Curve tolerance (unit):"/>
        <TextBox Grid.Row="3" Grid.Column="1" InputScope="Number" Text="{x:Bind NestSettings.CurveTolerance, Mode=TwoWay}" BeforeTextChanging="TextBox_ValidateDouble"/>
        <TextBlock Grid.Row="4" Grid.Column="0" Text="Part rotations:"/>
        <ComboBox Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" ItemsSource="{x:Bind NestSettings.ValidRotations}" SelectedItem="{x:Bind NestSettings.Rotations, Mode=TwoWay}" />
        <TextBlock Grid.Row="5" Grid.Column="0" Text="GA population:"/>
        <TextBox Grid.Row="5" Grid.Column="1" InputScope="Number" Text="{x:Bind NestSettings.PopulationSize, Mode=TwoWay}" BeforeTextChanging="TextBox_ValidateInt"/>
        <TextBlock Grid.Row="6" Grid.Column="0" Text="GA mutation rate:"/>
        <TextBox Grid.Row="6" Grid.Column="1" InputScope="Number" Text="{x:Bind NestSettings.MutationRate, Mode=TwoWay}" BeforeTextChanging="TextBox_ValidateInt"/>
        <!--<TextBlock Grid.Row="7" Grid.Column="0" Text="Part in Part:"/>
        <CheckBox Grid.Row="7" Grid.Column="1" IsChecked="{x:Bind NestSettings.UseHoles, Mode=TwoWay}"/>
        <TextBlock Grid.Row="8" Grid.Column="0" Text="Explore concave areas:"/>
        <CheckBox Grid.Row="8" Grid.Column="1" IsChecked="{x:Bind NestSettings.ExploreConcave, Mode=TwoWay}"/>-->
    </Grid>
</ContentDialog>
