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.
 
 

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