PufStationCommandControl.xaml 6.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <UserControl x:Class="CyberX8_Themes.UserControls.PufStationCommandControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:CyberX8_Themes.UserControls"
  7. xmlns:converters="clr-namespace:CyberX8_Themes.Converters"
  8. mc:Ignorable="d" Name="self"
  9. d:DesignHeight="300" d:DesignWidth="400">
  10. <UserControl.Resources>
  11. <converters:BoolToColor x:Key="boolToColor"/>
  12. </UserControl.Resources>
  13. <Grid>
  14. <GroupBox Header="Commands" Background="{DynamicResource Table_BD_Title}" BorderBrush="DarkGray">
  15. <Grid Margin="10,0">
  16. <Grid.ColumnDefinitions>
  17. <ColumnDefinition></ColumnDefinition>
  18. <ColumnDefinition></ColumnDefinition>
  19. </Grid.ColumnDefinitions>
  20. <Grid.RowDefinitions>
  21. <RowDefinition></RowDefinition>
  22. <RowDefinition></RowDefinition>
  23. <RowDefinition></RowDefinition>
  24. <RowDefinition></RowDefinition>
  25. <RowDefinition></RowDefinition>
  26. <RowDefinition></RowDefinition>
  27. <RowDefinition></RowDefinition>
  28. <RowDefinition></RowDefinition>
  29. <RowDefinition></RowDefinition>
  30. </Grid.RowDefinitions>
  31. <WrapPanel Grid.Row="0" Grid.Column="0" >
  32. <Label Height="40" Content="Vacuum A" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  33. <Ellipse Margin="5,0" Width="16" Height="16" Fill="{Binding ElementName=self, Path=VacuumA, Converter={StaticResource boolToColor}}" Stroke="Silver"/>
  34. </WrapPanel>
  35. <WrapPanel Grid.Row="0" Grid.Column="1" >
  36. <Label Height="40" Content="Vacuum B" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  37. <Ellipse Margin="5,0" Width="16" Height="16" Fill="{Binding ElementName=self, Path=VacuumB, Converter={StaticResource boolToColor}}" Stroke="Silver"/>
  38. </WrapPanel>
  39. <WrapPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
  40. <TextBlock Width="110" Text="{Binding VacuumAValue, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  41. <TextBlock Margin="2,0" Width="60" Text="mmHg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  42. </WrapPanel>
  43. <WrapPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  44. <TextBlock Width="110" Text="{Binding VacuumBValue, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  45. <TextBlock Margin="2,0" Width="60" Text="mmHg" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  46. </WrapPanel>
  47. <WrapPanel Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
  48. <TextBlock Width="172" Text="{Binding ElementName=self,Path=VacuumAStatus}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  49. </WrapPanel>
  50. <WrapPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  51. <TextBlock Width="172" Text="{Binding ElementName=self,Path=VacuumBStatus}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  52. </WrapPanel>
  53. <WrapPanel Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
  54. <CheckBox Content="Vacuum A ON" IsChecked="{Binding ElementName=self,Path=VacuumAChecked,Mode=TwoWay}" Click="VacuumA_Click"></CheckBox>
  55. </WrapPanel>
  56. <WrapPanel Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  57. <CheckBox Content="Vacuum B ON" IsChecked="{Binding ElementName=self,Path=VacuumBChecked,Mode=TwoWay}" Click="VacuumB_Click"></CheckBox>
  58. </WrapPanel>
  59. <Button Style="{StaticResource SysBtnStyle}" Content="All Motors On" Grid.Row="4" Grid.Column="0" Width="120" Height="25" Click="AllMotorOn_Click"></Button>
  60. <Button Style="{StaticResource SysBtnStyle}" Content="All Motors off" Grid.Row="4" Grid.Column="1" Width="120" Height="25" Click="AllMotorOff_Click"></Button>
  61. <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"/>
  62. <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"/>
  63. <Button Style="{StaticResource SysBtnStyle}" Content="Pick" Grid.Row="6" Grid.Column="0" Width="120" Height="25" Click="Pick_Click"></Button>
  64. <ComboBox Height="25" Grid.Row="6" Grid.Column="1" ItemsSource="{Binding ElementName=self,Path= CombomboxItemSource}" SelectedItem="{Binding ElementName=self, Path=PickSelectedItem}">
  65. </ComboBox>
  66. <Button Style="{StaticResource SysBtnStyle}" Content="Place" Grid.Row="7" Grid.Column="0" Width="120" Height="25" Click="Place_Click"></Button>
  67. <ComboBox Height="25" Grid.Row="7" Grid.Column="1" ItemsSource="{Binding ElementName=self, Path=CombomboxItemSource}" SelectedItem="{Binding ElementName=self, Path=PlaceSelectedItem}">
  68. </ComboBox>
  69. <Button Style="{StaticResource SysBtnStyle}" Content="Clear Error" Grid.Row="8" Grid.Column="0" Width="120" Height="25" Click="ClearError_Click"></Button>
  70. <!--<Button Style="{StaticResource SysBtnStyle}" Content="Move To Park" Grid.Row="8" Grid.Column="0" Width="120" Height="25" Click="MoveToPark_Click"></Button>
  71. <Button Style="{StaticResource SysBtnStyle}" Content="Move To Robot" Grid.Row="8" Grid.Column="1" Width="120" Height="25" Click="MoveToRobot_Click"></Button>-->
  72. </Grid>
  73. </GroupBox>
  74. </Grid>
  75. </UserControl>