TransporterDebugControl.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <UserControl x:Class="CyberX8_Themes.UserControls.TransporterDebugControl"
  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="350" d:DesignWidth="900">
  10. <UserControl.Resources>
  11. <converters:BoolToColor x:Key="boolToColor"></converters:BoolToColor>
  12. <converters:BoolToBool x:Key="boolToBool"></converters:BoolToBool>
  13. </UserControl.Resources>
  14. <Grid>
  15. <GroupBox Header="{Binding ElementName=self,Path=ModuleTitle}" Grid.Row="1" Grid.Column="1">
  16. <Grid>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="300"></ColumnDefinition>
  19. <ColumnDefinition Width="260"></ColumnDefinition>
  20. <ColumnDefinition Width="330"></ColumnDefinition>
  21. </Grid.ColumnDefinitions>
  22. <Grid Grid.Column="0">
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="80"></RowDefinition>
  25. <RowDefinition Height="80"></RowDefinition>
  26. <RowDefinition/>
  27. <RowDefinition Height="80"></RowDefinition>
  28. </Grid.RowDefinitions>
  29. <GroupBox Header="Lock Unlock" Grid.Row="0">
  30. <Grid>
  31. <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,0,0,0"></Label>
  32. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Lock1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="10,14,0,14"/>
  33. <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,0,0,0"></Label>
  34. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Lock2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="40,14,0,14"/>
  35. <Button Style="{StaticResource SysBtnStyle}" Content="Lock" Width="70" Height="30" HorizontalAlignment="Left" Click="Lock_Click" Margin="70,14,0,14"/>
  36. <Button Style="{StaticResource SysBtnStyle}" Content="Unlock" Width="70" Height="30" HorizontalAlignment="Left" Click="Unlock_Click" Margin="150,14,0,14"/>
  37. <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="230,0,0,0"></Label>
  38. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Unlock1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="230,14,0,14"/>
  39. <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="260,0,0,0"></Label>
  40. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Unlock2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="260,14,0,14"/>
  41. </Grid>
  42. </GroupBox>
  43. <GroupBox Header="Immobilize" Grid.Row="1">
  44. <Grid>
  45. <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,0,0,0"></Label>
  46. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Retract1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="10,14,0,14"/>
  47. <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,0,0,0"></Label>
  48. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Retract2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="40,14,0,14"/>
  49. <Button Style="{StaticResource SysBtnStyle}" Content="Retract" Width="70" Height="30" HorizontalAlignment="Left" Click="Retract_Click" Margin="70,14,0,14"/>
  50. <Button Style="{StaticResource SysBtnStyle}" Content="Extend" Width="70" Height="30" HorizontalAlignment="Left" Click="Extend_Click" Margin="150,14,0,14"/>
  51. <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="230,0,0,0"></Label>
  52. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Extend1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="230,14,0,14"/>
  53. <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="260,0,0,0"></Label>
  54. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Extend2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="260,14,0,14"/>
  55. </Grid>
  56. </GroupBox>
  57. </Grid>
  58. <Grid Grid.Column="1">
  59. <Grid>
  60. <Grid.RowDefinitions>
  61. <RowDefinition/>
  62. <RowDefinition Height="120"></RowDefinition>
  63. </Grid.RowDefinitions>
  64. <GroupBox Grid.Row="0">
  65. <Grid>
  66. <Grid.RowDefinitions>
  67. <RowDefinition Height="20"></RowDefinition>
  68. <RowDefinition Height="30"></RowDefinition>
  69. <RowDefinition Height="30"></RowDefinition>
  70. <RowDefinition Height="20"></RowDefinition>
  71. <RowDefinition Height="30"></RowDefinition>
  72. <RowDefinition Height="30"></RowDefinition>
  73. <RowDefinition Height="30"></RowDefinition>
  74. <RowDefinition/>
  75. </Grid.RowDefinitions>
  76. <Label Content="1" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="160,4,0,0"></Label>
  77. <Label Content="2" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="200,4,0,0"></Label>
  78. <Label Content="Ready To Lock" Grid.Row="1" VerticalAlignment="Center"></Label>
  79. <Ellipse Grid.Row="1" Width="16" Height="16" Fill="{Binding ElementName=self,Path=ReadyToLock1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="160,0,0,0"/>
  80. <Ellipse Grid.Row="1" Width="16" Height="16" Fill="{Binding ElementName=self,Path=ReadyToLock2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="200,0,0,0"/>
  81. <Label Content="WS Present" Grid.Row="2" VerticalAlignment="Center"></Label>
  82. <Ellipse Grid.Row="2" Width="16" Height="16" Fill="{Binding ElementName=self,Path=WHPresent1,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="160,0,0,0"/>
  83. <Ellipse Grid.Row="2" Width="16" Height="16" Fill="{Binding ElementName=self,Path=WHPresent2,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="200,0,0,0"/>
  84. <Label Content="Gantry" Grid.Row="3" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="146,0,0,0"></Label>
  85. <Label Content="Elevator" Grid.Row="3" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="190,0,0,0"></Label>
  86. <Label Content="Motor" Grid.Row="4" VerticalAlignment="Center"></Label>
  87. <Ellipse Grid.Row="4" Width="16" Height="16" Fill="{Binding ElementName=self,Path=GantryMotorOn,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="160,0,0,0"/>
  88. <Ellipse Grid.Row="4" Width="16" Height="16" Fill="{Binding ElementName=self,Path=ElevatorMotorOn,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="200,0,0,0"/>
  89. <Label Content="Homed" Grid.Row="5" VerticalAlignment="Center"></Label>
  90. <Ellipse Grid.Row="5" Width="16" Height="16" Fill="{Binding ElementName=self,Path=GantryHomed,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="160,0,0,0"/>
  91. <Ellipse Grid.Row="5" Width="16" Height="16" Fill="{Binding ElementName=self,Path=ElevatorHomed,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="200,0,0,0"/>
  92. <Label Content="Moving" Grid.Row="6" VerticalAlignment="Center"></Label>
  93. <Ellipse Grid.Row="6" Width="16" Height="16" Fill="{Binding ElementName=self,Path=GantryMoving,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="160,0,0,0"/>
  94. <Ellipse Grid.Row="6" Width="16" Height="16" Fill="{Binding ElementName=self,Path=ElevatorMoving,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="200,0,0,0"/>
  95. </Grid>
  96. </GroupBox>
  97. <GroupBox Grid.Row="1">
  98. <Grid>
  99. <Grid.RowDefinitions>
  100. <RowDefinition/>
  101. <RowDefinition/>
  102. </Grid.RowDefinitions>
  103. <Label Grid.Row="0" Content="Barcode" VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0"></Label>
  104. <TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="18" Width="140" Background="Black" Foreground="Lime"
  105. Text="{Binding ElementName=self,Path=Barcode}" Margin="80,0,0,0"/>
  106. <Button Grid.Row="1" Style="{StaticResource SysBtnStyle}" Content="Read Barcode" Width="90" Height="30" HorizontalAlignment="Left"
  107. Click="ReadBarcode_Click" Margin="20,14,0,14"/>
  108. <Button Grid.Row="1" Style="{StaticResource SysBtnStyle}" Content="Tune Reader" Width="90" Height="30" HorizontalAlignment="Right"
  109. Click="TuneReader_Click" Margin="0,14,20,14"/>
  110. </Grid>
  111. </GroupBox>
  112. </Grid>
  113. </Grid>
  114. <Grid Grid.Column="2">
  115. <Grid>
  116. <Grid.RowDefinitions>
  117. <RowDefinition/>
  118. <RowDefinition Height="120"></RowDefinition>
  119. </Grid.RowDefinitions>
  120. <GroupBox>
  121. <Grid Grid.Row="0">
  122. <Grid.RowDefinitions>
  123. <RowDefinition/>
  124. <RowDefinition/>
  125. <RowDefinition/>
  126. <RowDefinition/>
  127. </Grid.RowDefinitions>
  128. <Label Content="From" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="105,0,0,0"/>
  129. <ComboBox Height="25" Width="165" ItemsSource="{Binding ElementName=self,Path=PositionList}" SelectedItem="{Binding ElementName=self,Path=FromSelectedItem,Mode=TwoWay}"
  130. Margin="142,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  131. <Button Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource SysBtnStyle}" Content="Transfer" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  132. Click="Transfer_Click" Margin="10,0,0,0"/>
  133. <Label Content="To" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="105,0,0,0"></Label>
  134. <ComboBox Height="25" Grid.Row="1" Width="165" ItemsSource="{Binding ElementName=self,Path=PositionList}" SelectedItem="{Binding ElementName=self,Path=ToSelectedItem,Mode=TwoWay}"
  135. Margin="142,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  136. <Button Grid.Row="2" Style="{StaticResource SysBtnStyle}" Content="Pick Up From" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  137. Click="PickUpFrom_Click" Margin="10,0,0,0"/>
  138. <Button Grid.Row="2" Style="{StaticResource SysBtnStyle}" Content="Put Down To" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  139. Click="PutDownTo_Click" Margin="110,0,0,0"/>
  140. <Button Grid.Row="2" Style="{StaticResource SysBtnStyle}" Content="Move To" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  141. Click="MoveTo_Click" Margin="220,0,0,0"/>
  142. <Button Grid.Row="3" Style="{StaticResource SysBtnStyle}" Content="Home" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  143. Margin="10,0,0,0" IsEnabled="True" Click="Home_Click"/>
  144. <Button Grid.Row="3" Style="{StaticResource SysBtnStyle}" Content="Elevator Up" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  145. Click="ElevatorUp_Click" Margin="110,0,0,0"/>
  146. <Button Grid.Row="3" Style="{StaticResource SysBtnStyle}" Content="Park" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  147. Click="Park_Click" Margin="220,0,0,0"/>
  148. </Grid>
  149. </GroupBox>
  150. <GroupBox Grid.Row="1">
  151. <Grid>
  152. <Button Style="{StaticResource SysBtnStyle}" Content="Switch On" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top"
  153. Margin="15,22,0,0" Click="SwitchOn_Click"/>
  154. <Button Style="{StaticResource SysBtnStyle}" Content="Switch Off" Width="90" Height="30" HorizontalAlignment="Center" VerticalAlignment="Top"
  155. Margin="0,22,0,0" Click="SwitchOff_Click"/>
  156. <Button Style="{StaticResource SysBtnStyle}" Content="Abort" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top"
  157. Margin="218,22,0,0" Click="Abort_Click"/>
  158. <Button Style="{StaticResource SysBtnStyle}" Content="Clear Error" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top"
  159. Margin="15,67,0,0" Click="ClearError_Click"/>
  160. </Grid>
  161. </GroupBox>
  162. </Grid>
  163. </Grid>
  164. </Grid>
  165. </GroupBox>
  166. </Grid>
  167. </UserControl>