终端一体化运控平台
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.
 
 
 

489 lines
19 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.HardwareStatusView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.JXJFoodBigStation.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  10. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  11. d:DesignHeight="1080"
  12. d:DesignWidth="1920"
  13. mc:Ignorable="d">
  14. <UserControl.DataContext>
  15. <vm:HardwareStatusViewModel />
  16. </UserControl.DataContext>
  17. <!--<Grid>
  18. <ListView
  19. Height="150"
  20. VerticalAlignment="Center"
  21. Background="Transparent"
  22. BorderThickness="0"
  23. ItemsSource="{Binding TopDeviceCurrentStatuses}"
  24. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  25. <ListView.ItemsPanel>
  26. <ItemsPanelTemplate>
  27. <UniformGrid
  28. HorizontalAlignment="Center"
  29. VerticalAlignment="Center"
  30. Columns="10" />
  31. </ItemsPanelTemplate>
  32. </ListView.ItemsPanel>
  33. <ListView.ItemTemplate>
  34. <DataTemplate>
  35. <Border Background="Transparent">
  36. <Grid Height="100">
  37. <pry:MotorBottle
  38. Height="100"
  39. CurrentValue="{Binding Weight}"
  40. IsRun="{Binding RunStatus}"
  41. RenderTransformOrigin="0.5,0.5">
  42. <pry:MotorBottle.RenderTransform>
  43. <TransformGroup>
  44. <RotateTransform Angle="90" />
  45. </TransformGroup>
  46. </pry:MotorBottle.RenderTransform>
  47. </pry:MotorBottle>
  48. </Grid>
  49. </Border>
  50. </DataTemplate>
  51. </ListView.ItemTemplate>
  52. </ListView>
  53. <UniformGrid Columns="10" Visibility="Collapsed">
  54. <pry:MotorBottle
  55. Width="150"
  56. Height="100"
  57. CurrentValue="66"
  58. IsRun="True"
  59. RenderTransformOrigin="0.5,0.5">
  60. <pry:MotorBottle.RenderTransform>
  61. <TransformGroup>
  62. <RotateTransform Angle="90" />
  63. </TransformGroup>
  64. </pry:MotorBottle.RenderTransform>
  65. </pry:MotorBottle>
  66. <pry:MotorBottle
  67. Width="150"
  68. Height="100"
  69. CurrentValue="40"
  70. IsRun="True"
  71. RenderTransformOrigin="0.5,0.5">
  72. <pry:MotorBottle.RenderTransform>
  73. <TransformGroup>
  74. <RotateTransform Angle="90" />
  75. </TransformGroup>
  76. </pry:MotorBottle.RenderTransform>
  77. </pry:MotorBottle>
  78. <pry:MotorBottle
  79. Width="150"
  80. Height="100"
  81. CurrentValue="88"
  82. IsRun="True"
  83. RenderTransformOrigin="0.5,0.5">
  84. <pry:MotorBottle.RenderTransform>
  85. <TransformGroup>
  86. <RotateTransform Angle="90" />
  87. </TransformGroup>
  88. </pry:MotorBottle.RenderTransform>
  89. </pry:MotorBottle>
  90. <pry:MotorBottle
  91. Width="150"
  92. Height="100"
  93. CurrentValue="25"
  94. IsRun="True"
  95. RenderTransformOrigin="0.5,0.5">
  96. <pry:MotorBottle.RenderTransform>
  97. <TransformGroup>
  98. <RotateTransform Angle="90" />
  99. </TransformGroup>
  100. </pry:MotorBottle.RenderTransform>
  101. </pry:MotorBottle>
  102. <pry:MotorBottle
  103. Width="150"
  104. Height="100"
  105. CurrentValue="97"
  106. IsRun="True"
  107. RenderTransformOrigin="0.5,0.5">
  108. <pry:MotorBottle.RenderTransform>
  109. <TransformGroup>
  110. <RotateTransform Angle="90" />
  111. </TransformGroup>
  112. </pry:MotorBottle.RenderTransform>
  113. </pry:MotorBottle>
  114. <pry:MotorBottle
  115. Width="150"
  116. Height="100"
  117. CurrentValue="10"
  118. IsRun="True"
  119. RenderTransformOrigin="0.5,0.5">
  120. <pry:MotorBottle.RenderTransform>
  121. <TransformGroup>
  122. <RotateTransform Angle="90" />
  123. </TransformGroup>
  124. </pry:MotorBottle.RenderTransform>
  125. </pry:MotorBottle>
  126. <pry:MotorBottle
  127. Width="150"
  128. Height="100"
  129. CurrentValue="60"
  130. IsRun="True"
  131. RenderTransformOrigin="0.5,0.5">
  132. <pry:MotorBottle.RenderTransform>
  133. <TransformGroup>
  134. <RotateTransform Angle="90" />
  135. </TransformGroup>
  136. </pry:MotorBottle.RenderTransform>
  137. </pry:MotorBottle>
  138. <pry:MotorBottle
  139. Width="150"
  140. Height="100"
  141. CurrentValue="96"
  142. IsRun="True"
  143. RenderTransformOrigin="0.5,0.5">
  144. <pry:MotorBottle.RenderTransform>
  145. <TransformGroup>
  146. <RotateTransform Angle="90" />
  147. </TransformGroup>
  148. </pry:MotorBottle.RenderTransform>
  149. </pry:MotorBottle>
  150. </UniformGrid>
  151. <Grid x:Name="gr" Grid.Row="1">
  152. <pry:ConveyorBelt
  153. Grid.Row="1"
  154. Width="{Binding ElementName=gr, Path=ActualWidth}"
  155. Height="{Binding ElementName=gr, Path=ActualHeight}"
  156. Margin="0,0,400,0"
  157. ConveyorBeltWidth="70"
  158. Direction="1"
  159. StrokeBrush="Red"
  160. StrokeDashArray="1.5 1.5"
  161. StrokeFillBrush="Red"
  162. StrokeThickness="2" />
  163. </Grid>
  164. <UniformGrid Grid.Row="2" Columns="10">
  165. <pry:MotorBottle
  166. Width="150"
  167. Height="100"
  168. CurrentValue="89"
  169. IsRun="True"
  170. RenderTransformOrigin="0.5,0.5">
  171. <pry:MotorBottle.RenderTransform>
  172. <TransformGroup>
  173. <RotateTransform Angle="270" />
  174. <ScaleTransform ScaleX="-1" />
  175. </TransformGroup>
  176. </pry:MotorBottle.RenderTransform>
  177. </pry:MotorBottle>
  178. <pry:MotorBottle
  179. Width="150"
  180. Height="100"
  181. CurrentValue="13"
  182. IsRun="True"
  183. RenderTransformOrigin="0.5,0.5">
  184. <pry:MotorBottle.RenderTransform>
  185. <TransformGroup>
  186. <RotateTransform Angle="270" />
  187. <ScaleTransform ScaleX="-1" />
  188. </TransformGroup>
  189. </pry:MotorBottle.RenderTransform>
  190. </pry:MotorBottle>
  191. <pry:MotorBottle
  192. Width="150"
  193. Height="100"
  194. CurrentValue="31"
  195. IsRun="True"
  196. RenderTransformOrigin="0.5,0.5">
  197. <pry:MotorBottle.RenderTransform>
  198. <TransformGroup>
  199. <RotateTransform Angle="270" />
  200. <ScaleTransform ScaleX="-1" />
  201. </TransformGroup>
  202. </pry:MotorBottle.RenderTransform>
  203. </pry:MotorBottle>
  204. <pry:MotorBottle
  205. Width="150"
  206. Height="100"
  207. CurrentValue="96"
  208. IsRun="True"
  209. RenderTransformOrigin="0.5,0.5">
  210. <pry:MotorBottle.RenderTransform>
  211. <TransformGroup>
  212. <RotateTransform Angle="270" />
  213. <ScaleTransform ScaleX="-1" />
  214. </TransformGroup>
  215. </pry:MotorBottle.RenderTransform>
  216. </pry:MotorBottle>
  217. <pry:MotorBottle
  218. Width="150"
  219. Height="100"
  220. CurrentValue="80"
  221. IsRun="True"
  222. RenderTransformOrigin="0.5,0.5">
  223. <pry:MotorBottle.RenderTransform>
  224. <TransformGroup>
  225. <RotateTransform Angle="270" />
  226. <ScaleTransform ScaleX="-1" />
  227. </TransformGroup>
  228. </pry:MotorBottle.RenderTransform>
  229. </pry:MotorBottle>
  230. <pry:MotorBottle
  231. Width="150"
  232. Height="100"
  233. CurrentValue="26"
  234. IsRun="True"
  235. RenderTransformOrigin="0.5,0.5">
  236. <pry:MotorBottle.RenderTransform>
  237. <TransformGroup>
  238. <RotateTransform Angle="270" />
  239. <ScaleTransform ScaleX="-1" />
  240. </TransformGroup>
  241. </pry:MotorBottle.RenderTransform>
  242. </pry:MotorBottle>
  243. <pry:MotorBottle
  244. Width="150"
  245. Height="100"
  246. CurrentValue="20"
  247. IsRun="True"
  248. RenderTransformOrigin="0.5,0.5">
  249. <pry:MotorBottle.RenderTransform>
  250. <TransformGroup>
  251. <RotateTransform Angle="270" />
  252. <ScaleTransform ScaleX="-1" />
  253. </TransformGroup>
  254. </pry:MotorBottle.RenderTransform>
  255. </pry:MotorBottle>
  256. <pry:MotorBottle
  257. Width="150"
  258. Height="100"
  259. CurrentValue="100"
  260. IsRun="True"
  261. RenderTransformOrigin="0.5,0.5">
  262. <pry:MotorBottle.RenderTransform>
  263. <TransformGroup>
  264. <RotateTransform Angle="270" />
  265. <ScaleTransform ScaleX="-1" />
  266. </TransformGroup>
  267. </pry:MotorBottle.RenderTransform>
  268. </pry:MotorBottle>
  269. </UniformGrid>
  270. <Grid.RowDefinitions>
  271. <RowDefinition Height="0.5*" />
  272. <RowDefinition />
  273. <RowDefinition Height="0.5*" />
  274. </Grid.RowDefinitions>
  275. </Grid>-->
  276. <Grid>
  277. <Grid.RowDefinitions>
  278. <RowDefinition Height="0.5*" />
  279. <RowDefinition />
  280. <RowDefinition Height="0.5*" />
  281. </Grid.RowDefinitions>
  282. <!--#region 顶部料仓-->
  283. <Grid Name="TopGrid">
  284. <ListView
  285. Height="{Binding ElementName=TopGrid, Path=ActualHeight}"
  286. VerticalAlignment="Center"
  287. Background="Transparent"
  288. BorderThickness="0"
  289. ItemsSource="{Binding TopDeviceCurrentStatuses}"
  290. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  291. <ListView.ItemsPanel>
  292. <ItemsPanelTemplate>
  293. <!--<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>-->
  294. <UniformGrid
  295. HorizontalAlignment="Left"
  296. VerticalAlignment="Top"
  297. Columns="8"
  298. Rows="1" />
  299. </ItemsPanelTemplate>
  300. </ListView.ItemsPanel>
  301. <ListView.ItemTemplate>
  302. <DataTemplate>
  303. <Border Margin="5" Background="Transparent">
  304. <Grid Height="220">
  305. <Grid.RowDefinitions>
  306. <RowDefinition />
  307. <RowDefinition />
  308. </Grid.RowDefinitions>
  309. <TextBlock
  310. Margin="0,0,0,35"
  311. HorizontalAlignment="Center"
  312. VerticalAlignment="Bottom"
  313. FontSize="25"
  314. Foreground="#ffccd61f"
  315. Text="{Binding DeviceName}" />
  316. <StackPanel
  317. Grid.Row="1"
  318. Margin="0,25,0,0"
  319. HorizontalAlignment="Center"
  320. Orientation="Horizontal">
  321. <TextBlock
  322. FontSize="20"
  323. Foreground="#FF0084FF"
  324. Text="{Binding Weight}" />
  325. <TextBlock
  326. FontSize="20"
  327. Foreground="#FF0084FF"
  328. Text=" kg" />
  329. </StackPanel>
  330. <StackPanel
  331. Grid.Row="1"
  332. Margin="0,70,0,0"
  333. HorizontalAlignment="Center"
  334. Orientation="Horizontal">
  335. <TextBlock
  336. FontSize="20"
  337. Foreground="#FF0084FF"
  338. Text="{Binding DeviceNum}" />
  339. <TextBlock
  340. FontSize="20"
  341. Foreground="#FF0084FF"
  342. Text=" 号仓" />
  343. </StackPanel>
  344. <Image
  345. Grid.RowSpan="2"
  346. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  347. Stretch="Fill" />
  348. </Grid>
  349. </Border>
  350. </DataTemplate>
  351. </ListView.ItemTemplate>
  352. </ListView>
  353. </Grid>
  354. <!--#endregion-->
  355. <Grid x:Name="gr" Grid.Row="1" Margin="0,50,0,0">
  356. <pry:ConveyorBelt
  357. Grid.Row="1"
  358. Width="{Binding ElementName=gr, Path=ActualWidth}"
  359. Height="{Binding ElementName=gr, Path=ActualHeight}"
  360. Margin="10,0,30,0"
  361. ConveyorBeltWidth="70"
  362. Direction="1"
  363. StrokeBrush="#00BEFA"
  364. StrokeDashArray="1.5 1.5"
  365. StrokeFillBrush="#00BEFA"
  366. StrokeThickness="2" />
  367. </Grid>
  368. <!--#region 底部料仓-->
  369. <Grid Grid.Row="2">
  370. <ListView
  371. VerticalAlignment="Top"
  372. Background="Transparent"
  373. BorderThickness="0"
  374. ItemsSource="{Binding BottomDeviceCurrentStatuses}"
  375. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  376. <ListView.ItemsPanel>
  377. <ItemsPanelTemplate>
  378. <UniformGrid
  379. HorizontalAlignment="Left"
  380. VerticalAlignment="Top"
  381. Columns="8"
  382. Rows="1" />
  383. </ItemsPanelTemplate>
  384. </ListView.ItemsPanel>
  385. <ListView.ItemTemplate>
  386. <DataTemplate>
  387. <Border Margin="5" Background="Transparent">
  388. <Grid Height="220">
  389. <Grid.RowDefinitions>
  390. <RowDefinition />
  391. <RowDefinition />
  392. </Grid.RowDefinitions>
  393. <TextBlock
  394. Margin="0,0,0,35"
  395. HorizontalAlignment="Center"
  396. VerticalAlignment="Bottom"
  397. FontSize="25"
  398. Foreground="#ffccd61f"
  399. Text="{Binding DeviceName}" />
  400. <StackPanel
  401. Grid.Row="1"
  402. Margin="0,25,0,0"
  403. HorizontalAlignment="Center"
  404. Orientation="Horizontal">
  405. <TextBlock
  406. FontSize="20"
  407. Foreground="#FF0084FF"
  408. Text="{Binding Weight}" />
  409. <TextBlock
  410. FontSize="20"
  411. Foreground="#FF0084FF"
  412. Text=" kg" />
  413. </StackPanel>
  414. <StackPanel
  415. Grid.Row="1"
  416. Margin="0,70,0,0"
  417. HorizontalAlignment="Center"
  418. Orientation="Horizontal">
  419. <TextBlock
  420. FontSize="20"
  421. Foreground="#FF0084FF"
  422. Text="{Binding DeviceNum}" />
  423. <TextBlock
  424. FontSize="20"
  425. Foreground="#FF0084FF"
  426. Text=" 号仓" />
  427. </StackPanel>
  428. <Image
  429. Grid.RowSpan="2"
  430. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  431. Stretch="Fill" />
  432. </Grid>
  433. </Border>
  434. </DataTemplate>
  435. </ListView.ItemTemplate>
  436. </ListView>
  437. </Grid>
  438. <!--#endregion-->
  439. </Grid>
  440. </UserControl>