终端一体化运控平台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

440 rader
23 KiB

  1. <UserControl x:Class="BPASmartClient.MorkT_BarCounter.View.DebugView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:vm="clr-namespace:BPASmartClient.MorkT_BarCounter.ViewModel"
  7. mc:Ignorable="d"
  8. Name="调试界面"
  9. d:DesignHeight="500" d:DesignWidth="1000" Unloaded="Dubug_Unloaded">
  10. <UserControl.DataContext>
  11. <vm:DebugViewModel/>
  12. </UserControl.DataContext>
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <ResourceDictionary.MergedDictionaries>
  16. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  18. </ResourceDictionary.MergedDictionaries>
  19. </ResourceDictionary>
  20. </UserControl.Resources>
  21. <Grid Grid.ColumnSpan="2">
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="10*"/>
  24. <ColumnDefinition Width="10*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="10*"/>
  28. <RowDefinition Height="10*"/>
  29. <RowDefinition Height="15*"/>
  30. </Grid.RowDefinitions>
  31. <Border BorderThickness="0,0,1,1" BorderBrush="DodgerBlue" Grid.Row="0" Grid.Column="0"></Border>
  32. <Border BorderThickness="0,0,1,1" BorderBrush="DodgerBlue" Grid.Row="1" Grid.Column="0"></Border>
  33. <Border BorderThickness="0,0,1,0" BorderBrush="DodgerBlue" Grid.Row="2" Grid.Column="0"></Border>
  34. <Border BorderThickness="0,0,0,1" BorderBrush="DodgerBlue" Grid.Row="0" Grid.Column="1"></Border>
  35. <Border BorderThickness="0,0,0,1" BorderBrush="DodgerBlue" Grid.Row="1" Grid.Column="1"></Border>
  36. <Border BorderThickness="0,0,0,0" BorderBrush="DodgerBlue" Grid.Row="2" Grid.Column="1"></Border>
  37. <GroupBox Grid.Row="0" Grid.Column="0"
  38. FontFamily="楷体"
  39. FontSize="20"
  40. Header=" 乐白机器人 ">
  41. <Grid>
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition></ColumnDefinition>
  44. <ColumnDefinition></ColumnDefinition>
  45. </Grid.ColumnDefinitions>
  46. <Grid.RowDefinitions>
  47. <RowDefinition Height="1*"/>
  48. <RowDefinition Height="1*"/>
  49. <RowDefinition Height="1*"/>
  50. </Grid.RowDefinitions>
  51. <Grid Grid.Row="0">
  52. <StackPanel Orientation="Horizontal">
  53. <TextBlock Text="连接状态:" />
  54. <TextBlock Text="{Binding RobotConnected}"
  55. Margin="40,0"/>
  56. </StackPanel>
  57. </Grid>
  58. <Grid Grid.Row="1">
  59. <StackPanel Orientation="Horizontal">
  60. <TextBlock Text="当前模式:" Margin="0,1"/>
  61. <TextBlock Text="{Binding RobotMode}"
  62. Margin="40,0"/>
  63. </StackPanel>
  64. </Grid>
  65. <Grid Grid.Row="2">
  66. <DockPanel>
  67. <Button Content="启动" Width="50" Height="40"
  68. Command="{Binding Button_RobotControlCommand}"
  69. CommandParameter="机器人启动">
  70. </Button>
  71. <Button Content="暂停" Width="50" Height="40"
  72. Command="{Binding Button_RobotControlCommand}"
  73. CommandParameter="暂停"/>
  74. <Button Content="恢复" Width="50" Height="40"
  75. Command="{Binding Button_RobotControlCommand}"
  76. CommandParameter="恢复"/>
  77. <Button Content="急停" Width="50" Height="40"
  78. Command="{Binding Button_RobotControlCommand}"
  79. CommandParameter="机器人急停"/>
  80. </DockPanel>
  81. </Grid>
  82. <Grid Grid.Row="0" Grid.Column="1" >
  83. <StackPanel Orientation="Horizontal" >
  84. <TextBlock>TCP DI:</TextBlock>
  85. <CheckBox IsEnabled="false" IsChecked="{Binding Robot_TCPDI0}" FontSize="14">DI0</CheckBox>
  86. </StackPanel>
  87. </Grid>
  88. <Grid Grid.Row="1" Grid.Column="1" >
  89. <StackPanel Orientation="Horizontal" >
  90. <TextBlock>DI:</TextBlock>
  91. <CheckBox IsEnabled="false" Name="Robot_DI0" FontSize="14" IsChecked="{Binding Robot_DI0}">DI0</CheckBox>
  92. <CheckBox IsEnabled="false" Name="Robot_DI1" FontSize="14" IsChecked="{Binding Robot_DI1}">DI1</CheckBox>
  93. <CheckBox IsEnabled="false" Name="Robot_DI2" FontSize="14" IsChecked="{Binding Robot_DI2}">DI2</CheckBox>
  94. <CheckBox IsEnabled="false" Name="Robot_DI3" FontSize="14" IsChecked="{Binding Robot_DI3}">DI3</CheckBox>
  95. </StackPanel>
  96. </Grid>
  97. <Grid Grid.Row="2" Grid.Column="1">
  98. <StackPanel Orientation="Horizontal" >
  99. <TextBlock>DO:</TextBlock>
  100. <ComboBox SelectedIndex="{Binding Robot_DOutput_Pin}">
  101. <ComboBoxItem IsSelected="true">DO0</ComboBoxItem>
  102. <ComboBoxItem>DO1</ComboBoxItem>
  103. <ComboBoxItem>DO2</ComboBoxItem>
  104. <ComboBoxItem>DO3</ComboBoxItem>
  105. </ComboBox>
  106. <ComboBox SelectedIndex="{Binding Robot_DOutput_Value}">
  107. <ComboBoxItem IsSelected="true">true</ComboBoxItem>
  108. <ComboBoxItem>false</ComboBoxItem>
  109. </ComboBox>
  110. <Button Content="输出" Command="{Binding Robot_DOutput}"/>
  111. </StackPanel>
  112. </Grid>
  113. </Grid>
  114. </GroupBox>
  115. <GroupBox Grid.Row="1" Grid.Column="0"
  116. Header="单片机控制"
  117. FontSize="18"
  118. FontFamily="楷体">
  119. <Grid>
  120. <Grid.RowDefinitions>
  121. <RowDefinition></RowDefinition>
  122. <RowDefinition></RowDefinition>
  123. <RowDefinition></RowDefinition>
  124. </Grid.RowDefinitions>
  125. <Grid.ColumnDefinitions>
  126. <ColumnDefinition></ColumnDefinition>
  127. </Grid.ColumnDefinitions>
  128. <Grid Grid.Row="0">
  129. <StackPanel Orientation="Horizontal">
  130. <TextBlock >连接状态:</TextBlock>
  131. <TextBlock Text="{Binding MCUConnected}" />
  132. </StackPanel>
  133. </Grid>
  134. <Grid Grid.Row="1">
  135. <StackPanel Orientation="Horizontal">
  136. <TextBlock FontSize="12">DI:</TextBlock>
  137. <CheckBox FontSize="12" IsEnabled="false" IsChecked="{Binding CH0}">DI0</CheckBox>
  138. <CheckBox FontSize="12" IsEnabled="false" Name="CH1">DI1</CheckBox>
  139. <CheckBox FontSize="12" IsEnabled="false" Name="CH2">DI2</CheckBox>
  140. <CheckBox FontSize="12" IsEnabled="false" Name="CH3">DI3</CheckBox>
  141. <CheckBox FontSize="12" IsEnabled="false" Name="CH4">DI4</CheckBox>
  142. <CheckBox FontSize="12" IsEnabled="false" Name="CH5">DI5</CheckBox>
  143. <CheckBox FontSize="12" IsEnabled="false" Name="CH6">DI6</CheckBox>
  144. <CheckBox FontSize="12" IsEnabled="false" Name="CH7">DI7</CheckBox>
  145. </StackPanel>
  146. </Grid>
  147. <Grid Grid.Row="2" Grid.Column="0">
  148. <Grid.ColumnDefinitions>
  149. <ColumnDefinition></ColumnDefinition>
  150. <ColumnDefinition></ColumnDefinition>
  151. </Grid.ColumnDefinitions>
  152. <Grid Grid.Column="0">
  153. <StackPanel Orientation="Horizontal">
  154. <TextBlock FontSize="12" HorizontalAlignment="Center">DO输出</TextBlock>
  155. <ComboBox Width="50" FontSize="12" HorizontalAlignment="Center" SelectedIndex="{Binding MCU_DO_CH}">
  156. <ComboBoxItem IsSelected="true">DO0</ComboBoxItem>
  157. <ComboBoxItem>DO1</ComboBoxItem>
  158. <ComboBoxItem>DO2</ComboBoxItem>
  159. <ComboBoxItem>DO3</ComboBoxItem>
  160. <ComboBoxItem>DO4</ComboBoxItem>
  161. <ComboBoxItem>DO5</ComboBoxItem>
  162. <ComboBoxItem>DO6</ComboBoxItem>
  163. <ComboBoxItem>DO7</ComboBoxItem>
  164. </ComboBox>
  165. <ComboBox FontSize="12" HorizontalAlignment="Center" SelectedIndex="{Binding MCU_DO_CH}">
  166. <ComboBoxItem IsSelected="true">True</ComboBoxItem>
  167. <ComboBoxItem>False</ComboBoxItem>
  168. </ComboBox>
  169. <Button Width="50" Command="{Binding Button_MCUDOuputCommand}">输出</Button>
  170. </StackPanel>
  171. </Grid>
  172. <Grid Grid.Column="1">
  173. <StackPanel Orientation="Horizontal">
  174. <TextBlock FontSize="12" HorizontalAlignment="Center">舵机控制</TextBlock>
  175. <ComboBox Margin="0,0,0,0" FontSize="12" Width="60" SelectedIndex="{Binding MCU_PWM_CH}">
  176. <ComboBoxItem IsSelected="true">舵机1</ComboBoxItem>
  177. <ComboBoxItem>舵机2</ComboBoxItem>
  178. <ComboBoxItem>舵机3</ComboBoxItem>
  179. <ComboBoxItem>舵机4</ComboBoxItem>
  180. </ComboBox>
  181. <TextBox Width="50" Text="{Binding PWMInputNumber}"></TextBox>
  182. <Button FontSize="15" HorizontalAlignment="Center" Command="{Binding Button_MCUOuputCommand}">输出</Button>
  183. </StackPanel>
  184. </Grid>
  185. </Grid>
  186. </Grid>
  187. </GroupBox>
  188. <GroupBox Grid.Row="2" Grid.Column="0"
  189. FontFamily="楷体"
  190. FontSize="20"
  191. Header=" 果汁机 ">
  192. <Grid>
  193. <Grid.ColumnDefinitions>
  194. <ColumnDefinition Width="2*"/>
  195. <ColumnDefinition Width="5*"/>
  196. </Grid.ColumnDefinitions>
  197. <Grid.RowDefinitions>
  198. <RowDefinition Height="3*"/>
  199. <RowDefinition Height="3*"/>
  200. <RowDefinition Height="3*"/>
  201. </Grid.RowDefinitions>
  202. <Grid>
  203. <TextBlock Text="连接状态:" />
  204. </Grid>
  205. <Grid Grid.Column="1">
  206. <TextBlock Text="{Binding JuicerConnected}"
  207. Margin="120,0,0,0"/>
  208. </Grid>
  209. <Grid Grid.Row="1">
  210. <TextBlock Text="设备状态:" />
  211. </Grid>
  212. <Grid Grid.Column="1" Grid.Row="1">
  213. <StackPanel Orientation="Horizontal" >
  214. <Button IsEnabled="False" Command="{Binding JuiceState_Heating}" >制热</Button>
  215. <Button IsEnabled="False" Command="{Binding JuiceState_Cooling}" >制冷</Button>
  216. <Button IsEnabled="False" Command="{Binding JuiceState_LackOfWater}" >缺水</Button>
  217. <Button IsEnabled="False" Command="{Binding JuiceState_ChildLocks}" >童锁</Button>
  218. <Button IsEnabled="False" Command="{Binding JuiceState_Using}" >使用</Button>
  219. </StackPanel>
  220. </Grid>
  221. <Grid Grid.Row="2">
  222. <TextBlock>果汁:</TextBlock>
  223. </Grid>
  224. <Grid Grid.Column="1" Grid.Row="2">
  225. <StackPanel Orientation="Horizontal">
  226. <ComboBox SelectedItem="{Binding MakeJuice_Index}">
  227. <ComboBoxItem IsSelected="true">0</ComboBoxItem>
  228. <ComboBoxItem>1</ComboBoxItem>
  229. <ComboBoxItem>2</ComboBoxItem>
  230. <ComboBoxItem>3</ComboBoxItem>
  231. <ComboBoxItem>4</ComboBoxItem>
  232. <ComboBoxItem>5</ComboBoxItem>
  233. <ComboBoxItem>6</ComboBoxItem>
  234. <ComboBoxItem>7</ComboBoxItem>
  235. </ComboBox>
  236. <Button Command="{Binding Button_MakeJuiceCommand}" Content="制作" />
  237. </StackPanel>
  238. </Grid>
  239. </Grid>
  240. </GroupBox>
  241. <GroupBox Grid.Row="0" Grid.Column="1"
  242. Header="订单模拟"
  243. FontSize="18"
  244. FontFamily="楷体">
  245. <Grid>
  246. <Grid.ColumnDefinitions>
  247. <ColumnDefinition></ColumnDefinition>
  248. <ColumnDefinition></ColumnDefinition>
  249. </Grid.ColumnDefinitions>
  250. <Grid.RowDefinitions>
  251. <RowDefinition></RowDefinition>
  252. <RowDefinition></RowDefinition>
  253. </Grid.RowDefinitions>
  254. <Grid Grid.Row="0" Grid.Column="0">
  255. <StackPanel Orientation="Horizontal">
  256. <TextBlock>咖啡:</TextBlock>
  257. <ComboBox Margin="10,0"
  258. Width="100"
  259. ItemsSource="{Binding Coffees}"
  260. SelectedItem="{Binding SimOrderCoffeeList}" />
  261. <Button Command="{Binding SimOrderMakeCoffee}">制作</Button>
  262. </StackPanel>
  263. </Grid>
  264. <Grid Grid.Row="1" Grid.Column="0">
  265. <StackPanel Orientation="Horizontal">
  266. <TextBlock>果汁:</TextBlock>
  267. <ComboBox SelectedIndex="{Binding SimOrder_JuiceList}">
  268. <ComboBoxItem IsSelected="true" >饮品1</ComboBoxItem>
  269. <ComboBoxItem>饮品2</ComboBoxItem>
  270. <ComboBoxItem>饮品3</ComboBoxItem>
  271. <ComboBoxItem>饮品4</ComboBoxItem>
  272. </ComboBox>
  273. <ComboBox SelectedItem="{Binding SimOrder_JuiceMakeID}">
  274. <ComboBoxItem IsSelected="true">热饮</ComboBoxItem>
  275. <ComboBoxItem>常温</ComboBoxItem>
  276. <ComboBoxItem>冷饮</ComboBoxItem>
  277. </ComboBox>
  278. <Button Command="{Binding SimOrderMakeJuice}">制作</Button>
  279. </StackPanel>
  280. </Grid>
  281. <Grid Grid.Row="0" Grid.Column="1">
  282. <StackPanel Orientation="Horizontal">
  283. <TextBlock>开水:</TextBlock>
  284. <Button Command="{Binding SimOrderMakeWater}">制作</Button>
  285. </StackPanel>
  286. </Grid>
  287. <Grid Grid.Row="1" Grid.Column="1">
  288. <StackPanel Orientation="Horizontal">
  289. <TextBlock>茶水:</TextBlock>
  290. <Button Command="{Binding SimOrderMakeTea}">制作</Button>
  291. </StackPanel>
  292. </Grid>
  293. </Grid>
  294. </GroupBox>
  295. <GroupBox Grid.Row="1" Grid.Column="1"
  296. Header="制冰机控制"
  297. FontSize="18"
  298. FontFamily="楷体">
  299. <Grid>
  300. <Grid.ColumnDefinitions>
  301. <ColumnDefinition></ColumnDefinition>
  302. <ColumnDefinition></ColumnDefinition>
  303. </Grid.ColumnDefinitions>
  304. <Grid.RowDefinitions>
  305. <RowDefinition></RowDefinition>
  306. <RowDefinition></RowDefinition>
  307. <RowDefinition></RowDefinition>
  308. </Grid.RowDefinitions>
  309. <Grid Grid.Row="0">
  310. <StackPanel Orientation="Horizontal" >
  311. <TextBlock>连接状态:</TextBlock>
  312. <TextBlock Text="{Binding IceMakerConnected}" />
  313. </StackPanel>
  314. </Grid>
  315. <Grid Grid.Row="0" Grid.Column="1">
  316. <StackPanel Orientation="Horizontal">
  317. <Button Command="{Binding IceMaker_BtnPowerOn}">开机</Button>
  318. <Button Command="{Binding IceMaker_BtnStandby}">待机</Button>
  319. <Button Command="{Binding IceMaker_BtnPump}" >抽水</Button>
  320. </StackPanel>
  321. </Grid>
  322. <Grid Grid.Row="1" Grid.ColumnSpan="2">
  323. <StackPanel Orientation="Horizontal" >
  324. <TextBlock>设备状态:</TextBlock>
  325. <TextBlock Text="{Binding IceMakerState}" />
  326. <Button IsEnabled="False" Name="IceMaker_State1" >开机状态</Button>
  327. <Button IsEnabled="False" Name="IceMaker_State2" >待机状态</Button>
  328. <Button IsEnabled="False" Name="IceMaker_State3" >电机故障</Button>
  329. <Button IsEnabled="False" Name="IceMaker_State4" >冰满</Button>
  330. </StackPanel>
  331. </Grid>
  332. <Grid Grid.Row="2" Grid.Column="0">
  333. <StackPanel Orientation="Horizontal">
  334. <TextBlock>控制:</TextBlock>
  335. <Button Command="{Binding IceMaker_BtnStart}">开始出冰</Button>
  336. <Button Command="{Binding IceMaker_BtnEnd}">结束出冰</Button>
  337. </StackPanel>
  338. </Grid>
  339. <Grid Grid.Row="2" Grid.Column="01">
  340. <StackPanel Orientation="Horizontal" >
  341. <TextBlock>出冰时间:</TextBlock>
  342. <TextBox Width="50" Text="{Binding IceMaker_IceTime}"></TextBox>
  343. <TextBlock>s</TextBlock>
  344. <Button Command="{Binding IceMaker_BtnSetIceTime}">设置</Button>
  345. </StackPanel>
  346. </Grid>
  347. </Grid>
  348. </GroupBox>
  349. <GroupBox Grid.Row="2" Grid.Column="1"
  350. FontFamily="楷体"
  351. FontSize="20"
  352. Header=" 咖啡机">
  353. <Grid>
  354. <Grid.RowDefinitions>
  355. <RowDefinition />
  356. <RowDefinition />
  357. <RowDefinition />
  358. <RowDefinition />
  359. <RowDefinition />
  360. </Grid.RowDefinitions>
  361. <Grid.ColumnDefinitions>
  362. <ColumnDefinition></ColumnDefinition>
  363. <ColumnDefinition></ColumnDefinition>
  364. </Grid.ColumnDefinitions>
  365. <Grid Grid.Row="0">
  366. <TextBlock Text="连接状态" />
  367. </Grid>
  368. <Grid Grid.Row="0" Grid.Column="1">
  369. <TextBlock Text="{Binding CoffeeConnected}"/>
  370. </Grid>
  371. <Grid Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2">
  372. <Grid.Resources>
  373. <Style TargetType="TextBlock">
  374. <Setter Property="HorizontalAlignment" Value="Left" />
  375. <Setter Property="VerticalAlignment" Value="Center" />
  376. </Style>
  377. </Grid.Resources>
  378. <Grid.RowDefinitions>
  379. <RowDefinition />
  380. <RowDefinition />
  381. </Grid.RowDefinitions>
  382. <Grid.ColumnDefinitions>
  383. <ColumnDefinition Width="2*" />
  384. <ColumnDefinition Width="3*" />
  385. <ColumnDefinition Width="2*" />
  386. <ColumnDefinition Width="3*" />
  387. </Grid.ColumnDefinitions>
  388. <TextBlock Height="23" Width="100" FontSize="18" HorizontalAlignment="Center">咖啡机状态</TextBlock>
  389. <TextBlock FontSize="18"
  390. Grid.Column="1"
  391. Text="{Binding CoffeeStatus}" Height="23" />
  392. <TextBlock Grid.Column="2" Height="23" Width="80" FontSize="18">应用状态</TextBlock>
  393. <TextBlock FontSize="18"
  394. Grid.Column="3"
  395. Text="{Binding AppStatus}" Height="23"/>
  396. <TextBlock Grid.Row="1" Grid.Column="0" Height="22" Width="80" FontSize="18">告警信息</TextBlock>
  397. <TextBlock FontSize="15"
  398. Grid.Row="1"
  399. Grid.Column="1"
  400. Text="{Binding Warning}" />
  401. <TextBlock Grid.Row="1" Grid.Column="2" Height="22" Width="80" FontSize="18">故障信息</TextBlock>
  402. <TextBlock FontSize="18"
  403. Grid.Row="1"
  404. Grid.Column="3"
  405. Text="{Binding CaffeeFault}" Height="22" Width="60" />
  406. </Grid>
  407. <Grid Grid.Row="3" Grid.ColumnSpan="2">
  408. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  409. <TextBlock>饮品</TextBlock>
  410. <ComboBox Margin="10,0"
  411. Width="100"
  412. ItemsSource="{Binding Coffees}"
  413. SelectedItem="{Binding SelectedCoffee}" />
  414. <Button Margin="10,0"
  415. Command="{Binding Button_MakeCoffeeCommand }"
  416. Content="制作"/>
  417. <Button Margin="10,0"
  418. Command="{Binding Button_StopMakeCoffeCommand}"
  419. Content="停止制作"/>
  420. </StackPanel>
  421. </Grid>
  422. <Grid Grid.Row="4" Grid.ColumnSpan="2">
  423. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  424. <TextBlock>模式</TextBlock>
  425. <ComboBox Margin="10,0"
  426. Width="100"
  427. ItemsSource="{Binding CoffeeCmds}"
  428. SelectedItem="{Binding SelectedCoffeeCmd}"/>
  429. <Button Margin="10,0"
  430. Command="{Binding Button_CoffeeModeSetCommand}"
  431. Content="设置" Cursor="Hand"/>
  432. </StackPanel>
  433. </Grid>
  434. </Grid>
  435. </GroupBox>
  436. </Grid>
  437. </UserControl>