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.
 
 

536 lines
24 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. </Grid>
  93. </GroupBox>
  94. <!--#endregion-->
  95. <Grid Grid.Row="1">
  96. <Grid.ColumnDefinitions>
  97. <ColumnDefinition />
  98. <ColumnDefinition />
  99. </Grid.ColumnDefinitions>
  100. <!--#region 冰淇淋机-->
  101. <GroupBox
  102. BorderBrush="#3aa7f3"
  103. BorderThickness="2"
  104. FontFamily="楷体"
  105. FontSize="20"
  106. Foreground="Aqua"
  107. Header=" 冰淇淋控制 "
  108. Style="{DynamicResource GroupBoxStyle1}">
  109. <Grid>
  110. <Grid.RowDefinitions>
  111. <RowDefinition />
  112. <RowDefinition Height="0.5*"/>
  113. </Grid.RowDefinitions>
  114. <Grid>
  115. <Grid.ColumnDefinitions>
  116. <ColumnDefinition />
  117. <ColumnDefinition />
  118. <ColumnDefinition />
  119. <ColumnDefinition />
  120. </Grid.ColumnDefinitions>
  121. <StackPanel HorizontalAlignment="Right">
  122. <TextBlock Text="预冷温度:" />
  123. <TextBlock Text="环境温度:" />
  124. <TextBlock HorizontalAlignment="Right" Text="电流:" />
  125. <TextBlock HorizontalAlignment="Right" Text="成型比:" />
  126. <TextBlock HorizontalAlignment="Right" Text="打料完成:" />
  127. </StackPanel>
  128. <StackPanel Grid.Column="1" Margin="10,0,0,0">
  129. <TextBlock Text="{Binding YLWD}" />
  130. <TextBlock Text="{Binding HJWD}" />
  131. <TextBlock Text="{Binding DL}" />
  132. <TextBlock Text="{Binding CXB}" />
  133. <TextBlock Text="{Binding DLCompleted}" />
  134. </StackPanel>
  135. <StackPanel Grid.Column="2" HorizontalAlignment="Right">
  136. <TextBlock Text="回气温度:" />
  137. <TextBlock Text="当前模式:" />
  138. <TextBlock HorizontalAlignment="Right" Text="电压:" />
  139. <TextBlock HorizontalAlignment="Right" Text="故障:" />
  140. </StackPanel>
  141. <StackPanel Grid.Column="3" Margin="10,0,0,0">
  142. <TextBlock Text="{Binding YLWD}" />
  143. <TextBlock Text="{Binding HQWD}" />
  144. <TextBlock Text="{Binding HJWD}" />
  145. <TextBlock Text="{Binding YLWD}" />
  146. </StackPanel>
  147. </Grid>
  148. <Grid Grid.Row="1">
  149. <Grid.RowDefinitions>
  150. <RowDefinition Height="50" />
  151. </Grid.RowDefinitions>
  152. <StackPanel Margin="5,5" Orientation="Horizontal">
  153. <Button
  154. s:View.ActionTarget="{Binding}"
  155. Command="{s:Action MakeIceCream}"
  156. Content="开始制作"
  157. Style="{StaticResource ButtonStyle}" />
  158. <ComboBox
  159. Width="150"
  160. Margin="5"
  161. ItemsSource="{Binding IceCreamModes}"
  162. SelectedItem="{Binding SelecteIceCreamdMode}" />
  163. <Button
  164. s:View.ActionTarget="{Binding}"
  165. Command="{s:Action SetIceCreamModel}"
  166. Content="设置模式"
  167. Style="{StaticResource ButtonStyle}" />
  168. </StackPanel>
  169. </Grid>
  170. <!--<Grid.RowDefinitions>
  171. <RowDefinition />
  172. <RowDefinition />
  173. </Grid.RowDefinitions>
  174. <Grid>
  175. <Grid.RowDefinitions>
  176. <RowDefinition />
  177. <RowDefinition />
  178. <RowDefinition />
  179. <RowDefinition />
  180. </Grid.RowDefinitions>
  181. <Grid.ColumnDefinitions>
  182. <ColumnDefinition Width="120" />
  183. <ColumnDefinition Width="100" />
  184. <ColumnDefinition Width="120" />
  185. <ColumnDefinition Width="100" />
  186. </Grid.ColumnDefinitions>
  187. <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
  188. <TextBlock
  189. Grid.Row="0"
  190. Grid.Column="1"
  191. Text="{Binding YLWD}" />
  192. <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
  193. <TextBlock
  194. Grid.Row="0"
  195. Grid.Column="3"
  196. Text="{Binding HQWD}" />
  197. <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
  198. <TextBlock
  199. Grid.Row="1"
  200. Grid.Column="1"
  201. Text="{Binding HJWD}" />
  202. <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
  203. <TextBlock
  204. Grid.Row="1"
  205. Grid.Column="3"
  206. Text="{Binding CurrentMode}" />
  207. <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
  208. <TextBlock
  209. Grid.Row="2"
  210. Grid.Column="1"
  211. Text="{Binding DL}" />
  212. <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
  213. <TextBlock
  214. Grid.Row="2"
  215. Grid.Column="3"
  216. Text="{Binding DY}" />
  217. <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
  218. <TextBlock
  219. Grid.Row="3"
  220. Grid.Column="1"
  221. Text="{Binding CXB}" />
  222. <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
  223. <TextBlock
  224. Grid.Row="3"
  225. Grid.Column="3"
  226. Text="{Binding IceCreamFault}" />
  227. </Grid>
  228. <StackPanel Grid.Row="1" Orientation="Vertical">
  229. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  230. <TextBlock>饮品</TextBlock>
  231. <Button
  232. s:View.ActionTarget="{Binding}"
  233. Command="{s:Action MakeIceCream}"
  234. Content="制作" />
  235. </StackPanel>
  236. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  237. <TextBlock>模式</TextBlock>
  238. <ComboBox
  239. Width="100"
  240. ItemsSource="{Binding IceCreamModes}"
  241. SelectedItem="{Binding SelecteIceCreamdMode}" />
  242. <Button
  243. s:View.ActionTarget="{Binding}"
  244. Command="{s:Action SetIceCreamModel}"
  245. Content="设置" />
  246. </StackPanel>
  247. </StackPanel>-->
  248. </Grid>
  249. </GroupBox>
  250. <!--#endregion-->
  251. <!--#region 咖啡机-->
  252. <GroupBox
  253. Grid.Column="1"
  254. BorderBrush="#3aa7f3"
  255. BorderThickness="2"
  256. FontFamily="楷体"
  257. FontSize="20"
  258. Foreground="Aqua"
  259. Header=" 乐百机器人控制 "
  260. Style="{DynamicResource GroupBoxStyle1}">
  261. <Grid>
  262. <Grid.RowDefinitions>
  263. <RowDefinition />
  264. <RowDefinition />
  265. </Grid.RowDefinitions>
  266. <Grid>
  267. <Grid.Resources>
  268. <Style TargetType="TextBlock">
  269. <Setter Property="HorizontalAlignment" Value="Left" />
  270. <Setter Property="VerticalAlignment" Value="Center" />
  271. </Style>
  272. </Grid.Resources>
  273. <Grid.RowDefinitions>
  274. <RowDefinition />
  275. <RowDefinition />
  276. </Grid.RowDefinitions>
  277. <Grid.ColumnDefinitions>
  278. <ColumnDefinition Width="120" />
  279. <ColumnDefinition Width="100" />
  280. <ColumnDefinition Width="120" />
  281. <ColumnDefinition Width="150" />
  282. </Grid.ColumnDefinitions>
  283. <TextBlock Grid.Row="0" Grid.Column="0">咖啡机状态</TextBlock>
  284. <TextBlock
  285. Grid.Row="0"
  286. Grid.Column="1"
  287. Text="{Binding CoffeeStatus}" />
  288. <TextBlock Grid.Row="0" Grid.Column="2">应用状态</TextBlock>
  289. <TextBlock
  290. Grid.Row="0"
  291. Grid.Column="3"
  292. Text="{Binding AppStatus}" />
  293. <TextBlock Grid.Row="1" Grid.Column="0">告警信息</TextBlock>
  294. <TextBlock
  295. Grid.Row="1"
  296. Grid.Column="1"
  297. Text="{Binding Warning}" />
  298. <TextBlock Grid.Row="1" Grid.Column="2">故障信息</TextBlock>
  299. <TextBlock
  300. Grid.Row="1"
  301. Grid.Column="3"
  302. Text="{Binding CaffeeFault}" />
  303. </Grid>
  304. <StackPanel Grid.Row="1" Orientation="Vertical">
  305. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  306. <TextBlock>饮品</TextBlock>
  307. <ComboBox
  308. Width="100"
  309. ItemsSource="{Binding Coffees}"
  310. SelectedItem="{Binding SelectedCoffee}" />
  311. <Button
  312. s:View.ActionTarget="{Binding}"
  313. Command="{s:Action MakeCoffee}"
  314. Content="制作" />
  315. <Button
  316. s:View.ActionTarget="{Binding}"
  317. Command="{s:Action StopMakeCoffee}"
  318. Content="停止制作" />
  319. </StackPanel>
  320. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  321. <TextBlock>模式</TextBlock>
  322. <ComboBox
  323. Width="100"
  324. ItemsSource="{Binding CoffeeCmds}"
  325. SelectedItem="{Binding SelectedCoffeeCmd}" />
  326. <Button
  327. s:View.ActionTarget="{Binding}"
  328. Command="{s:Action SetCoffeeModel}"
  329. Content="设置" />
  330. </StackPanel>
  331. </StackPanel>
  332. </Grid>
  333. </GroupBox>
  334. <!--#endregion-->
  335. </Grid>
  336. <!--<GroupBox
  337. Grid.Row="1"
  338. Grid.Column="0"
  339. Header="冰淇淋机">
  340. <Grid>
  341. <Grid.RowDefinitions>
  342. <RowDefinition />
  343. <RowDefinition />
  344. </Grid.RowDefinitions>
  345. <Grid>
  346. <Grid.RowDefinitions>
  347. <RowDefinition />
  348. <RowDefinition />
  349. <RowDefinition />
  350. <RowDefinition />
  351. </Grid.RowDefinitions>
  352. <Grid.ColumnDefinitions>
  353. <ColumnDefinition Width="120" />
  354. <ColumnDefinition Width="100" />
  355. <ColumnDefinition Width="120" />
  356. <ColumnDefinition Width="100" />
  357. </Grid.ColumnDefinitions>
  358. <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
  359. <TextBlock
  360. Grid.Row="0"
  361. Grid.Column="1"
  362. Text="{Binding YLWD}" />
  363. <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
  364. <TextBlock
  365. Grid.Row="0"
  366. Grid.Column="3"
  367. Text="{Binding HQWD}" />
  368. <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
  369. <TextBlock
  370. Grid.Row="1"
  371. Grid.Column="1"
  372. Text="{Binding HJWD}" />
  373. <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
  374. <TextBlock
  375. Grid.Row="1"
  376. Grid.Column="3"
  377. Text="{Binding CurrentMode}" />
  378. <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
  379. <TextBlock
  380. Grid.Row="2"
  381. Grid.Column="1"
  382. Text="{Binding DL}" />
  383. <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
  384. <TextBlock
  385. Grid.Row="2"
  386. Grid.Column="3"
  387. Text="{Binding DY}" />
  388. <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
  389. <TextBlock
  390. Grid.Row="3"
  391. Grid.Column="1"
  392. Text="{Binding CXB}" />
  393. <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
  394. <TextBlock
  395. Grid.Row="3"
  396. Grid.Column="3"
  397. Text="{Binding IceCreamFault}" />
  398. </Grid>
  399. <StackPanel Grid.Row="1" Orientation="Vertical">
  400. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  401. <TextBlock>饮品</TextBlock>
  402. <Button
  403. s:View.ActionTarget="{Binding}"
  404. Command="{s:Action MakeIceCream}"
  405. Content="制作" />
  406. </StackPanel>
  407. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  408. <TextBlock>模式</TextBlock>
  409. <ComboBox
  410. Width="100"
  411. ItemsSource="{Binding IceCreamModes}"
  412. SelectedItem="{Binding SelecteIceCreamdMode}" />
  413. <Button
  414. s:View.ActionTarget="{Binding}"
  415. Command="{s:Action SetIceCreamModel}"
  416. Content="设置" />
  417. </StackPanel>
  418. </StackPanel>
  419. </Grid>
  420. </GroupBox>-->
  421. <!--<GroupBox
  422. Grid.Row="1"
  423. Grid.Column="1"
  424. Header="咖啡机">
  425. <Grid>
  426. <Grid.RowDefinitions>
  427. <RowDefinition />
  428. <RowDefinition />
  429. </Grid.RowDefinitions>
  430. <Grid>
  431. <Grid.Resources>
  432. <Style TargetType="TextBlock">
  433. <Setter Property="HorizontalAlignment" Value="Left" />
  434. <Setter Property="VerticalAlignment" Value="Center" />
  435. </Style>
  436. </Grid.Resources>
  437. <Grid.RowDefinitions>
  438. <RowDefinition />
  439. <RowDefinition />
  440. </Grid.RowDefinitions>
  441. <Grid.ColumnDefinitions>
  442. <ColumnDefinition Width="120" />
  443. <ColumnDefinition Width="100" />
  444. <ColumnDefinition Width="120" />
  445. <ColumnDefinition Width="150" />
  446. </Grid.ColumnDefinitions>
  447. <TextBlock Grid.Row="0" Grid.Column="0">咖啡机状态</TextBlock>
  448. <TextBlock
  449. Grid.Row="0"
  450. Grid.Column="1"
  451. Text="{Binding CoffeeStatus}" />
  452. <TextBlock Grid.Row="0" Grid.Column="2">应用状态</TextBlock>
  453. <TextBlock
  454. Grid.Row="0"
  455. Grid.Column="3"
  456. Text="{Binding AppStatus}" />
  457. <TextBlock Grid.Row="1" Grid.Column="0">告警信息</TextBlock>
  458. <TextBlock
  459. Grid.Row="1"
  460. Grid.Column="1"
  461. Text="{Binding Warning}" />
  462. <TextBlock Grid.Row="1" Grid.Column="2">故障信息</TextBlock>
  463. <TextBlock
  464. Grid.Row="1"
  465. Grid.Column="3"
  466. Text="{Binding CaffeeFault}" />
  467. </Grid>
  468. <StackPanel Grid.Row="1" Orientation="Vertical">
  469. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  470. <TextBlock>饮品</TextBlock>
  471. <ComboBox
  472. Width="100"
  473. ItemsSource="{Binding Coffees}"
  474. SelectedItem="{Binding SelectedCoffee}" />
  475. <Button
  476. s:View.ActionTarget="{Binding}"
  477. Command="{s:Action MakeCoffee}"
  478. Content="制作" />
  479. <Button
  480. s:View.ActionTarget="{Binding}"
  481. Command="{s:Action StopMakeCoffee}"
  482. Content="停止制作" />
  483. </StackPanel>
  484. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  485. <TextBlock>模式</TextBlock>
  486. <ComboBox
  487. Width="100"
  488. ItemsSource="{Binding CoffeeCmds}"
  489. SelectedItem="{Binding SelectedCoffeeCmd}" />
  490. <Button
  491. s:View.ActionTarget="{Binding}"
  492. Command="{s:Action SetCoffeeModel}"
  493. Content="设置" />
  494. </StackPanel>
  495. </StackPanel>
  496. </Grid>
  497. </GroupBox>-->
  498. </Grid>
  499. </UserControl>