<UserControl x:Class="SimulationPageUC"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
   xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
   mc:Ignorable="d" 
   d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SimulationPage_Initialized" Loaded="SimulationPage_Loaded">

   <!-- Definizione della SimulationPage -->
   <Grid Name="SimulationPageGrid" >
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="3*"/>
         <ColumnDefinition Width="12*"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
         <RowDefinition Height="1*"/>
         <RowDefinition Height="8*"/>
         <RowDefinition Height="1*"/>
      </Grid.RowDefinitions>

      <!-- Definizione della Grid superiore -->
      <Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="4*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="7*"/>
         </Grid.ColumnDefinitions>

         <Button Name="MachViewModeBtn" Grid.Column="1"
            Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
                <Image Source="{DynamicResource MHTImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
         </Button>

      </Grid>

      <!-- Definizione della Grid Laterale -->
      <Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="3.0*"/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="0.5*"/>
         </Grid.RowDefinitions>

         <!-- Definizione della Grid con i dati delle stime -->
         <Border Name="EstimGrid" Style="{DynamicResource OmagCut_Border}" Grid.Row="0" Grid.ColumnSpan="3">
            <Grid >
               <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="1*"/>
                  <ColumnDefinition Width="1*"/>
               </Grid.ColumnDefinitions>
               <Grid.RowDefinitions>
                  <RowDefinition Height="0.5*"/>
                  <RowDefinition Height="0.5*"/>
                  <RowDefinition Height="0.5*"/>
                  <RowDefinition Height="0.5*"/>
               </Grid.RowDefinitions>

               <TextBlock Name="TimeTxBl" Grid.Row="0" 
                  Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="TimeTxBx" Grid.Column="1" Grid.Row="0" Width="100"
                  Style="{DynamicResource OmagCut_FixedTextBox}"/>
               <TextBlock Name="CutLenTxBl" Grid.Row="1"
                  Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="CutLenTxBx" Grid.Column="1" Grid.Row="1" Width="100"
                  Style="{DynamicResource OmagCut_FixedTextBox}"/>
               <TextBlock Name="NetAreaTxBl" Grid.Row="2" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="NetAreaTxBx" Grid.Column="1" Grid.Row="2" Width="100"
                  Style="{DynamicResource OmagCut_FixedTextBox}"/>
               <TextBlock Name="UsageTxBl" Grid.Row="3"
                  Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="UsageTxBx" Grid.Column="1" Grid.Row="3" Width="100"
                  Style="{DynamicResource OmagCut_FixedTextBox}"/>

            </Grid>

         </Border>

         <Border Name="AxesBoder" Grid.Row="1" Grid.RowSpan="4" Grid.ColumnSpan="3" Style="{DynamicResource OmagCut_NoNameGroupBorder}"
            Background="{DynamicResource OmagCut_LightGray}">
            <UniformGrid Name="AxesUniformGrid" Rows="12">
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A1Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A1Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A2Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A2Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A3Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A3Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A4Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A4Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A5Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A5Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A6Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A6Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A7Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A7Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A8Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A8Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A9Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A9Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="A10Name" Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                  <EgtWPFLib:EgtTextBox Name="A10Value" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"
                     Width="120" Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="GCodeTxBl" Grid.Column="0" Grid.Row="5" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" TextAlignment="Center" />
                  <TextBlock Name="FValueTxBl" Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Right"
                     VerticalAlignment="Center" TextAlignment="Right" Margin="0,0,20,0" />
               </Grid>
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="1.5*"/>
                     <ColumnDefinition Width="1*"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Name="TNameTxBl" Grid.Column="0" Grid.Row="6" FontSize="20" HorizontalAlignment="Center"
                     VerticalAlignment="Center" Margin="0,0,0,0" TextTrimming="CharacterEllipsis" />
                  <TextBlock Name="SValueTxBl" Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Right"
                     VerticalAlignment="Center" TextAlignment="Right" Margin="0,0,20,0" />
               </Grid>

            </UniformGrid>

         </Border>

         <Button Name="StepBtn" Grid.Column="0" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
            <Image Source="{DynamicResource PlayStepImg}" Width="65" Height="65" HorizontalAlignment="Center"
                VerticalAlignment="Center" />
         </Button>

         <Button Name="PlayPauseBtn" Grid.Column="1" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
            <Image Name="PlayPauseImage" Width="65" Height="65" HorizontalAlignment="Center"
                VerticalAlignment="Center" />
         </Button>

         <Button Name="StopBtn" Grid.Column="2" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
            <Image Source="{DynamicResource StopImg}" Width="65" Height="65" HorizontalAlignment="Center"
                VerticalAlignment="Center" />
         </Button>

         <Slider Name="SpeedSlider" Grid.Row="6" Grid.ColumnSpan="3" Minimum="1"
            Maximum="100" TickPlacement="BottomRight" TickFrequency="10" ValueChanged="SpeedSlider_ValueChanged" Margin="13,4,13,0" />

      </Grid>

      <!-- Definizione della Grid Inferiore per i Button V e X -->
      <Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
         </Grid.ColumnDefinitions>
         <Button Name="GenerateCN_Btn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Click="GenerateXPIUC_Click">
                <Image Source="{DynamicResource GenerateCNImg}" Style="{StaticResource OmagCut_ButtonIcon}" />
         </Button>
         <Button Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Click="ExitBtnUC_Click">
            <Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}" />
         </Button>

      </Grid>

   </Grid>

</UserControl>
