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.
 
 

722 lines
37 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 ComboBox 样式-->
  21. <!-- ComBoBox项选中背景色 -->
  22. <SolidColorBrush x:Key="ComboBoxSelectdBackground" Color="#AA3ba7f2" />
  23. <!-- ComBoBox项鼠标经过背景色 -->
  24. <SolidColorBrush x:Key="ComboBoxMouseOverBackground" Color="#553ba7f2" />
  25. <!-- ComBoBox项选中前景色 -->
  26. <SolidColorBrush x:Key="ComboBoxSelectedForeground" Color="#DDD" />
  27. <!-- ComBoBox项鼠标经过前景色 -->
  28. <SolidColorBrush x:Key="ComboBoxMouseOverForegrond" Color="#DDD" />
  29. <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  30. <Grid Height="25" HorizontalAlignment="Stretch">
  31. <Grid.ColumnDefinitions>
  32. <ColumnDefinition Width="*" />
  33. <ColumnDefinition Width="30" />
  34. </Grid.ColumnDefinitions>
  35. <Border
  36. Grid.ColumnSpan="2"
  37. Background="White"
  38. Opacity="0" />
  39. <TextBlock
  40. Grid.Column="1"
  41. Margin="0,0,5,0"
  42. HorizontalAlignment="Right"
  43. VerticalAlignment="Center"
  44. FontFamily="../Fonts/#iconfont"
  45. FontSize="14"
  46. Foreground="#FF23CACA"
  47. Text="&#xe64d;" />
  48. <!--<Path
  49. x:Name="Arrow"
  50. Grid.Column="1"
  51. HorizontalAlignment="Center"
  52. VerticalAlignment="Center"
  53. Data="M 0 0 6 6 12 0 Z"
  54. Fill="#aa20FDFA"
  55. Stretch="None">
  56. <Path.Effect>
  57. <DropShadowEffect
  58. BlurRadius="10"
  59. Direction="90"
  60. Opacity="1"
  61. RenderingBias="Quality"
  62. ShadowDepth="0"
  63. Color="#aa20FDFA" />
  64. </Path.Effect>
  65. </Path>-->
  66. </Grid>
  67. <!--<ControlTemplate.Triggers>
  68. <Trigger Property="IsChecked" Value="true">
  69. <Setter TargetName="Arrow" Property="RenderTransform">
  70. <Setter.Value>
  71. <RotateTransform Angle="180" CenterX="6" CenterY="3" />
  72. </Setter.Value>
  73. </Setter>
  74. <Setter TargetName="Arrow" Property="Margin" Value="0,0,0,2" />
  75. </Trigger>
  76. </ControlTemplate.Triggers>-->
  77. </ControlTemplate>
  78. <!--#region 按钮样式-->
  79. <Style x:Key="ButtonStyle" TargetType="Button">
  80. <Setter Property="Foreground" Value="#00c2f4" />
  81. <Setter Property="FontSize" Value="18" />
  82. <Setter Property="Width" Value="100" />
  83. <Setter Property="Template">
  84. <Setter.Value>
  85. <ControlTemplate TargetType="Button">
  86. <Border
  87. Name="TitleBarBr"
  88. Background="Transparent"
  89. BorderBrush="#00c2f4"
  90. BorderThickness="2"
  91. CornerRadius="10">
  92. <ContentPresenter
  93. Margin="{TemplateBinding Margin}"
  94. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  95. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  96. </Border>
  97. <ControlTemplate.Triggers>
  98. <Trigger Property="IsMouseOver" Value="true">
  99. <Setter TargetName="TitleBarBr" Property="Background" Value="#3300c2f4" />
  100. </Trigger>
  101. </ControlTemplate.Triggers>
  102. </ControlTemplate>
  103. </Setter.Value>
  104. </Setter>
  105. </Style>
  106. <Style x:Key="ComboBoxStyle" TargetType="{x:Type ComboBox}">
  107. <Setter Property="BorderThickness" Value="0" />
  108. <Setter Property="ItemContainerStyle">
  109. <Setter.Value>
  110. <Style TargetType="ComboBoxItem">
  111. <Setter Property="Height" Value="25" />
  112. <Setter Property="Template">
  113. <Setter.Value>
  114. <ControlTemplate TargetType="{x:Type ComboBoxItem}">
  115. <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
  116. <Border x:Name="_borderbg" Background="Transparent" />
  117. <TextBlock
  118. x:Name="_txt"
  119. Margin="3,0,3,0"
  120. HorizontalAlignment="Center"
  121. VerticalAlignment="Center"
  122. Foreground="#DDD"
  123. Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
  124. <Border
  125. x:Name="_border"
  126. Background="#103153"
  127. Opacity="0" />
  128. </Grid>
  129. <ControlTemplate.Triggers>
  130. <Trigger Property="IsSelected" Value="true">
  131. <Setter TargetName="_txt" Property="Foreground" Value="{StaticResource ComboBoxSelectedForeground}" />
  132. <Setter TargetName="_borderbg" Property="Background" Value="{StaticResource ComboBoxSelectdBackground}" />
  133. </Trigger>
  134. <MultiTrigger>
  135. <MultiTrigger.Conditions>
  136. <Condition Property="IsSelected" Value="false" />
  137. <Condition Property="IsMouseOver" Value="true" />
  138. </MultiTrigger.Conditions>
  139. <Setter TargetName="_borderbg" Property="Background" Value="{StaticResource ComboBoxMouseOverBackground}" />
  140. <Setter TargetName="_txt" Property="Foreground" Value="{StaticResource ComboBoxMouseOverForegrond}" />
  141. </MultiTrigger>
  142. </ControlTemplate.Triggers>
  143. </ControlTemplate>
  144. </Setter.Value>
  145. </Setter>
  146. </Style>
  147. </Setter.Value>
  148. </Setter>
  149. <Setter Property="Template">
  150. <Setter.Value>
  151. <ControlTemplate TargetType="{x:Type ComboBox}">
  152. <Grid>
  153. <Grid.ColumnDefinitions>
  154. <ColumnDefinition Width="0.7*" />
  155. <ColumnDefinition Width="0.3*" MaxWidth="30" />
  156. </Grid.ColumnDefinitions>
  157. <Border
  158. x:Name="_prybr"
  159. Grid.Column="0"
  160. Grid.ColumnSpan="2"
  161. BorderBrush="{TemplateBinding BorderBrush}"
  162. BorderThickness="{TemplateBinding BorderThickness}"
  163. CornerRadius="0" />
  164. <ContentPresenter
  165. x:Name="ContentSite"
  166. Margin="3,3,0,3"
  167. HorizontalAlignment="Center"
  168. VerticalAlignment="Center"
  169. Content="{TemplateBinding SelectionBoxItem}"
  170. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  171. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  172. IsHitTestVisible="False" />
  173. <!-- ToggleButton 已数据绑定到 ComboBox 本身以切换 IsDropDownOpen -->
  174. <ToggleButton
  175. x:Name="ToggleButton"
  176. Grid.Column="0"
  177. Grid.ColumnSpan="2"
  178. ClickMode="Press"
  179. Focusable="false"
  180. IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  181. Template="{StaticResource ComboBoxToggleButton}" />
  182. <!-- 必须将 TextBox 命名为 PART_EditableTextBox,否则 ComboBox 将无法识别它 -->
  183. <TextBox
  184. x:Name="PART_EditableTextBox"
  185. Margin="2,0,0,0"
  186. VerticalAlignment="Center"
  187. Background="Transparent"
  188. BorderThickness="0"
  189. Focusable="True"
  190. IsReadOnly="{TemplateBinding IsReadOnly}"
  191. Visibility="Hidden" />
  192. <!-- Popup 可显示 ComboBox 中的项列表。IsOpen 已数据绑定到通过 ComboBoxToggleButton 来切换的 IsDropDownOpen -->
  193. <Popup
  194. x:Name="Popup"
  195. AllowsTransparency="True"
  196. Focusable="False"
  197. IsOpen="{TemplateBinding IsDropDownOpen}"
  198. Placement="Bottom"
  199. PopupAnimation="Slide">
  200. <Grid
  201. x:Name="DropDown"
  202. MinWidth="{TemplateBinding ActualWidth}"
  203. MaxHeight="150"
  204. SnapsToDevicePixels="True">
  205. <Border
  206. x:Name="DropDownBorder"
  207. BorderBrush="#3ba7f2"
  208. BorderThickness="0" />
  209. <ScrollViewer
  210. Margin="1"
  211. CanContentScroll="True"
  212. HorizontalScrollBarVisibility="Auto"
  213. SnapsToDevicePixels="True"
  214. VerticalScrollBarVisibility="Auto">
  215. <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
  216. <!-- 一下可以设置列表背景色 -->
  217. <StackPanel
  218. Background="#103153"
  219. IsItemsHost="True"
  220. KeyboardNavigation.DirectionalNavigation="Contained" />
  221. </ScrollViewer>
  222. </Grid>
  223. </Popup>
  224. </Grid>
  225. <ControlTemplate.Triggers>
  226. <Trigger Property="IsEditable" Value="true">
  227. <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
  228. </Trigger>
  229. <Trigger Property="IsMouseOver" Value="True">
  230. <Setter TargetName="_prybr" Property="BorderBrush" Value="#aa3ba7f2" />
  231. <!--<Setter Property="Background" Value="#553ba7f2" TargetName="_prybr"/>-->
  232. </Trigger>
  233. </ControlTemplate.Triggers>
  234. </ControlTemplate>
  235. </Setter.Value>
  236. </Setter>
  237. </Style>
  238. <!--#endregion-->
  239. </ResourceDictionary>
  240. </ResourceDictionary.MergedDictionaries>
  241. </ResourceDictionary>
  242. </UserControl.Resources>
  243. <Grid>
  244. <Grid.Resources>
  245. <Style TargetType="TextBlock">
  246. <Setter Property="HorizontalAlignment" Value="Left" />
  247. <Setter Property="VerticalAlignment" Value="Center" />
  248. </Style>
  249. </Grid.Resources>
  250. <Grid.RowDefinitions>
  251. <RowDefinition />
  252. <RowDefinition Height="300"/>
  253. </Grid.RowDefinitions>
  254. <!--#region 乐百机器人控制-->
  255. <GroupBox
  256. BorderBrush="#3aa7f3"
  257. BorderThickness="2"
  258. FontFamily="楷体"
  259. FontSize="20"
  260. Foreground="Aqua"
  261. Header=" 乐百机器人控制 "
  262. Style="{DynamicResource GroupBoxStyle1}">
  263. <Grid>
  264. <Grid.RowDefinitions>
  265. <RowDefinition Height="50" />
  266. <RowDefinition />
  267. </Grid.RowDefinitions>
  268. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  269. <Button
  270. Width="130"
  271. Margin="10,0,10,0"
  272. Command="{s:Action SimIceCream}"
  273. Content="冰淇淋模拟"
  274. Style="{StaticResource ButtonStyle}" />
  275. <Button
  276. Width="130"
  277. Margin="10,0,10,0"
  278. s:View.ActionTarget="{Binding}"
  279. Command="{s:Action SimCoffee}"
  280. Content="咖啡模拟"
  281. Style="{StaticResource ButtonStyle}" />
  282. </StackPanel>
  283. <StackPanel Grid.Row="1" Margin="0,10,0,0" Orientation="Vertical">
  284. <Grid HorizontalAlignment="Left">
  285. <Grid.ColumnDefinitions>
  286. <ColumnDefinition Width="*"></ColumnDefinition>
  287. <ColumnDefinition Width="100"></ColumnDefinition>
  288. <ColumnDefinition Width="*"></ColumnDefinition>
  289. <ColumnDefinition Width="100"></ColumnDefinition>
  290. <ColumnDefinition Width="*"></ColumnDefinition>
  291. <ColumnDefinition Width="100"></ColumnDefinition>
  292. </Grid.ColumnDefinitions>
  293. <Grid.RowDefinitions>
  294. <RowDefinition></RowDefinition>
  295. <RowDefinition></RowDefinition>
  296. </Grid.RowDefinitions>
  297. <TextBlock>机器人连接状态</TextBlock>
  298. <TextBlock Margin="10,0,0,0" Grid.Column="1" Text="{Binding RobotConnected}"></TextBlock>
  299. <TextBlock Grid.Column="2">冰淇淋机连接状态</TextBlock>
  300. <TextBlock Margin="10,0,0,0" Grid.Column="3" Text="{Binding IceCreamConnected}"></TextBlock>
  301. <TextBlock Grid.Column="4">咖啡机连接状态</TextBlock>
  302. <TextBlock Margin="10,0,0,0" Grid.Column="5" Text="{Binding CoffeeConnected}"></TextBlock>
  303. <TextBlock Grid.Row="1">测距(是否有物)</TextBlock>
  304. <TextBlock Grid.Row="1" Margin="10,0,0,0" Grid.Column="1" Text="{Binding HasArticle}"></TextBlock>
  305. <TextBlock Grid.Row="1" Grid.Column="2">测距(距离)</TextBlock>
  306. <TextBlock Grid.Row="1" Margin="10,0,0,0" Grid.Column="3" Text="{Binding ArticleDist}"></TextBlock>
  307. </Grid>
  308. </StackPanel>
  309. </Grid>
  310. </GroupBox>
  311. <!--#endregion-->
  312. <Grid Grid.Row="1">
  313. <Grid.ColumnDefinitions>
  314. <ColumnDefinition />
  315. <ColumnDefinition />
  316. </Grid.ColumnDefinitions>
  317. <!--#region 冰淇淋机-->
  318. <GroupBox
  319. BorderBrush="#3aa7f3"
  320. BorderThickness="2"
  321. FontFamily="楷体"
  322. FontSize="20"
  323. Foreground="Aqua"
  324. Header=" 冰淇淋控制 "
  325. Style="{DynamicResource GroupBoxStyle1}">
  326. <StackPanel Orientation="Vertical">
  327. <StackPanel.Resources>
  328. <Style TargetType="StackPanel">
  329. <Setter Property="Margin" Value="5"></Setter>
  330. </Style>
  331. </StackPanel.Resources>
  332. <StackPanel Orientation="Horizontal">
  333. <Button Content="1号口开" s:View.ActionTarget="{Binding}" Command="{s:Action OpenSE1}" Style="{StaticResource ButtonStyle}"></Button>
  334. <Button Content="1号口关" s:View.ActionTarget="{Binding}" Command="{s:Action CloseSE1}" Style="{StaticResource ButtonStyle}"></Button>
  335. </StackPanel>
  336. <StackPanel Orientation="Horizontal">
  337. <Button Content="2号口开" s:View.ActionTarget="{Binding}" Command="{s:Action OpenSE2}" Style="{StaticResource ButtonStyle}"></Button>
  338. <Button Content="2号口关" s:View.ActionTarget="{Binding}" Command="{s:Action CloseSE2}" Style="{StaticResource ButtonStyle}"></Button>
  339. </StackPanel>
  340. <StackPanel Orientation="Horizontal">
  341. <Button Content="3号口开" s:View.ActionTarget="{Binding}" Command="{s:Action OpenSE3}" Style="{StaticResource ButtonStyle}"></Button>
  342. <Button Content="3号口关" s:View.ActionTarget="{Binding}" Command="{s:Action CloseSE3}" Style="{StaticResource ButtonStyle}"></Button>
  343. </StackPanel>
  344. <StackPanel Orientation="Horizontal">
  345. <Button Content="转筒转动" s:View.ActionTarget="{Binding}" Command="{s:Action TurnRoll}" Style="{StaticResource ButtonStyle}"></Button>
  346. <Button Content="停止转筒转动" s:View.ActionTarget="{Binding}" Command="{s:Action StopTurnRoll}" Style="{StaticResource ButtonStyle}"></Button>
  347. </StackPanel>
  348. <StackPanel Orientation="Horizontal">
  349. <Button Content="完整制作流程" s:View.ActionTarget="{Binding}" Command="{s:Action MakeIceCreamBySE1}" Style="{StaticResource ButtonStyle}"></Button>
  350. </StackPanel>
  351. <StackPanel Orientation="Horizontal">
  352. <Button Content="存在物" s:View.ActionTarget="{Binding}" Command="{s:Action DoHasArticle}" Style="{StaticResource ButtonStyle}"></Button>
  353. <Button Content="测距" s:View.ActionTarget="{Binding}" Command="{s:Action DoArticleDist}" Style="{StaticResource ButtonStyle}"></Button>
  354. </StackPanel>
  355. <!--<Grid.RowDefinitions>
  356. <RowDefinition />
  357. <RowDefinition />
  358. </Grid.RowDefinitions>
  359. <Grid>
  360. <Grid.RowDefinitions>
  361. <RowDefinition />
  362. <RowDefinition />
  363. <RowDefinition />
  364. <RowDefinition />
  365. </Grid.RowDefinitions>
  366. <Grid.ColumnDefinitions>
  367. <ColumnDefinition Width="120" />
  368. <ColumnDefinition Width="100" />
  369. <ColumnDefinition Width="120" />
  370. <ColumnDefinition Width="100" />
  371. </Grid.ColumnDefinitions>
  372. <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
  373. <TextBlock
  374. Grid.Row="0"
  375. Grid.Column="1"
  376. Text="{Binding YLWD}" />
  377. <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
  378. <TextBlock
  379. Grid.Row="0"
  380. Grid.Column="3"
  381. Text="{Binding HQWD}" />
  382. <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
  383. <TextBlock
  384. Grid.Row="1"
  385. Grid.Column="1"
  386. Text="{Binding HJWD}" />
  387. <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
  388. <TextBlock
  389. Grid.Row="1"
  390. Grid.Column="3"
  391. Text="{Binding CurrentMode}" />
  392. <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
  393. <TextBlock
  394. Grid.Row="2"
  395. Grid.Column="1"
  396. Text="{Binding DL}" />
  397. <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
  398. <TextBlock
  399. Grid.Row="2"
  400. Grid.Column="3"
  401. Text="{Binding DY}" />
  402. <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
  403. <TextBlock
  404. Grid.Row="3"
  405. Grid.Column="1"
  406. Text="{Binding CXB}" />
  407. <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
  408. <TextBlock
  409. Grid.Row="3"
  410. Grid.Column="3"
  411. Text="{Binding IceCreamFault}" />
  412. </Grid>
  413. <StackPanel Grid.Row="1" Orientation="Vertical">
  414. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  415. <TextBlock>饮品</TextBlock>
  416. <Button
  417. s:View.ActionTarget="{Binding}"
  418. Command="{s:Action MakeIceCream}"
  419. Content="制作" />
  420. </StackPanel>
  421. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  422. <TextBlock>模式</TextBlock>
  423. <ComboBox
  424. Width="100"
  425. ItemsSource="{Binding IceCreamModes}"
  426. SelectedItem="{Binding SelecteIceCreamdMode}" />
  427. <Button
  428. s:View.ActionTarget="{Binding}"
  429. Command="{s:Action SetIceCreamModel}"
  430. Content="设置" />
  431. </StackPanel>
  432. </StackPanel>-->
  433. </StackPanel>
  434. </GroupBox>
  435. <!--#endregion-->
  436. <!--#region 咖啡机-->
  437. <GroupBox
  438. Grid.Column="1"
  439. BorderBrush="#3aa7f3"
  440. BorderThickness="2"
  441. FontFamily="楷体"
  442. FontSize="20"
  443. Foreground="Aqua"
  444. Header=" 咖啡机控制 "
  445. Style="{DynamicResource GroupBoxStyle1}">
  446. <Grid>
  447. <Grid.RowDefinitions>
  448. <RowDefinition />
  449. <RowDefinition />
  450. </Grid.RowDefinitions>
  451. <Grid>
  452. <Grid.Resources>
  453. <Style TargetType="TextBlock">
  454. <Setter Property="HorizontalAlignment" Value="Left" />
  455. <Setter Property="VerticalAlignment" Value="Center" />
  456. </Style>
  457. </Grid.Resources>
  458. <Grid.RowDefinitions>
  459. <RowDefinition />
  460. <RowDefinition />
  461. </Grid.RowDefinitions>
  462. <Grid.ColumnDefinitions>
  463. <ColumnDefinition Width="120" />
  464. <ColumnDefinition Width="100" />
  465. <ColumnDefinition Width="120" />
  466. <ColumnDefinition Width="150" />
  467. </Grid.ColumnDefinitions>
  468. <TextBlock Grid.Row="0" Grid.Column="0">咖啡机状态</TextBlock>
  469. <TextBlock
  470. Grid.Row="0"
  471. Grid.Column="1"
  472. Text="{Binding CoffeeStatus}" />
  473. <TextBlock Grid.Row="0" Grid.Column="2">应用状态</TextBlock>
  474. <TextBlock
  475. Grid.Row="0"
  476. Grid.Column="3"
  477. Text="{Binding AppStatus}" />
  478. <TextBlock Grid.Row="1" Grid.Column="0">告警信息</TextBlock>
  479. <TextBlock
  480. Grid.Row="1"
  481. Grid.Column="1"
  482. Text="{Binding Warning}" />
  483. <TextBlock Grid.Row="1" Grid.Column="2">故障信息</TextBlock>
  484. <TextBlock
  485. Grid.Row="1"
  486. Grid.Column="3"
  487. Text="{Binding CaffeeFault}" />
  488. </Grid>
  489. <StackPanel Grid.Row="1" Orientation="Vertical">
  490. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  491. <TextBlock>饮品</TextBlock>
  492. <ComboBox
  493. Width="100"
  494. ItemsSource="{Binding Coffees}"
  495. SelectedItem="{Binding SelectedCoffee}" Style="{DynamicResource ComboBoxStyle}" />
  496. <Button
  497. s:View.ActionTarget="{Binding}"
  498. Command="{s:Action MakeCoffee}"
  499. Style="{StaticResource ButtonStyle}"
  500. Content="制作" />
  501. <Button
  502. s:View.ActionTarget="{Binding}"
  503. Command="{s:Action StopMakeCoffee}"
  504. Style="{StaticResource ButtonStyle}"
  505. Content="停止制作" />
  506. </StackPanel>
  507. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  508. <TextBlock>模式</TextBlock>
  509. <ComboBox
  510. Width="100"
  511. ItemsSource="{Binding CoffeeCmds}"
  512. SelectedItem="{Binding SelectedCoffeeCmd}" Style="{DynamicResource ComboBoxStyle}" />
  513. <Button
  514. s:View.ActionTarget="{Binding}"
  515. Command="{s:Action SetCoffeeModel}"
  516. Style="{StaticResource ButtonStyle}"
  517. Content="设置" />
  518. </StackPanel>
  519. </StackPanel>
  520. </Grid>
  521. </GroupBox>
  522. <!--#endregion-->
  523. </Grid>
  524. <!--<GroupBox
  525. Grid.Row="1"
  526. Grid.Column="0"
  527. Header="冰淇淋机">
  528. <Grid>
  529. <Grid.RowDefinitions>
  530. <RowDefinition />
  531. <RowDefinition />
  532. </Grid.RowDefinitions>
  533. <Grid>
  534. <Grid.RowDefinitions>
  535. <RowDefinition />
  536. <RowDefinition />
  537. <RowDefinition />
  538. <RowDefinition />
  539. </Grid.RowDefinitions>
  540. <Grid.ColumnDefinitions>
  541. <ColumnDefinition Width="120" />
  542. <ColumnDefinition Width="100" />
  543. <ColumnDefinition Width="120" />
  544. <ColumnDefinition Width="100" />
  545. </Grid.ColumnDefinitions>
  546. <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
  547. <TextBlock
  548. Grid.Row="0"
  549. Grid.Column="1"
  550. Text="{Binding YLWD}" />
  551. <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
  552. <TextBlock
  553. Grid.Row="0"
  554. Grid.Column="3"
  555. Text="{Binding HQWD}" />
  556. <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
  557. <TextBlock
  558. Grid.Row="1"
  559. Grid.Column="1"
  560. Text="{Binding HJWD}" />
  561. <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
  562. <TextBlock
  563. Grid.Row="1"
  564. Grid.Column="3"
  565. Text="{Binding CurrentMode}" />
  566. <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
  567. <TextBlock
  568. Grid.Row="2"
  569. Grid.Column="1"
  570. Text="{Binding DL}" />
  571. <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
  572. <TextBlock
  573. Grid.Row="2"
  574. Grid.Column="3"
  575. Text="{Binding DY}" />
  576. <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
  577. <TextBlock
  578. Grid.Row="3"
  579. Grid.Column="1"
  580. Text="{Binding CXB}" />
  581. <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
  582. <TextBlock
  583. Grid.Row="3"
  584. Grid.Column="3"
  585. Text="{Binding IceCreamFault}" />
  586. </Grid>
  587. <StackPanel Grid.Row="1" Orientation="Vertical">
  588. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  589. <TextBlock>饮品</TextBlock>
  590. <Button
  591. s:View.ActionTarget="{Binding}"
  592. Command="{s:Action MakeIceCream}"
  593. Content="制作" />
  594. </StackPanel>
  595. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  596. <TextBlock>模式</TextBlock>
  597. <ComboBox
  598. Width="100"
  599. ItemsSource="{Binding IceCreamModes}"
  600. SelectedItem="{Binding SelecteIceCreamdMode}" />
  601. <Button
  602. s:View.ActionTarget="{Binding}"
  603. Command="{s:Action SetIceCreamModel}"
  604. Content="设置" />
  605. </StackPanel>
  606. </StackPanel>
  607. </Grid>
  608. </GroupBox>-->
  609. <!--<GroupBox
  610. Grid.Row="1"
  611. Grid.Column="1"
  612. Header="咖啡机">
  613. <Grid>
  614. <Grid.RowDefinitions>
  615. <RowDefinition />
  616. <RowDefinition />
  617. </Grid.RowDefinitions>
  618. <Grid>
  619. <Grid.Resources>
  620. <Style TargetType="TextBlock">
  621. <Setter Property="HorizontalAlignment" Value="Left" />
  622. <Setter Property="VerticalAlignment" Value="Center" />
  623. </Style>
  624. </Grid.Resources>
  625. <Grid.RowDefinitions>
  626. <RowDefinition />
  627. <RowDefinition />
  628. </Grid.RowDefinitions>
  629. <Grid.ColumnDefinitions>
  630. <ColumnDefinition Width="120" />
  631. <ColumnDefinition Width="100" />
  632. <ColumnDefinition Width="120" />
  633. <ColumnDefinition Width="150" />
  634. </Grid.ColumnDefinitions>
  635. <TextBlock Grid.Row="0" Grid.Column="0">咖啡机状态</TextBlock>
  636. <TextBlock
  637. Grid.Row="0"
  638. Grid.Column="1"
  639. Text="{Binding CoffeeStatus}" />
  640. <TextBlock Grid.Row="0" Grid.Column="2">应用状态</TextBlock>
  641. <TextBlock
  642. Grid.Row="0"
  643. Grid.Column="3"
  644. Text="{Binding AppStatus}" />
  645. <TextBlock Grid.Row="1" Grid.Column="0">告警信息</TextBlock>
  646. <TextBlock
  647. Grid.Row="1"
  648. Grid.Column="1"
  649. Text="{Binding Warning}" />
  650. <TextBlock Grid.Row="1" Grid.Column="2">故障信息</TextBlock>
  651. <TextBlock
  652. Grid.Row="1"
  653. Grid.Column="3"
  654. Text="{Binding CaffeeFault}" />
  655. </Grid>
  656. <StackPanel Grid.Row="1" Orientation="Vertical">
  657. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  658. <TextBlock>饮品</TextBlock>
  659. <ComboBox
  660. Width="100"
  661. ItemsSource="{Binding Coffees}"
  662. SelectedItem="{Binding SelectedCoffee}" />
  663. <Button
  664. s:View.ActionTarget="{Binding}"
  665. Command="{s:Action MakeCoffee}"
  666. Content="制作" />
  667. <Button
  668. s:View.ActionTarget="{Binding}"
  669. Command="{s:Action StopMakeCoffee}"
  670. Content="停止制作" />
  671. </StackPanel>
  672. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  673. <TextBlock>模式</TextBlock>
  674. <ComboBox
  675. Width="100"
  676. ItemsSource="{Binding CoffeeCmds}"
  677. SelectedItem="{Binding SelectedCoffeeCmd}" />
  678. <Button
  679. s:View.ActionTarget="{Binding}"
  680. Command="{s:Action SetCoffeeModel}"
  681. Content="设置" />
  682. </StackPanel>
  683. </StackPanel>
  684. </Grid>
  685. </GroupBox>-->
  686. </Grid>
  687. </UserControl>