<UserControl x:Class="CyberX8_Themes.UserControls.PufStationCommandControl"
             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:CyberX8_Themes.UserControls"
             xmlns:converters="clr-namespace:CyberX8_Themes.Converters"
             mc:Ignorable="d" Name="self"
             d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <converters:BoolToColor x:Key="boolToColor"/>
    </UserControl.Resources>
    <Grid>
        <GroupBox Header="Commands"  Background="{DynamicResource Table_BD_Title}" BorderBrush="DarkGray">
            <Grid Margin="10,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <WrapPanel Grid.Row="0" Grid.Column="0" >
                    <Label Height="40" Content="Vacuum A" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                    <Ellipse Margin="5,0"  Width="16" Height="16"  Fill="{Binding ElementName=self, Path=VacuumA, Converter={StaticResource boolToColor}}"   Stroke="Silver"/>
                </WrapPanel>
                <WrapPanel Grid.Row="0" Grid.Column="1" >
                    <Label Height="40" Content="Vacuum B" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                    <Ellipse Margin="5,0"  Width="16" Height="16"  Fill="{Binding ElementName=self, Path=VacuumB, Converter={StaticResource boolToColor}}"   Stroke="Silver"/>
                </WrapPanel>
                <WrapPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
                    <TextBlock Width="110" Text="{Binding VacuumAValue, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                    <TextBlock Margin="2,0" Width="60" Text="mmHg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                </WrapPanel>
                <WrapPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
                    <TextBlock Width="110" Text="{Binding VacuumBValue, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                    <TextBlock Margin="2,0" Width="60" Text="mmHg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                </WrapPanel>
                <WrapPanel Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
                    <TextBlock  Width="172" Text="{Binding ElementName=self,Path=VacuumAStatus}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                </WrapPanel>
                <WrapPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
                    <TextBlock  Width="172" Text="{Binding ElementName=self,Path=VacuumBStatus}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
                </WrapPanel>
                <WrapPanel Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
                    <CheckBox Content="Vacuum A ON" IsChecked="{Binding ElementName=self,Path=VacuumAChecked,Mode=TwoWay}" Click="VacuumA_Click"></CheckBox>
                </WrapPanel>
                <WrapPanel Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
                    <CheckBox Content="Vacuum B ON" IsChecked="{Binding ElementName=self,Path=VacuumBChecked,Mode=TwoWay}" Click="VacuumB_Click"></CheckBox>
                </WrapPanel>
                <Button Style="{StaticResource SysBtnStyle}" Content="All Motors On" Grid.Row="4" Grid.Column="0" Width="120" Height="25" Click="AllMotorOn_Click"></Button>
                <Button Style="{StaticResource SysBtnStyle}" Content="All Motors off" Grid.Row="4" Grid.Column="1" Width="120" Height="25" Click="AllMotorOff_Click"></Button>
                <Button Style="{StaticResource SysBtnStyle}" Content="Home PUF" Grid.Row="4" Grid.Column="0" Width="120" Height="25" Click="HomePuf_Click" Margin="32,31,32,6" Grid.RowSpan="2"/>
                <Button Style="{StaticResource SysBtnStyle}" Content="Abort" Grid.Row="4" Grid.Column="1" Width="120" Height="25" Click="Abort_Click" Margin="32,31,32,6" Grid.RowSpan="2"/>

                <Button Style="{StaticResource SysBtnStyle}" Content="Pick" Grid.Row="6" Grid.Column="0" Width="120" Height="25" Click="Pick_Click"></Button>
                <ComboBox Height="25" Grid.Row="6" Grid.Column="1" ItemsSource="{Binding ElementName=self,Path= PickCombomboxItemSource}" SelectedItem="{Binding ElementName=self, Path=PickSelectedItem}">
                </ComboBox>
                <Button Style="{StaticResource SysBtnStyle}" Content="Place" Grid.Row="7" Grid.Column="0" Width="120" Height="25" Click="Place_Click"></Button>
                <ComboBox Height="25" Grid.Row="7" Grid.Column="1" ItemsSource="{Binding ElementName=self, Path=PlaceCombomboxItemSource}" SelectedItem="{Binding ElementName=self, Path=PlaceSelectedItem}">
                </ComboBox>
                <Button Style="{StaticResource SysBtnStyle}" Content="Clear Error" Grid.Row="8" Grid.Column="0" Width="120" Height="25" Click="ClearError_Click"></Button>

                <!--<Button Style="{StaticResource SysBtnStyle}" Content="Move To Park" Grid.Row="8" Grid.Column="0" Width="120" Height="25" Click="MoveToPark_Click"></Button>
                <Button Style="{StaticResource SysBtnStyle}" Content="Move To Robot" Grid.Row="8" Grid.Column="1" Width="120" Height="25" Click="MoveToRobot_Click"></Button>-->
            </Grid>
        </GroupBox>
    </Grid>

</UserControl>