终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

444 rindas
24 KiB

  1. <UserControl x:Class="BPASmartClient.MorkT_Container.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_Container.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" Visibility="{Binding JuiceState_Heating}" >制热</Button>
  215. <Button IsEnabled="False" Visibility="{Binding JuiceState_Cooling}" >制冷</Button>
  216. <Button IsEnabled="False" Visibility="{Binding JuiceState_LackOfWater}" >缺水</Button>
  217. <Button IsEnabled="False" Visibility="{Binding JuiceState_ChildLocks}" >童锁</Button>
  218. <Button IsEnabled="False" Visibility="{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 IceMakerConnect}" />
  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. <Grid.ColumnDefinitions>
  324. <ColumnDefinition Width="22*"/>
  325. <ColumnDefinition Width="39*"/>
  326. </Grid.ColumnDefinitions>
  327. <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" >
  328. <TextBlock>设备状态:</TextBlock>
  329. <Button IsEnabled="False" Content="{Binding IceMakerState1}"></Button>
  330. <Button IsEnabled="False" Content="{Binding IceMakerState2}"></Button>
  331. <Button IsEnabled="False" Content="{Binding IceMakerState3}"></Button>
  332. <Button IsEnabled="False" Content="{Binding IceMakerState4}"></Button>
  333. <Button IsEnabled="False" Content="{Binding IceMakerState5}"></Button>
  334. </StackPanel>
  335. </Grid>
  336. <Grid Grid.Row="2" Grid.Column="0">
  337. <StackPanel Orientation="Horizontal">
  338. <TextBlock>控制:</TextBlock>
  339. <Button Command="{Binding IceMaker_BtnStart}">开始出冰</Button>
  340. <Button Command="{Binding IceMaker_BtnEnd}">结束出冰</Button>
  341. </StackPanel>
  342. </Grid>
  343. <Grid Grid.Row="2" Grid.Column="01">
  344. <StackPanel Orientation="Horizontal" >
  345. <TextBlock>出冰时间:</TextBlock>
  346. <TextBox Width="50" Text="{Binding IceMaker_IceTime}"></TextBox>
  347. <TextBlock>s</TextBlock>
  348. <Button Command="{Binding IceMaker_BtnSetIceTime}">设置</Button>
  349. </StackPanel>
  350. </Grid>
  351. </Grid>
  352. </GroupBox>
  353. <GroupBox Grid.Row="2" Grid.Column="1"
  354. FontFamily="楷体"
  355. FontSize="20"
  356. Header=" 咖啡机">
  357. <Grid>
  358. <Grid.RowDefinitions>
  359. <RowDefinition />
  360. <RowDefinition />
  361. <RowDefinition />
  362. <RowDefinition />
  363. <RowDefinition />
  364. </Grid.RowDefinitions>
  365. <Grid.ColumnDefinitions>
  366. <ColumnDefinition></ColumnDefinition>
  367. <ColumnDefinition></ColumnDefinition>
  368. </Grid.ColumnDefinitions>
  369. <Grid Grid.Row="0">
  370. <TextBlock Text="连接状态" />
  371. </Grid>
  372. <Grid Grid.Row="0" Grid.Column="1">
  373. <TextBlock Text="{Binding CoffeeConnected}" />
  374. </Grid>
  375. <Grid Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2">
  376. <Grid.Resources>
  377. <Style TargetType="TextBlock">
  378. <Setter Property="HorizontalAlignment" Value="Left" />
  379. <Setter Property="VerticalAlignment" Value="Center" />
  380. </Style>
  381. </Grid.Resources>
  382. <Grid.RowDefinitions>
  383. <RowDefinition />
  384. <RowDefinition />
  385. </Grid.RowDefinitions>
  386. <Grid.ColumnDefinitions>
  387. <ColumnDefinition Width="2*" />
  388. <ColumnDefinition Width="3*" />
  389. <ColumnDefinition Width="2*" />
  390. <ColumnDefinition Width="3*" />
  391. </Grid.ColumnDefinitions>
  392. <TextBlock Height="23" Width="100" FontSize="18">咖啡机状态</TextBlock>
  393. <TextBlock FontSize="18"
  394. Grid.Column="1"
  395. Text="{Binding CoffeeStatus}" Height="23" />
  396. <TextBlock Grid.Column="2" Height="23" Width="80" FontSize="18">应用状态</TextBlock>
  397. <TextBlock FontSize="18"
  398. Grid.Column="3"
  399. Text="{Binding AppStatus}" Height="23"/>
  400. <TextBlock Grid.Row="1" Grid.Column="0" Height="22" Width="80" FontSize="18">告警信息</TextBlock>
  401. <TextBlock FontSize="15"
  402. Grid.Row="1"
  403. Grid.Column="1"
  404. Text="{Binding Warning}" />
  405. <TextBlock Grid.Row="1" Grid.Column="2" Height="22" Width="80" FontSize="18">故障信息</TextBlock>
  406. <TextBlock FontSize="18"
  407. Grid.Row="1"
  408. Grid.Column="3"
  409. Text="{Binding CaffeeFault}" Height="22" Width="60" />
  410. </Grid>
  411. <Grid Grid.Row="3" Grid.ColumnSpan="2">
  412. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  413. <TextBlock>饮品</TextBlock>
  414. <ComboBox Margin="10,0"
  415. Width="100"
  416. ItemsSource="{Binding Coffees}"
  417. SelectedItem="{Binding SelectedCoffee}" />
  418. <Button Margin="10,0"
  419. Command="{Binding Button_MakeCoffeeCommand }"
  420. Content="制作"/>
  421. <Button Margin="10,0"
  422. Command="{Binding Button_StopMakeCoffeCommand}"
  423. Content="停止制作"/>
  424. </StackPanel>
  425. </Grid>
  426. <Grid Grid.Row="4" Grid.ColumnSpan="2">
  427. <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
  428. <TextBlock>模式</TextBlock>
  429. <ComboBox Margin="10,0"
  430. Width="100"
  431. ItemsSource="{Binding CoffeeCmds}"
  432. SelectedItem="{Binding SelectedCoffeeCmd}"/>
  433. <Button Margin="10,0"
  434. Command="{Binding Button_CoffeeModeSetCommand}"
  435. Content="设置" Cursor="Hand"/>
  436. </StackPanel>
  437. </Grid>
  438. </Grid>
  439. </GroupBox>
  440. </Grid>
  441. </UserControl>