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.
 
 

555 lines
25 KiB

  1. <UserControl
  2. x:Class="HBLConsole.Debug.Debug_MORKIC"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:HBLConsole.Debug"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:s="https://github.com/canton7/Stylet"
  9. d:DesignHeight="450"
  10. d:DesignWidth="800"
  11. mc:Ignorable="d">
  12. <UserControl.DataContext>
  13. <local:ViewModel_MORKIC x:Name="vmode" />
  14. </UserControl.DataContext>
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <ResourceDictionary.MergedDictionaries>
  18. <ResourceDictionary Source="Style.xaml" />
  19. <ResourceDictionary>
  20. <!--#region 按钮样式-->
  21. <Style x:Key="ButtonStyle" TargetType="Button">
  22. <Setter Property="Foreground" Value="#00c2f4" />
  23. <Setter Property="FontSize" Value="18" />
  24. <Setter Property="Width" Value="100" />
  25. <Setter Property="Template">
  26. <Setter.Value>
  27. <ControlTemplate TargetType="Button">
  28. <Border
  29. Name="TitleBarBr"
  30. Background="Transparent"
  31. BorderBrush="#00c2f4"
  32. BorderThickness="2"
  33. CornerRadius="10">
  34. <ContentPresenter
  35. Margin="{TemplateBinding Margin}"
  36. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  37. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  38. </Border>
  39. <ControlTemplate.Triggers>
  40. <Trigger Property="IsMouseOver" Value="true">
  41. <Setter TargetName="TitleBarBr" Property="Background" Value="#3300c2f4" />
  42. </Trigger>
  43. </ControlTemplate.Triggers>
  44. </ControlTemplate>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. <!--#endregion-->
  49. </ResourceDictionary>
  50. </ResourceDictionary.MergedDictionaries>
  51. </ResourceDictionary>
  52. </UserControl.Resources>
  53. <Grid>
  54. <Grid.Resources>
  55. <Style TargetType="TextBlock">
  56. <Setter Property="HorizontalAlignment" Value="Left" />
  57. <Setter Property="VerticalAlignment" Value="Center" />
  58. </Style>
  59. </Grid.Resources>
  60. <Grid.RowDefinitions>
  61. <RowDefinition />
  62. <RowDefinition />
  63. </Grid.RowDefinitions>
  64. <!--#region 乐百机器人控制-->
  65. <GroupBox
  66. BorderBrush="#3aa7f3"
  67. BorderThickness="2"
  68. FontFamily="楷体"
  69. FontSize="20"
  70. Foreground="Aqua"
  71. Header=" 乐百机器人控制 "
  72. Style="{DynamicResource GroupBoxStyle1}">
  73. <Grid>
  74. <Grid.RowDefinitions>
  75. <RowDefinition Height="50" />
  76. <RowDefinition />
  77. </Grid.RowDefinitions>
  78. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  79. <Button
  80. Width="130"
  81. Margin="10,0,10,0"
  82. Command="{Binding bql}"
  83. Content="冰淇淋模拟"
  84. Style="{StaticResource ButtonStyle}" />
  85. <Button
  86. Width="130"
  87. Margin="10,0,10,0"
  88. Command="{Binding bql}"
  89. Content="冰淇淋模拟"
  90. Style="{StaticResource ButtonStyle}" />
  91. </StackPanel>
  92. <StackPanel Grid.Row="1" Margin="0,10,0,0" Orientation="Vertical">
  93. <Grid HorizontalAlignment="Left">
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width="*"></ColumnDefinition>
  96. <ColumnDefinition Width="100"></ColumnDefinition>
  97. <ColumnDefinition Width="*"></ColumnDefinition>
  98. <ColumnDefinition Width="100"></ColumnDefinition>
  99. <ColumnDefinition Width="*"></ColumnDefinition>
  100. <ColumnDefinition Width="100"></ColumnDefinition>
  101. </Grid.ColumnDefinitions>
  102. <TextBlock>机器人连接状态</TextBlock>
  103. <TextBlock Margin="10,0,0,0" Grid.Column="1" Text="{Binding RobotConnected}"></TextBlock>
  104. <TextBlock Grid.Column="2">冰淇淋机连接状态</TextBlock>
  105. <TextBlock Margin="10,0,0,0" Grid.Column="3" Text="{Binding IceCreamConnected}"></TextBlock>
  106. <TextBlock Grid.Column="4">咖啡机连接状态</TextBlock>
  107. <TextBlock Margin="10,0,0,0" Grid.Column="5" Text="{Binding CoffeeConnected}"></TextBlock>
  108. </Grid>
  109. </StackPanel>
  110. </Grid>
  111. </GroupBox>
  112. <!--#endregion-->
  113. <Grid Grid.Row="1">
  114. <Grid.ColumnDefinitions>
  115. <ColumnDefinition />
  116. <ColumnDefinition />
  117. </Grid.ColumnDefinitions>
  118. <!--#region 冰淇淋机-->
  119. <GroupBox
  120. BorderBrush="#3aa7f3"
  121. BorderThickness="2"
  122. FontFamily="楷体"
  123. FontSize="20"
  124. Foreground="Aqua"
  125. Header=" 冰淇淋控制 "
  126. Style="{DynamicResource GroupBoxStyle1}">
  127. <Grid>
  128. <Grid.RowDefinitions>
  129. <RowDefinition />
  130. <RowDefinition Height="0.5*"/>
  131. </Grid.RowDefinitions>
  132. <Grid>
  133. <Grid.ColumnDefinitions>
  134. <ColumnDefinition />
  135. <ColumnDefinition />
  136. <ColumnDefinition />
  137. <ColumnDefinition />
  138. </Grid.ColumnDefinitions>
  139. <StackPanel HorizontalAlignment="Right">
  140. <TextBlock Text="预冷温度:" />
  141. <TextBlock Text="环境温度:" />
  142. <TextBlock HorizontalAlignment="Right" Text="电流:" />
  143. <TextBlock HorizontalAlignment="Right" Text="成型比:" />
  144. <TextBlock HorizontalAlignment="Right" Text="打料完成:" />
  145. </StackPanel>
  146. <StackPanel Grid.Column="1" Margin="10,0,0,0">
  147. <TextBlock Text="{Binding YLWD}" />
  148. <TextBlock Text="{Binding HJWD}" />
  149. <TextBlock Text="{Binding DL}" />
  150. <TextBlock Text="{Binding CXB}" />
  151. <TextBlock Text="{Binding DLCompleted}" />
  152. </StackPanel>
  153. <StackPanel Grid.Column="2" HorizontalAlignment="Right">
  154. <TextBlock Text="回气温度:" />
  155. <TextBlock Text="当前模式:" />
  156. <TextBlock HorizontalAlignment="Right" Text="电压:" />
  157. <TextBlock HorizontalAlignment="Right" Text="故障:" />
  158. </StackPanel>
  159. <StackPanel Grid.Column="3" Margin="10,0,0,0">
  160. <TextBlock Text="{Binding YLWD}" />
  161. <TextBlock Text="{Binding HQWD}" />
  162. <TextBlock Text="{Binding HJWD}" />
  163. <TextBlock Text="{Binding YLWD}" />
  164. </StackPanel>
  165. </Grid>
  166. <Grid Grid.Row="1">
  167. <Grid.RowDefinitions>
  168. <RowDefinition Height="50" />
  169. </Grid.RowDefinitions>
  170. <StackPanel Margin="5,5" Orientation="Horizontal">
  171. <Button
  172. s:View.ActionTarget="{Binding}"
  173. Command="{s:Action MakeIceCream}"
  174. Content="开始制作"
  175. Style="{StaticResource ButtonStyle}" />
  176. <ComboBox
  177. Width="150"
  178. Margin="5"
  179. ItemsSource="{Binding IceCreamModes}"
  180. SelectedItem="{Binding SelecteIceCreamdMode}" />
  181. <Button
  182. s:View.ActionTarget="{Binding}"
  183. Command="{s:Action SetIceCreamModel}"
  184. Content="设置模式"
  185. Style="{StaticResource ButtonStyle}" />
  186. </StackPanel>
  187. </Grid>
  188. <!--<Grid.RowDefinitions>
  189. <RowDefinition />
  190. <RowDefinition />
  191. </Grid.RowDefinitions>
  192. <Grid>
  193. <Grid.RowDefinitions>
  194. <RowDefinition />
  195. <RowDefinition />
  196. <RowDefinition />
  197. <RowDefinition />
  198. </Grid.RowDefinitions>
  199. <Grid.ColumnDefinitions>
  200. <ColumnDefinition Width="120" />
  201. <ColumnDefinition Width="100" />
  202. <ColumnDefinition Width="120" />
  203. <ColumnDefinition Width="100" />
  204. </Grid.ColumnDefinitions>
  205. <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
  206. <TextBlock
  207. Grid.Row="0"
  208. Grid.Column="1"
  209. Text="{Binding YLWD}" />
  210. <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
  211. <TextBlock
  212. Grid.Row="0"
  213. Grid.Column="3"
  214. Text="{Binding HQWD}" />
  215. <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
  216. <TextBlock
  217. Grid.Row="1"
  218. Grid.Column="1"
  219. Text="{Binding HJWD}" />
  220. <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
  221. <TextBlock
  222. Grid.Row="1"
  223. Grid.Column="3"
  224. Text="{Binding CurrentMode}" />
  225. <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
  226. <TextBlock
  227. Grid.Row="2"
  228. Grid.Column="1"
  229. Text="{Binding DL}" />
  230. <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
  231. <TextBlock
  232. Grid.Row="2"
  233. Grid.Column="3"
  234. Text="{Binding DY}" />
  235. <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
  236. <TextBlock
  237. Grid.Row="3"
  238. Grid.Column="1"
  239. Text="{Binding CXB}" />
  240. <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
  241. <TextBlock
  242. Grid.Row="3"
  243. Grid.Column="3"
  244. Text="{Binding IceCreamFault}" />
  245. </Grid>
  246. <StackPanel Grid.Row="1" Orientation="Vertical">
  247. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  248. <TextBlock>饮品</TextBlock>
  249. <Button
  250. s:View.ActionTarget="{Binding}"
  251. Command="{s:Action MakeIceCream}"
  252. Content="制作" />
  253. </StackPanel>
  254. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  255. <TextBlock>模式</TextBlock>
  256. <ComboBox
  257. Width="100"
  258. ItemsSource="{Binding IceCreamModes}"
  259. SelectedItem="{Binding SelecteIceCreamdMode}" />
  260. <Button
  261. s:View.ActionTarget="{Binding}"
  262. Command="{s:Action SetIceCreamModel}"
  263. Content="设置" />
  264. </StackPanel>
  265. </StackPanel>-->
  266. </Grid>
  267. </GroupBox>
  268. <!--#endregion-->
  269. <!--#region 咖啡机-->
  270. <GroupBox
  271. Grid.Column="1"
  272. BorderBrush="#3aa7f3"
  273. BorderThickness="2"
  274. FontFamily="楷体"
  275. FontSize="20"
  276. Foreground="Aqua"
  277. Header=" 咖啡机控制 "
  278. Style="{DynamicResource GroupBoxStyle1}">
  279. <Grid>
  280. <Grid.RowDefinitions>
  281. <RowDefinition />
  282. <RowDefinition />
  283. </Grid.RowDefinitions>
  284. <Grid>
  285. <Grid.Resources>
  286. <Style TargetType="TextBlock">
  287. <Setter Property="HorizontalAlignment" Value="Left" />
  288. <Setter Property="VerticalAlignment" Value="Center" />
  289. </Style>
  290. </Grid.Resources>
  291. <Grid.RowDefinitions>
  292. <RowDefinition />
  293. <RowDefinition />
  294. </Grid.RowDefinitions>
  295. <Grid.ColumnDefinitions>
  296. <ColumnDefinition Width="120" />
  297. <ColumnDefinition Width="100" />
  298. <ColumnDefinition Width="120" />
  299. <ColumnDefinition Width="150" />
  300. </Grid.ColumnDefinitions>
  301. <TextBlock Grid.Row="0" Grid.Column="0">咖啡机状态</TextBlock>
  302. <TextBlock
  303. Grid.Row="0"
  304. Grid.Column="1"
  305. Text="{Binding CoffeeStatus}" />
  306. <TextBlock Grid.Row="0" Grid.Column="2">应用状态</TextBlock>
  307. <TextBlock
  308. Grid.Row="0"
  309. Grid.Column="3"
  310. Text="{Binding AppStatus}" />
  311. <TextBlock Grid.Row="1" Grid.Column="0">告警信息</TextBlock>
  312. <TextBlock
  313. Grid.Row="1"
  314. Grid.Column="1"
  315. Text="{Binding Warning}" />
  316. <TextBlock Grid.Row="1" Grid.Column="2">故障信息</TextBlock>
  317. <TextBlock
  318. Grid.Row="1"
  319. Grid.Column="3"
  320. Text="{Binding CaffeeFault}" />
  321. </Grid>
  322. <StackPanel Grid.Row="1" Orientation="Vertical">
  323. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  324. <TextBlock>饮品</TextBlock>
  325. <ComboBox
  326. Width="100"
  327. ItemsSource="{Binding Coffees}"
  328. SelectedItem="{Binding SelectedCoffee}" />
  329. <Button
  330. s:View.ActionTarget="{Binding}"
  331. Command="{s:Action MakeCoffee}"
  332. Content="制作" />
  333. <Button
  334. s:View.ActionTarget="{Binding}"
  335. Command="{s:Action StopMakeCoffee}"
  336. Content="停止制作" />
  337. </StackPanel>
  338. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  339. <TextBlock>模式</TextBlock>
  340. <ComboBox
  341. Width="100"
  342. ItemsSource="{Binding CoffeeCmds}"
  343. SelectedItem="{Binding SelectedCoffeeCmd}" />
  344. <Button
  345. s:View.ActionTarget="{Binding}"
  346. Command="{s:Action SetCoffeeModel}"
  347. Content="设置" />
  348. </StackPanel>
  349. </StackPanel>
  350. </Grid>
  351. </GroupBox>
  352. <!--#endregion-->
  353. </Grid>
  354. <!--<GroupBox
  355. Grid.Row="1"
  356. Grid.Column="0"
  357. Header="冰淇淋机">
  358. <Grid>
  359. <Grid.RowDefinitions>
  360. <RowDefinition />
  361. <RowDefinition />
  362. </Grid.RowDefinitions>
  363. <Grid>
  364. <Grid.RowDefinitions>
  365. <RowDefinition />
  366. <RowDefinition />
  367. <RowDefinition />
  368. <RowDefinition />
  369. </Grid.RowDefinitions>
  370. <Grid.ColumnDefinitions>
  371. <ColumnDefinition Width="120" />
  372. <ColumnDefinition Width="100" />
  373. <ColumnDefinition Width="120" />
  374. <ColumnDefinition Width="100" />
  375. </Grid.ColumnDefinitions>
  376. <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
  377. <TextBlock
  378. Grid.Row="0"
  379. Grid.Column="1"
  380. Text="{Binding YLWD}" />
  381. <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
  382. <TextBlock
  383. Grid.Row="0"
  384. Grid.Column="3"
  385. Text="{Binding HQWD}" />
  386. <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
  387. <TextBlock
  388. Grid.Row="1"
  389. Grid.Column="1"
  390. Text="{Binding HJWD}" />
  391. <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
  392. <TextBlock
  393. Grid.Row="1"
  394. Grid.Column="3"
  395. Text="{Binding CurrentMode}" />
  396. <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
  397. <TextBlock
  398. Grid.Row="2"
  399. Grid.Column="1"
  400. Text="{Binding DL}" />
  401. <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
  402. <TextBlock
  403. Grid.Row="2"
  404. Grid.Column="3"
  405. Text="{Binding DY}" />
  406. <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
  407. <TextBlock
  408. Grid.Row="3"
  409. Grid.Column="1"
  410. Text="{Binding CXB}" />
  411. <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
  412. <TextBlock
  413. Grid.Row="3"
  414. Grid.Column="3"
  415. Text="{Binding IceCreamFault}" />
  416. </Grid>
  417. <StackPanel Grid.Row="1" Orientation="Vertical">
  418. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  419. <TextBlock>饮品</TextBlock>
  420. <Button
  421. s:View.ActionTarget="{Binding}"
  422. Command="{s:Action MakeIceCream}"
  423. Content="制作" />
  424. </StackPanel>
  425. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  426. <TextBlock>模式</TextBlock>
  427. <ComboBox
  428. Width="100"
  429. ItemsSource="{Binding IceCreamModes}"
  430. SelectedItem="{Binding SelecteIceCreamdMode}" />
  431. <Button
  432. s:View.ActionTarget="{Binding}"
  433. Command="{s:Action SetIceCreamModel}"
  434. Content="设置" />
  435. </StackPanel>
  436. </StackPanel>
  437. </Grid>
  438. </GroupBox>-->
  439. <!--<GroupBox
  440. Grid.Row="1"
  441. Grid.Column="1"
  442. Header="咖啡机">
  443. <Grid>
  444. <Grid.RowDefinitions>
  445. <RowDefinition />
  446. <RowDefinition />
  447. </Grid.RowDefinitions>
  448. <Grid>
  449. <Grid.Resources>
  450. <Style TargetType="TextBlock">
  451. <Setter Property="HorizontalAlignment" Value="Left" />
  452. <Setter Property="VerticalAlignment" Value="Center" />
  453. </Style>
  454. </Grid.Resources>
  455. <Grid.RowDefinitions>
  456. <RowDefinition />
  457. <RowDefinition />
  458. </Grid.RowDefinitions>
  459. <Grid.ColumnDefinitions>
  460. <ColumnDefinition Width="120" />
  461. <ColumnDefinition Width="100" />
  462. <ColumnDefinition Width="120" />
  463. <ColumnDefinition Width="150" />
  464. </Grid.ColumnDefinitions>
  465. <TextBlock Grid.Row="0" Grid.Column="0">咖啡机状态</TextBlock>
  466. <TextBlock
  467. Grid.Row="0"
  468. Grid.Column="1"
  469. Text="{Binding CoffeeStatus}" />
  470. <TextBlock Grid.Row="0" Grid.Column="2">应用状态</TextBlock>
  471. <TextBlock
  472. Grid.Row="0"
  473. Grid.Column="3"
  474. Text="{Binding AppStatus}" />
  475. <TextBlock Grid.Row="1" Grid.Column="0">告警信息</TextBlock>
  476. <TextBlock
  477. Grid.Row="1"
  478. Grid.Column="1"
  479. Text="{Binding Warning}" />
  480. <TextBlock Grid.Row="1" Grid.Column="2">故障信息</TextBlock>
  481. <TextBlock
  482. Grid.Row="1"
  483. Grid.Column="3"
  484. Text="{Binding CaffeeFault}" />
  485. </Grid>
  486. <StackPanel Grid.Row="1" Orientation="Vertical">
  487. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  488. <TextBlock>饮品</TextBlock>
  489. <ComboBox
  490. Width="100"
  491. ItemsSource="{Binding Coffees}"
  492. SelectedItem="{Binding SelectedCoffee}" />
  493. <Button
  494. s:View.ActionTarget="{Binding}"
  495. Command="{s:Action MakeCoffee}"
  496. Content="制作" />
  497. <Button
  498. s:View.ActionTarget="{Binding}"
  499. Command="{s:Action StopMakeCoffee}"
  500. Content="停止制作" />
  501. </StackPanel>
  502. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  503. <TextBlock>模式</TextBlock>
  504. <ComboBox
  505. Width="100"
  506. ItemsSource="{Binding CoffeeCmds}"
  507. SelectedItem="{Binding SelectedCoffeeCmd}" />
  508. <Button
  509. s:View.ActionTarget="{Binding}"
  510. Command="{s:Action SetCoffeeModel}"
  511. Content="设置" />
  512. </StackPanel>
  513. </StackPanel>
  514. </Grid>
  515. </GroupBox>-->
  516. </Grid>
  517. </UserControl>