SRDMoveControl.xaml 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <UserControl x:Class="CyberX8_Themes.UserControls.SRDMoveControl"
  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:converters="clr-namespace:CyberX8_Themes.Converters"
  7. xmlns:local="clr-namespace:CyberX8_Themes.UserControls"
  8. mc:Ignorable="d" x:Name="self"
  9. d:DesignHeight="120" Width="495">
  10. <UserControl.Resources>
  11. <converters:BoolToColor x:Key="boolToColor"/>
  12. <converters:BoolToRedColor x:Key="boolToRedColor"/>
  13. </UserControl.Resources>
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="40"/>
  17. <RowDefinition Height="40"/>
  18. <RowDefinition Height="40"/>
  19. </Grid.RowDefinitions>
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition Width="150"/>
  22. <ColumnDefinition Width="25"/>
  23. <ColumnDefinition Width="125"/>
  24. <ColumnDefinition Width="125"/>
  25. <ColumnDefinition Width="40"/>
  26. <ColumnDefinition/>
  27. </Grid.ColumnDefinitions>
  28. <Grid Grid.Row="0" Grid.Column="0">
  29. <Label Content="Door" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
  30. </Grid>
  31. <Grid Grid.Row="1" Grid.Column="0">
  32. <Label Content="Rotation" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
  33. </Grid>
  34. <Grid Grid.Row="0" Grid.Column="1">
  35. <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" VerticalAlignment="Center" Stroke="Silver"
  36. Fill="{Binding CommonData.DoorClosed, Converter={StaticResource boolToColor}, ElementName=self}"/>
  37. </Grid>
  38. <Grid Grid.Row="0" Grid.Column="4">
  39. <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Left" VerticalAlignment="Center" Stroke="Silver"
  40. Fill="{Binding CommonData.DoorOpened, Converter={StaticResource boolToColor}, ElementName=self}"/>
  41. </Grid>
  42. <Grid Grid.Row="0" Grid.Column="2">
  43. <Grid.RowDefinitions>
  44. <RowDefinition Height="5*"/>
  45. <RowDefinition/>
  46. <RowDefinition Height="4*"/>
  47. </Grid.RowDefinitions>
  48. <Button Style="{StaticResource SysBtnStyle}" Margin="0,8,0,7" Height="25" Width="100" HorizontalAlignment="Center" Content="Closed" Click="Closed_Click" Grid.RowSpan="3"/>
  49. </Grid>
  50. <Grid Grid.Row="0" Grid.Column="3">
  51. <Button Style="{StaticResource SysBtnStyle}" Margin="10,0,10,0" Grid.Column="1" Height="25" Width="100" HorizontalAlignment="Center" Content="Open" Click="Open_Click"></Button>
  52. </Grid>
  53. <Grid Grid.Row="1" Grid.Column="2">
  54. <Grid.ColumnDefinitions>
  55. <ColumnDefinition Width="79*"/>
  56. <ColumnDefinition Width="46*"/>
  57. </Grid.ColumnDefinitions>
  58. <Button Style="{StaticResource SysBtnStyle}" Margin="12,8,0,8" Height="25" Width="100" HorizontalAlignment="Left" Content="Start" Click="Start_Click" Grid.ColumnSpan="2"/>
  59. </Grid>
  60. <Grid Grid.Row="1" Grid.Column="3">
  61. <Button Style="{StaticResource SysBtnStyle}" Margin="10,0,10,0" Grid.Column="1" Height="25" Width="100" HorizontalAlignment="Center" Content="Stop" Click="Stop_Click"></Button>
  62. </Grid>
  63. <Grid Grid.Row="2" Grid.Column="2">
  64. <Grid.ColumnDefinitions>
  65. <ColumnDefinition Width="65"></ColumnDefinition>
  66. <ColumnDefinition Width="65"></ColumnDefinition>
  67. </Grid.ColumnDefinitions>
  68. <TextBox Grid.Column="0" Text="{Binding ElementName=self,Path=InputRotationTime,Mode=TwoWay}" Width="50" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16" Height="22" />
  69. <TextBox IsEnabled="False" Grid.Column="1" Text="sec" Width="45" FontWeight="Bold" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="15" Height="22"/>
  70. </Grid>
  71. <Grid Grid.Row="2" Grid.Column="3">
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition Width="65"></ColumnDefinition>
  74. <ColumnDefinition Width="65"></ColumnDefinition>
  75. </Grid.ColumnDefinitions>
  76. <TextBox Grid.Column="0" Text="{Binding ElementName=self,Path=InputRotationSpeed,Mode=TwoWay}" Width="50" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16" Height="22" />
  77. <TextBox IsEnabled="False" Grid.Column="1" Text="rpm" Width="45" FontWeight="Bold" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="15" Height="22" />
  78. </Grid>
  79. </Grid>
  80. </UserControl>