TransporterDebugControl.xaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. <Grid.ColumnDefinitions>
  46. <ColumnDefinition Width="43*"/>
  47. <ColumnDefinition Width="245*"/>
  48. </Grid.ColumnDefinitions>
  49. <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,0,0,0"></Label>
  50. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Retract1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="10,21,0,21"/>
  51. <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,0,0,0" Grid.ColumnSpan="2"></Label>
  52. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Retract2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="40,21,0,21" Grid.ColumnSpan="2"/>
  53. <Button Style="{StaticResource SysBtnStyle}" Content="Retract" Width="70" Height="30" HorizontalAlignment="Left" Click="Retract_Click" Margin="27,14,0,14" Grid.Column="1"/>
  54. <Button Style="{StaticResource SysBtnStyle}" Content="Extend" Width="70" Height="30" HorizontalAlignment="Left" Click="Extend_Click" Margin="107,14,0,14" Grid.Column="1"/>
  55. <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="187,0,0,0" Grid.Column="1"></Label>
  56. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Extend1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="187,21,0,21" Grid.Column="1"/>
  57. <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="217,0,0,0" Grid.Column="1"></Label>
  58. <Ellipse Width="16" Height="16" Fill="{Binding ElementName=self,Path=Extend2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="217,21,0,21" Grid.Column="1"/>
  59. </Grid>
  60. </GroupBox>-->
  61. </Grid>
  62. <Grid Grid.Column="1">
  63. <Grid>
  64. <Grid.RowDefinitions>
  65. <RowDefinition/>
  66. <RowDefinition Height="120"></RowDefinition>
  67. </Grid.RowDefinitions>
  68. <GroupBox Grid.Row="0">
  69. <Grid>
  70. <Grid.RowDefinitions>
  71. <RowDefinition Height="20"></RowDefinition>
  72. <RowDefinition Height="30"></RowDefinition>
  73. <RowDefinition Height="30"></RowDefinition>
  74. <RowDefinition Height="20"></RowDefinition>
  75. <RowDefinition Height="30"></RowDefinition>
  76. <RowDefinition Height="30"></RowDefinition>
  77. <RowDefinition Height="30"></RowDefinition>
  78. <RowDefinition/>
  79. </Grid.RowDefinitions>
  80. <Label Content="1" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="160,4,0,0"></Label>
  81. <Label Content="2" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="200,4,0,0"></Label>
  82. <!--<Label Content="Ready To Lock" Grid.Row="1" VerticalAlignment="Center"></Label>
  83. <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"/>
  84. <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"/>-->
  85. <Label Content="WS Present" Grid.Row="2" VerticalAlignment="Center"></Label>
  86. <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"/>
  87. <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"/>
  88. <Label Content="Gantry" Grid.Row="3" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="146,0,0,0"></Label>
  89. <Label Content="Elevator" Grid.Row="3" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="190,0,0,0"></Label>
  90. <Label Content="Motor" Grid.Row="4" VerticalAlignment="Center"></Label>
  91. <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"/>
  92. <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"/>
  93. <Label Content="Homed" Grid.Row="5" VerticalAlignment="Center"></Label>
  94. <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"/>
  95. <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"/>
  96. <Label Content="Moving" Grid.Row="6" VerticalAlignment="Center"></Label>
  97. <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"/>
  98. <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"/>
  99. </Grid>
  100. </GroupBox>
  101. <GroupBox Grid.Row="1">
  102. <Grid>
  103. <Grid.RowDefinitions>
  104. <RowDefinition/>
  105. <RowDefinition/>
  106. </Grid.RowDefinitions>
  107. <Label Grid.Row="0" Content="Barcode" VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0"></Label>
  108. <TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="18" Width="140" Background="Black" Foreground="Lime"
  109. Text="{Binding ElementName=self,Path=Barcode}" Margin="80,0,0,0"/>
  110. <Button Grid.Row="1" Style="{StaticResource SysBtnStyle}" Content="Read Barcode" Width="90" Height="30" HorizontalAlignment="Left"
  111. Click="ReadBarcode_Click" Margin="20,14,0,14"/>
  112. <Button Grid.Row="1" Style="{StaticResource SysBtnStyle}" Content="Tune Reader" Width="90" Height="30" HorizontalAlignment="Right"
  113. Click="TuneReader_Click" Margin="0,14,20,14"/>
  114. </Grid>
  115. </GroupBox>
  116. </Grid>
  117. </Grid>
  118. <Grid Grid.Column="2">
  119. <Grid>
  120. <Grid.RowDefinitions>
  121. <RowDefinition/>
  122. <RowDefinition Height="120"></RowDefinition>
  123. </Grid.RowDefinitions>
  124. <GroupBox>
  125. <Grid Grid.Row="0">
  126. <Grid.RowDefinitions>
  127. <RowDefinition/>
  128. <RowDefinition/>
  129. <RowDefinition/>
  130. <RowDefinition/>
  131. </Grid.RowDefinitions>
  132. <Label Content="From" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="105,0,0,0"/>
  133. <ComboBox Height="25" Width="165" ItemsSource="{Binding ElementName=self,Path=PositionList}" SelectedItem="{Binding ElementName=self,Path=FromSelectedItem,Mode=TwoWay}"
  134. Margin="142,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  135. <Button Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource SysBtnStyle}" Content="Transfer" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  136. Click="Transfer_Click" Margin="10,0,0,0"/>
  137. <Label Content="To" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="105,0,0,0"></Label>
  138. <ComboBox Height="25" Grid.Row="1" Width="165" ItemsSource="{Binding ElementName=self,Path=PositionList}" SelectedItem="{Binding ElementName=self,Path=ToSelectedItem,Mode=TwoWay}"
  139. Margin="142,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  140. <Button Grid.Row="2" Style="{StaticResource SysBtnStyle}" Content="Pick Up From" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  141. Click="PickUpFrom_Click" Margin="10,0,0,0"/>
  142. <Button Grid.Row="2" Style="{StaticResource SysBtnStyle}" Content="Put Down To" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  143. Click="PutDownTo_Click" Margin="110,0,0,0"/>
  144. <Button Grid.Row="2" Style="{StaticResource SysBtnStyle}" Content="Move To" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  145. Click="MoveTo_Click" Margin="220,0,0,0"/>
  146. <Button Grid.Row="3" Style="{StaticResource SysBtnStyle}" Content="Home" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  147. Margin="10,0,0,0" IsEnabled="True" Click="Home_Click"/>
  148. <Button Grid.Row="3" Style="{StaticResource SysBtnStyle}" Content="Elevator Up" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  149. Click="ElevatorUp_Click" Margin="110,0,0,0"/>
  150. <Button Grid.Row="3" Style="{StaticResource SysBtnStyle}" Content="Park" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center"
  151. Click="Park_Click" Margin="220,0,0,0"/>
  152. </Grid>
  153. </GroupBox>
  154. <GroupBox Grid.Row="1">
  155. <Grid>
  156. <Button Style="{StaticResource SysBtnStyle}" Content="Switch On" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top"
  157. Margin="15,22,0,0" Click="SwitchOn_Click"/>
  158. <Button Style="{StaticResource SysBtnStyle}" Content="Switch Off" Width="90" Height="30" HorizontalAlignment="Center" VerticalAlignment="Top"
  159. Margin="0,22,0,0" Click="SwitchOff_Click"/>
  160. <Button Style="{StaticResource SysBtnStyle}" Content="Abort" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top"
  161. Margin="218,22,0,0" Click="Abort_Click"/>
  162. <Button Style="{StaticResource SysBtnStyle}" Content="Clear Error" Width="90" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top"
  163. Margin="15,67,0,0" Click="ClearError_Click"/>
  164. </Grid>
  165. </GroupBox>
  166. </Grid>
  167. </Grid>
  168. </Grid>
  169. </GroupBox>
  170. </Grid>
  171. </UserControl>