终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

490 linhas
18 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.MorkCL.View.Debug"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:converter="clr-namespace:BPASmartClient.MorkCL.Converter"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.MorkCL.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  10. xmlns:vm="clr-namespace:BPASmartClient.MorkCL.ViewModel"
  11. Name="调试界面"
  12. d:DesignHeight="900"
  13. d:DesignWidth="1200"
  14. mc:Ignorable="d">
  15. <UserControl.DataContext>
  16. <vm:DebugViewModel />
  17. </UserControl.DataContext>
  18. <UserControl.Resources>
  19. <ResourceDictionary>
  20. <ResourceDictionary.MergedDictionaries>
  21. <ResourceDictionary Source="/BPASmartClient.MorkCL;component/CustomStyle/CustomStyle.xaml" />
  22. </ResourceDictionary.MergedDictionaries>
  23. <converter:FryPanConverter x:Key="FryPanConverter" />
  24. </ResourceDictionary>
  25. </UserControl.Resources>
  26. <Grid>
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="1*" />
  29. <RowDefinition Height="0.25*" />
  30. <RowDefinition Height="0.25*" />
  31. </Grid.RowDefinitions>
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition Width="1*" />
  34. <ColumnDefinition Width="1*" />
  35. </Grid.ColumnDefinitions>
  36. <!--#region 1#炒锅控制-->
  37. <pry:ImageBorder Margin="10" />
  38. <StackPanel Margin="30" Orientation="Vertical">
  39. <StackPanel
  40. Margin="0,0,0,20"
  41. HorizontalAlignment="Center"
  42. Orientation="Horizontal">
  43. <TextBlock FontSize="26" Text="1#炒锅控制" />
  44. <!--<ComboBox
  45. Width="150"
  46. Height="50"
  47. Margin="25,0"
  48. FontSize="25"
  49. ItemsSource="{Binding DeviceTypes}"
  50. SelectedItem="{Binding FryingPanSelect}" />-->
  51. </StackPanel>
  52. <StackPanel Margin="5" Orientation="Horizontal">
  53. <Button
  54. Width="150"
  55. Height="50"
  56. Margin="0,0,20,0"
  57. Command="{Binding SetAutoModeCommand}"
  58. Content="设为自动模式" />
  59. <Button
  60. Width="150"
  61. Height="50"
  62. Margin="10,0"
  63. Command="{Binding SetManualModeCommand}"
  64. Content="设为手动模式" />
  65. <Button
  66. Width="150"
  67. Height="50"
  68. Margin="10,0"
  69. Command="{Binding InitalDeviceCommand}"
  70. Content="初始化设备" />
  71. <Button
  72. Width="150"
  73. Height="50"
  74. Margin="10,0"
  75. Command="{Binding StopDeviceCommand}"
  76. Content="停止" />
  77. </StackPanel>
  78. <StackPanel Margin="5" Orientation="Horizontal">
  79. <TextBlock Text="搅拌设定:" />
  80. <TextBox
  81. Width="150"
  82. Height="50"
  83. Margin="5,0"
  84. FontSize="25"
  85. Text="{Binding AgitaFrequency}" />
  86. <Button
  87. Width="120"
  88. Height="50"
  89. Margin="5,0"
  90. Command="{Binding WriteAgitaParamCommand}"
  91. Content="写入参数" />
  92. <Button
  93. Width="120"
  94. Height="50"
  95. Margin="5,0"
  96. Command="{Binding StartAgitateCommand}"
  97. Content="开始搅拌" />
  98. <Button
  99. Width="120"
  100. Height="50"
  101. Margin="5,0"
  102. Command="{Binding StopAgitateCommand}"
  103. Content="停止搅拌" />
  104. </StackPanel>
  105. <StackPanel Margin="5" Orientation="Horizontal">
  106. <TextBlock Text="加热设定:" />
  107. <TextBox
  108. Width="150"
  109. Height="50"
  110. Margin="5,0"
  111. FontSize="25"
  112. Text="{Binding HeatGear}" />
  113. <Button
  114. Width="120"
  115. Height="50"
  116. Margin="5,0"
  117. Command="{Binding WriteHeatParamCommand}"
  118. Content="写入参数" />
  119. <Button
  120. Width="120"
  121. Height="50"
  122. Margin="5,0"
  123. Command="{Binding StartHeatCommand}"
  124. Content="开始加热" />
  125. <Button
  126. Width="120"
  127. Height="50"
  128. Margin="5,0"
  129. Command="{Binding StopHeatCommand}"
  130. Content="停止加热" />
  131. </StackPanel>
  132. <StackPanel Margin="5" Orientation="Horizontal">
  133. <TextBlock Text="通道下料:" />
  134. <TextBox
  135. Width="150"
  136. Height="50"
  137. Margin="5,0"
  138. FontSize="25"
  139. Text="{Binding Weight}" />
  140. <ComboBox
  141. Width="120"
  142. Height="50"
  143. Margin="5,0"
  144. FontSize="25"
  145. SelectedIndex="{Binding ChannelSelect}">
  146. <ComboBoxItem Content="1#通道" />
  147. <ComboBoxItem Content="2#通道" />
  148. <ComboBoxItem Content="3#通道" />
  149. </ComboBox>
  150. <Button
  151. Width="120"
  152. Height="50"
  153. Margin="5,0"
  154. Command="{Binding ChannelCuttingCommand}"
  155. Content="开始下料" />
  156. </StackPanel>
  157. <StackPanel Margin="5" Orientation="Horizontal">
  158. <TextBlock Text="去炒制位:" />
  159. <ComboBox
  160. Width="150"
  161. Height="50"
  162. Margin="5,0"
  163. FontSize="25"
  164. SelectedIndex="{Binding StirFryLocSelect}">
  165. <ComboBoxItem Content="1#炒制位" />
  166. <ComboBoxItem Content="2#炒制位" />
  167. <ComboBoxItem Content="3#炒制位" />
  168. </ComboBox>
  169. <Button
  170. Width="120"
  171. Height="50"
  172. Margin="5,0"
  173. Command="{Binding GoFryLocCommand}"
  174. Content="写入位置" />
  175. </StackPanel>
  176. <WrapPanel Margin="0,5">
  177. <Button
  178. Width="200"
  179. Height="50"
  180. Margin="5,0"
  181. HorizontalAlignment="Left"
  182. Command="{Binding GoHomeCommand}"
  183. Content="炒锅回原点(投料位置)" />
  184. <Button
  185. Width="200"
  186. Height="50"
  187. Margin="5,0"
  188. HorizontalAlignment="Left"
  189. Command="{Binding GoSeasoningFeddLocCommand}"
  190. Content="炒锅去调料投料位置" />
  191. </WrapPanel>
  192. <WrapPanel Margin="0,5">
  193. <Button
  194. Width="200"
  195. Height="50"
  196. Margin="5,0"
  197. HorizontalAlignment="Left"
  198. Command="{Binding OutDiningStartCommand}"
  199. Content="出餐启动" />
  200. <Button
  201. Width="200"
  202. Height="50"
  203. Margin="5,0"
  204. HorizontalAlignment="Left"
  205. Command="{Binding FryPanCleanCommand}"
  206. Content="炒锅清洗" />
  207. <!--<Button
  208. Width="100"
  209. Margin="10,0"
  210. Command="{Binding GoCleanLocCommand}"
  211. Content="去洗锅位" />-->
  212. </WrapPanel>
  213. </StackPanel>
  214. <!--#endregion-->
  215. <!--#region 2#炒锅控制-->
  216. <pry:ImageBorder Grid.Column="1" Margin="10" />
  217. <StackPanel
  218. Grid.Column="1"
  219. Margin="30"
  220. Orientation="Vertical">
  221. <StackPanel
  222. Margin="0,0,0,20"
  223. HorizontalAlignment="Center"
  224. Orientation="Horizontal">
  225. <TextBlock FontSize="26" Text="2#炒锅控制" />
  226. <!--<ComboBox
  227. Width="150"
  228. Height="50"
  229. Margin="25,0"
  230. FontSize="25"
  231. ItemsSource="{Binding DeviceTypes}"
  232. SelectedItem="{Binding FryingPanSelect}" />-->
  233. </StackPanel>
  234. <StackPanel Margin="5" Orientation="Horizontal">
  235. <Button
  236. Width="150"
  237. Height="50"
  238. Margin="0,0,20,0"
  239. Command="{Binding SetAutoModeCommand2}"
  240. Content="设为自动模式" />
  241. <Button
  242. Width="150"
  243. Height="50"
  244. Margin="10,0"
  245. Command="{Binding SetManualModeCommand2}"
  246. Content="设为手动模式" />
  247. <Button
  248. Width="150"
  249. Height="50"
  250. Margin="10,0"
  251. Command="{Binding InitalDeviceCommand2}"
  252. Content="初始化设备" />
  253. <Button
  254. Width="150"
  255. Height="50"
  256. Margin="10,0"
  257. Command="{Binding StopDeviceCommand2}"
  258. Content="停止" />
  259. </StackPanel>
  260. <StackPanel Margin="5" Orientation="Horizontal">
  261. <TextBlock Text="搅拌设定:" />
  262. <TextBox
  263. Width="150"
  264. Height="50"
  265. Margin="5,0"
  266. FontSize="25"
  267. Text="{Binding AgitaFrequency2}" />
  268. <Button
  269. Width="120"
  270. Height="50"
  271. Margin="5,0"
  272. Command="{Binding WriteAgitaParamCommand2}"
  273. Content="写入参数" />
  274. <Button
  275. Width="120"
  276. Height="50"
  277. Margin="5,0"
  278. Command="{Binding StartAgitateCommand2}"
  279. Content="开始搅拌" />
  280. <Button
  281. Width="120"
  282. Height="50"
  283. Margin="5,0"
  284. Command="{Binding StopAgitateCommand2}"
  285. Content="停止搅拌" />
  286. </StackPanel>
  287. <StackPanel Margin="5" Orientation="Horizontal">
  288. <TextBlock Text="加热设定:" />
  289. <TextBox
  290. Width="150"
  291. Height="50"
  292. Margin="5,0"
  293. FontSize="25"
  294. Text="{Binding HeatGear2}" />
  295. <Button
  296. Width="120"
  297. Height="50"
  298. Margin="5,0"
  299. Command="{Binding WriteHeatParamCommand2}"
  300. Content="写入参数" />
  301. <Button
  302. Width="120"
  303. Height="50"
  304. Margin="5,0"
  305. Command="{Binding StartHeatCommand2}"
  306. Content="开始加热" />
  307. <Button
  308. Width="120"
  309. Height="50"
  310. Margin="5,0"
  311. Command="{Binding StopHeatCommand2}"
  312. Content="停止加热" />
  313. </StackPanel>
  314. <StackPanel Margin="5" Orientation="Horizontal">
  315. <TextBlock Text="通道下料:" />
  316. <TextBox
  317. Width="150"
  318. Height="50"
  319. Margin="5,0"
  320. FontSize="25"
  321. Text="{Binding Weight2}" />
  322. <ComboBox
  323. Width="120"
  324. Height="50"
  325. Margin="5,0"
  326. FontSize="25"
  327. SelectedIndex="{Binding ChannelSelect2}">
  328. <ComboBoxItem Content="1#通道" />
  329. <ComboBoxItem Content="2#通道" />
  330. <ComboBoxItem Content="3#通道" />
  331. </ComboBox>
  332. <Button
  333. Width="120"
  334. Height="50"
  335. Margin="5,0"
  336. Command="{Binding ChannelCuttingCommand2}"
  337. Content="开始下料" />
  338. </StackPanel>
  339. <StackPanel Margin="5" Orientation="Horizontal">
  340. <TextBlock Text="去炒制位:" />
  341. <ComboBox
  342. Width="150"
  343. Height="50"
  344. Margin="5,0"
  345. FontSize="25"
  346. SelectedIndex="{Binding StirFryLocSelect2}">
  347. <ComboBoxItem Content="1#炒制位" />
  348. <ComboBoxItem Content="2#炒制位" />
  349. <ComboBoxItem Content="3#炒制位" />
  350. </ComboBox>
  351. <Button
  352. Width="120"
  353. Height="50"
  354. Margin="5,0"
  355. Command="{Binding GoFryLocCommand2}"
  356. Content="写入位置" />
  357. </StackPanel>
  358. <WrapPanel Margin="0,5">
  359. <Button
  360. Width="200"
  361. Height="50"
  362. Margin="5,0"
  363. HorizontalAlignment="Left"
  364. Command="{Binding GoHomeCommand2}"
  365. Content="炒锅回原点(投料位置)" />
  366. <Button
  367. Width="200"
  368. Height="50"
  369. Margin="5,0"
  370. HorizontalAlignment="Left"
  371. Command="{Binding GoSeasoningFeddLocCommand2}"
  372. Content="炒锅去调料投料位置" />
  373. </WrapPanel>
  374. <WrapPanel Margin="0,5">
  375. <Button
  376. Width="200"
  377. Height="50"
  378. Margin="5,0"
  379. HorizontalAlignment="Left"
  380. Command="{Binding OutDiningStartCommand2}"
  381. Content="出餐启动" />
  382. <Button
  383. Width="200"
  384. Height="50"
  385. Margin="5,0"
  386. HorizontalAlignment="Left"
  387. Command="{Binding FryPanCleanCommand2}"
  388. Content="炒锅清洗" />
  389. <!--<Button
  390. Width="100"
  391. Margin="10,0"
  392. Command="{Binding GoCleanLocCommand}"
  393. Content="去洗锅位" />-->
  394. </WrapPanel>
  395. </StackPanel>
  396. <!--#endregion-->
  397. <!--#region 机器人控制-->
  398. <pry:ImageBorder
  399. Grid.Row="1"
  400. Grid.ColumnSpan="2"
  401. Margin="10" />
  402. <StackPanel
  403. Grid.Row="1"
  404. Grid.ColumnSpan="2"
  405. Margin="15"
  406. Orientation="Horizontal">
  407. <Button
  408. Width="200"
  409. Height="50"
  410. Margin="5"
  411. HorizontalAlignment="Left"
  412. Command="{Binding RobotGoCleanLocCommand}"
  413. Content="机器人去清洗位置" />
  414. <Button
  415. Width="200"
  416. Height="50"
  417. Margin="5"
  418. HorizontalAlignment="Left"
  419. Command="{Binding CleanFinishCommand}"
  420. Content="机器人清洗完成" />
  421. <Button
  422. Width="200"
  423. Height="50"
  424. Margin="5"
  425. HorizontalAlignment="Left"
  426. Command="{Binding InitRobotVarCommand}"
  427. Content="复位机器人所有变量" />
  428. </StackPanel>
  429. <!--#endregion-->
  430. <!--#region 系统任务控制-->
  431. <pry:ImageBorder
  432. Grid.Row="2"
  433. Grid.ColumnSpan="2"
  434. Margin="10" />
  435. <StackPanel
  436. Grid.Row="2"
  437. Grid.ColumnSpan="2"
  438. Margin="15"
  439. Orientation="Horizontal">
  440. <Button
  441. Width="150"
  442. Height="50"
  443. Margin="5"
  444. Command="{Binding CancelFryPanTaskCommand}"
  445. CommandParameter="炒锅1"
  446. Content="取消当前1#炒锅任务" />
  447. <Button
  448. Width="150"
  449. Height="50"
  450. Margin="5"
  451. Command="{Binding CancelFryPanTaskCommand}"
  452. CommandParameter="炒锅2"
  453. Content="取消当前2#炒锅任务" />
  454. <!--<StackPanel Orientation="Horizontal">
  455. <Button
  456. Width="150"
  457. Height="35"
  458. Margin="5"
  459. Command="{Binding ClearFryPanTaskCommand_1}"
  460. Content="清空1#炒锅任务"
  461. Visibility="Collapsed" />
  462. <Button
  463. Width="150"
  464. Height="35"
  465. Margin="5"
  466. Command="{Binding ClearFryPanTaskCommand_2}"
  467. Content="清空2#炒锅任务"
  468. Visibility="Collapsed" />
  469. </StackPanel>-->
  470. </StackPanel>
  471. <!--#endregion-->
  472. </Grid>
  473. </UserControl>