终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

308 lines
15 KiB

  1. <UserControl x:Class="BPASmartClient.MorkT.View.DebugView"
  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:vm ="clr-namespace:BPASmartClient.MorkT.ViewModel"
  7. mc:Ignorable="d"
  8. Name="调试界面"
  9. d:DesignHeight="500" d:DesignWidth="1000" Unloaded="Dubug_Unloaded">
  10. <UserControl.DataContext>
  11. <vm:DebugViewModel/>
  12. </UserControl.DataContext>
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <ResourceDictionary.MergedDictionaries>
  16. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  18. </ResourceDictionary.MergedDictionaries>
  19. </ResourceDictionary>
  20. </UserControl.Resources>
  21. <Grid>
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="10*"/>
  24. <ColumnDefinition Width="10*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="14*"/>
  28. <RowDefinition Height="0.1*"/>
  29. <RowDefinition Height="20*"/>
  30. </Grid.RowDefinitions>
  31. <GroupBox Grid.ColumnSpan="2"
  32. FontFamily="楷体"
  33. FontSize="20"
  34. Header=" 乐白机器人 ">
  35. <Grid Margin="10">
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="*"/>
  38. <RowDefinition Height="*"/>
  39. <RowDefinition Height="3*"/>
  40. </Grid.RowDefinitions>
  41. <StackPanel Orientation="Horizontal">
  42. <TextBlock Text="连接状态" />
  43. <TextBlock Text="{Binding RobotConnected}"
  44. Margin="40,0"/>
  45. <TextBlock Text="机器人模式:"/>
  46. <TextBlock Text="{Binding RobotMode}"
  47. Margin="40,0"/>
  48. </StackPanel>
  49. <TextBlock Text="连接状态" />
  50. <TextBlock Text="{Binding RobotConnected}"
  51. Margin="120,0,0,0"/>
  52. <TextBlock Text="乐白机器人控制"
  53. Grid.Row="1"
  54. VerticalAlignment="Center" HorizontalAlignment="Center"/>
  55. <ListBox Grid.Row="2" Background="Transparent">
  56. <ListBox.Template>
  57. <ControlTemplate TargetType="{x:Type ListBox}">
  58. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  59. <WrapPanel Orientation="Horizontal" IsItemsHost="True" ScrollViewer.CanContentScroll="True"/>
  60. </ScrollViewer>
  61. </ControlTemplate>
  62. </ListBox.Template>
  63. <Button Content="机器人启动"
  64. Margin="20,5" Width="150" Height="60"
  65. Command="{Binding Button_RobotControlCommand}"
  66. CommandParameter="机器人启动" Cursor="Hand">
  67. </Button>
  68. <Button Content="启动示教"
  69. Margin="20,5" Width="150" Height="60"
  70. Command="{Binding Button_RobotControlCommand}"
  71. CommandParameter="启动示教"/>
  72. <Button Content="停止示教"
  73. Margin="20,5" Width="150" Height="60"
  74. Command="{Binding Button_RobotControlCommand}"
  75. CommandParameter="停止示教"/>
  76. <Button Content="机器人急停"
  77. Margin="20,5" Width="110" Height="60"
  78. Command="{Binding Button_RobotControlCommand}"
  79. CommandParameter="机器人急停"/>
  80. </ListBox>
  81. </Grid>
  82. </GroupBox>
  83. <!--<GroupBox Grid.Row="2"
  84. FontFamily="楷体"
  85. FontSize="20"
  86. Header=" 冰淇淋机器 ">
  87. <Grid>
  88. <Grid.RowDefinitions>
  89. <RowDefinition Height="30"/>
  90. <RowDefinition />
  91. <RowDefinition />
  92. </Grid.RowDefinitions>
  93. <TextBlock Text="连接状态" />
  94. <TextBlock Text="{Binding IceCreamConnected}"
  95. Margin="120,0,0,0"/>
  96. <Grid Grid.Row="1">
  97. <Grid.RowDefinitions>
  98. <RowDefinition />
  99. <RowDefinition />
  100. <RowDefinition />
  101. <RowDefinition />
  102. </Grid.RowDefinitions>
  103. <Grid.ColumnDefinitions>
  104. <ColumnDefinition Width="100" />
  105. <ColumnDefinition Width="80" />
  106. <ColumnDefinition Width="120" />
  107. <ColumnDefinition Width="100" />
  108. </Grid.ColumnDefinitions>
  109. <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
  110. <TextBlock
  111. Grid.Row="0"
  112. Grid.Column="1"
  113. Text="{Binding YLWD}" />
  114. <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
  115. <TextBlock
  116. Grid.Row="0"
  117. Grid.Column="3"
  118. Text="{Binding HQWD}" />
  119. <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
  120. <TextBlock
  121. Grid.Row="1"
  122. Grid.Column="1"
  123. Text="{Binding HJWD}" />
  124. <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
  125. <TextBlock
  126. Grid.Row="1"
  127. Grid.Column="3"
  128. Text="{Binding CurrentMode}" />
  129. <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
  130. <TextBlock
  131. Grid.Row="2"
  132. Grid.Column="1"
  133. Text="{Binding DL}" />
  134. <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
  135. <TextBlock
  136. Grid.Row="2"
  137. Grid.Column="3"
  138. Text="{Binding DY}" />
  139. <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
  140. <TextBlock
  141. Grid.Row="3"
  142. Grid.Column="1"
  143. Text="{Binding CXB}" />
  144. <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
  145. <TextBlock
  146. Grid.Row="3"
  147. Grid.Column="3"
  148. Text="{Binding IceCreamFault}" />
  149. </Grid>
  150. <StackPanel Grid.Row="2" Orientation="Vertical">
  151. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  152. <TextBlock>冰淇淋</TextBlock>
  153. <Button Command="{Binding Button_MakeIceCreamCommand}"
  154. Margin="20,0"
  155. Content="制作" />
  156. </StackPanel>
  157. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  158. <TextBlock>模式</TextBlock>
  159. <ComboBox Width="100"
  160. Margin="20,0"
  161. ItemsSource="{Binding IceCreamModes}"
  162. SelectedItem="{Binding SelecteIceCreamdMode}" />
  163. <Button Command="{Binding Button_SetIceCreamModelCommand}"
  164. Margin="20,0"
  165. Content="设置" />
  166. </StackPanel>
  167. </StackPanel>
  168. </Grid>
  169. </GroupBox>-->
  170. <GroupBox Grid.Row="2" Grid.Column="0"
  171. FontSize="20" FontFamily="楷体"
  172. Header="单片机冰淇淋" >
  173. <Grid>
  174. <Grid.RowDefinitions>
  175. <RowDefinition Height="*"/>
  176. <RowDefinition Height="*"/>
  177. <RowDefinition Height="5*"/>
  178. </Grid.RowDefinitions>
  179. <TextBlock Text="连接状态" />
  180. <TextBlock Text="{Binding SCChipIsConnect}"
  181. Margin="120,0,0,0"/>
  182. <TextBlock Grid.Row="1" Text="单片机控制" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  183. <ListBox Grid.Row="2" Background="Transparent">
  184. <ListBox.Template>
  185. <ControlTemplate TargetType="{x:Type ListBox}">
  186. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  187. <WrapPanel Orientation="Horizontal" IsItemsHost="True" ScrollViewer.CanContentScroll="True"/>
  188. </ScrollViewer>
  189. </ControlTemplate>
  190. </ListBox.Template>
  191. <Button Content="咖啡杯落杯" Height="40" Width="120"
  192. Command="{Binding Button_CupControlCommand}"
  193. CommandParameter="CUP_COFFEE"
  194. Margin="10,10,50,10" Cursor="Hand"/>
  195. <Button Content="冰淇淋杯落杯" Height="40" Width="120"
  196. Command="{Binding Button_CupControlCommand}"
  197. CommandParameter="CUP_ICECREAM" Margin="10,10,50,10"
  198. />
  199. <Button Content="单片机冰淇淋制冷" Height="40" Width="120"
  200. Command="{Binding Button_SCChipRefrigerationCommand}" Cursor="Hand"
  201. Margin="10,10,50,10"
  202. />
  203. <Button Content="单片机冰淇淋打料" Height="40" Width="120" Margin="10,10,50,10"
  204. Command="{Binding Button_SCChipDischargeCommand}" Cursor="Hand" />
  205. <Button Content="单片机冰淇淋模拟" Height="40" Width="120"
  206. Command="{Binding Button_SCChipTestCommand}" Cursor="Hand"
  207. Margin="10,10,50,10"/>
  208. </ListBox>
  209. </Grid>
  210. </GroupBox>
  211. <GroupBox Grid.Row="2" Grid.Column="1"
  212. FontFamily="楷体"
  213. FontSize="20"
  214. Header=" 咖啡机">
  215. <Grid>
  216. <Grid.RowDefinitions>
  217. <RowDefinition Height="30"/>
  218. <RowDefinition />
  219. <RowDefinition />
  220. </Grid.RowDefinitions>
  221. <TextBlock Text="连接状态" />
  222. <TextBlock Text="{Binding CoffeeConnected}"
  223. Margin="120,0,0,0"/>
  224. <Grid Grid.Row="1">
  225. <Grid.Resources>
  226. <Style TargetType="TextBlock">
  227. <Setter Property="HorizontalAlignment" Value="Left" />
  228. <Setter Property="VerticalAlignment" Value="Center" />
  229. </Style>
  230. </Grid.Resources>
  231. <Grid.RowDefinitions>
  232. <RowDefinition />
  233. <RowDefinition />
  234. </Grid.RowDefinitions>
  235. <Grid.ColumnDefinitions>
  236. <ColumnDefinition Width="99" />
  237. <ColumnDefinition Width="140" />
  238. <ColumnDefinition Width="100" />
  239. <ColumnDefinition Width="171" />
  240. </Grid.ColumnDefinitions>
  241. <TextBlock Height="23" Width="100" FontSize="18" HorizontalAlignment="Center">咖啡机状态</TextBlock>
  242. <TextBlock FontSize="18"
  243. Grid.Column="1"
  244. Text="{Binding CoffeeStatus}" Height="23" />
  245. <TextBlock Grid.Column="2" Height="23" Width="80" FontSize="18">应用状态</TextBlock>
  246. <TextBlock FontSize="18"
  247. Grid.Column="3"
  248. Text="{Binding AppStatus}" Height="23"/>
  249. <TextBlock Grid.Row="1" Grid.Column="0" Height="22" Width="80" FontSize="18">告警信息</TextBlock>
  250. <TextBlock FontSize="15"
  251. Grid.Row="1"
  252. Grid.Column="1"
  253. Text="{Binding Warning}" />
  254. <TextBlock Grid.Row="1" Grid.Column="2" Height="22" Width="80" FontSize="18">故障信息</TextBlock>
  255. <TextBlock FontSize="18"
  256. Grid.Row="1"
  257. Grid.Column="3"
  258. Text="{Binding CaffeeFault}" Height="22" Width="60" />
  259. </Grid>
  260. <StackPanel Grid.Row="2" Orientation="Vertical">
  261. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  262. <TextBlock>饮品</TextBlock>
  263. <ComboBox Margin="10,0"
  264. Width="100"
  265. ItemsSource="{Binding Coffees}"
  266. SelectedItem="{Binding SelectedCoffee}" />
  267. <Button Margin="10,0"
  268. Command="{}"
  269. Content="制作"/>
  270. <Button Margin="10,0"
  271. Command="{}"
  272. Content="停止制作"/>
  273. </StackPanel>
  274. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  275. <TextBlock>模式</TextBlock>
  276. <ComboBox Margin="10,0"
  277. Width="100"
  278. ItemsSource="{Binding CoffeeCmds}"
  279. SelectedItem="{Binding SelectedCoffeeCmd}"/>
  280. <Button Margin="10,0"
  281. Command="{}"
  282. Content="设置" Cursor="Hand"/>
  283. </StackPanel>
  284. </StackPanel>
  285. </Grid>
  286. </GroupBox>
  287. <GroupBox Header="单片机控制"
  288. FontSize="18"
  289. Grid.Row="1" Grid.ColumnSpan="2"
  290. Margin="0,0,0,10" HorizontalAlignment="Right" Width="1000">
  291. <StackPanel Orientation="Horizontal"
  292. VerticalAlignment="Center" >
  293. </StackPanel>
  294. </GroupBox>
  295. </Grid>
  296. </UserControl>