PufMotionCommandControl.xaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <UserControl x:Class="CyberX8_Themes.UserControls.PufMotionCommandControl"
  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="200" d:DesignWidth="260">
  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. </Grid.RowDefinitions>
  27. <WrapPanel Grid.Row="0" Grid.Column="0" >
  28. <Label Height="40" Content="Vacuum A" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  29. <Ellipse Margin="5,0" Width="16" Height="16" Fill="{Binding ElementName=self, Path=VacuumA, Converter={StaticResource boolToColor}}" Stroke="Silver"/>
  30. </WrapPanel>
  31. <WrapPanel Grid.Row="0" Grid.Column="1" >
  32. <Label Height="40" Content="Vacuum B" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  33. <Ellipse Margin="5,0" Width="16" Height="16" Fill="{Binding ElementName=self, Path=VacuumB, Converter={StaticResource boolToColor}}" Stroke="Silver"/>
  34. </WrapPanel>
  35. <WrapPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
  36. <TextBlock Width="110" Text="{Binding VacuumAValue, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  37. </WrapPanel>
  38. <WrapPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  39. <TextBlock Width="110" Text="{Binding VacuumBValue, ElementName=self, StringFormat=\{0:F2\},Mode=TwoWay}" Background="Black" Foreground="Lime" FontSize="16" FontWeight="Bold"/>
  40. </WrapPanel>
  41. <WrapPanel Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,5,0">
  42. <CheckBox Content="Vacuum A ON" IsChecked="{Binding ElementName=self,Path=VacuumAChecked}" Click="VacuumA_Click"></CheckBox>
  43. </WrapPanel>
  44. <WrapPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,5,0">
  45. <CheckBox Content="Vacuum B ON" IsChecked="{Binding ElementName=self,Path=VacuumBChecked}" Click="VacuumB_Click"></CheckBox>
  46. </WrapPanel>
  47. <Button Style="{StaticResource SysBtnStyle}" Content="All Motors On" Grid.Row="3" Grid.Column="0" Width="100" Height="25" Click="AllMotorOn_Click"></Button>
  48. <Button Style="{StaticResource SysBtnStyle}" Content="All Motors off" Grid.Row="3" Grid.Column="1" Width="100" Height="25" Click="AllMotorOff_Click"></Button>
  49. <Button Style="{StaticResource SysBtnStyle}" Content="Home PUF" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Width="100" Height="25" Click="HomePuf_Click"></Button>
  50. </Grid>
  51. </GroupBox>
  52. </Grid>
  53. </UserControl>