TransporterDebugControl.xaml 15 KB

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