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

HardwareStatusView.xaml 11 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodSmallStation.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.JXJFoodSmallStation.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.JXJFoodSmallStation.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. <!--#region 测试-->
  19. <ListView
  20. Height="150"
  21. VerticalAlignment="Center"
  22. Background="Transparent"
  23. BorderThickness="0"
  24. ItemsSource="{Binding TopDeviceCurrentStatuses}"
  25. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  26. <ListView.ItemsPanel>
  27. <ItemsPanelTemplate>
  28. <UniformGrid
  29. HorizontalAlignment="Center"
  30. VerticalAlignment="Center"
  31. Columns="10" />
  32. </ItemsPanelTemplate>
  33. </ListView.ItemsPanel>
  34. <ListView.ItemTemplate>
  35. <DataTemplate>
  36. <Border Background="Transparent">
  37. <Grid Height="100">
  38. <pry:MotorBottle
  39. Height="100"
  40. CurrentValue="{Binding Weight}"
  41. IsRun="{Binding RunStatus}"
  42. RenderTransformOrigin="0.5,0.5">
  43. <pry:MotorBottle.RenderTransform>
  44. <TransformGroup>
  45. <RotateTransform Angle="90" />
  46. </TransformGroup>
  47. </pry:MotorBottle.RenderTransform>
  48. </pry:MotorBottle>
  49. </Grid>
  50. </Border>
  51. </DataTemplate>
  52. </ListView.ItemTemplate>
  53. </ListView>
  54. <!--#endregion-->
  55. <UniformGrid Columns="10" Visibility="Collapsed">
  56. <pry:MotorBottle
  57. Width="150"
  58. Height="100"
  59. CurrentValue="66"
  60. IsRun="True"
  61. RenderTransformOrigin="0.5,0.5">
  62. <pry:MotorBottle.RenderTransform>
  63. <TransformGroup>
  64. <RotateTransform Angle="90" />
  65. </TransformGroup>
  66. </pry:MotorBottle.RenderTransform>
  67. </pry:MotorBottle>
  68. <pry:MotorBottle
  69. Width="150"
  70. Height="100"
  71. CurrentValue="40"
  72. IsRun="True"
  73. RenderTransformOrigin="0.5,0.5">
  74. <pry:MotorBottle.RenderTransform>
  75. <TransformGroup>
  76. <RotateTransform Angle="90" />
  77. </TransformGroup>
  78. </pry:MotorBottle.RenderTransform>
  79. </pry:MotorBottle>
  80. <pry:MotorBottle
  81. Width="150"
  82. Height="100"
  83. CurrentValue="88"
  84. IsRun="True"
  85. RenderTransformOrigin="0.5,0.5">
  86. <pry:MotorBottle.RenderTransform>
  87. <TransformGroup>
  88. <RotateTransform Angle="90" />
  89. </TransformGroup>
  90. </pry:MotorBottle.RenderTransform>
  91. </pry:MotorBottle>
  92. <pry:MotorBottle
  93. Width="150"
  94. Height="100"
  95. CurrentValue="25"
  96. IsRun="True"
  97. RenderTransformOrigin="0.5,0.5">
  98. <pry:MotorBottle.RenderTransform>
  99. <TransformGroup>
  100. <RotateTransform Angle="90" />
  101. </TransformGroup>
  102. </pry:MotorBottle.RenderTransform>
  103. </pry:MotorBottle>
  104. <pry:MotorBottle
  105. Width="150"
  106. Height="100"
  107. CurrentValue="97"
  108. IsRun="True"
  109. RenderTransformOrigin="0.5,0.5">
  110. <pry:MotorBottle.RenderTransform>
  111. <TransformGroup>
  112. <RotateTransform Angle="90" />
  113. </TransformGroup>
  114. </pry:MotorBottle.RenderTransform>
  115. </pry:MotorBottle>
  116. <pry:MotorBottle
  117. Width="150"
  118. Height="100"
  119. CurrentValue="10"
  120. IsRun="True"
  121. RenderTransformOrigin="0.5,0.5">
  122. <pry:MotorBottle.RenderTransform>
  123. <TransformGroup>
  124. <RotateTransform Angle="90" />
  125. </TransformGroup>
  126. </pry:MotorBottle.RenderTransform>
  127. </pry:MotorBottle>
  128. <pry:MotorBottle
  129. Width="150"
  130. Height="100"
  131. CurrentValue="60"
  132. IsRun="True"
  133. RenderTransformOrigin="0.5,0.5">
  134. <pry:MotorBottle.RenderTransform>
  135. <TransformGroup>
  136. <RotateTransform Angle="90" />
  137. </TransformGroup>
  138. </pry:MotorBottle.RenderTransform>
  139. </pry:MotorBottle>
  140. <pry:MotorBottle
  141. Width="150"
  142. Height="100"
  143. CurrentValue="96"
  144. IsRun="True"
  145. RenderTransformOrigin="0.5,0.5">
  146. <pry:MotorBottle.RenderTransform>
  147. <TransformGroup>
  148. <RotateTransform Angle="90" />
  149. </TransformGroup>
  150. </pry:MotorBottle.RenderTransform>
  151. </pry:MotorBottle>
  152. </UniformGrid>
  153. <Grid x:Name="gr" Grid.Row="1">
  154. <pry:ConveyorBelt
  155. Grid.Row="1"
  156. Width="{Binding ElementName=gr, Path=ActualWidth}"
  157. Height="{Binding ElementName=gr, Path=ActualHeight}"
  158. Margin="0,0,400,0"
  159. ConveyorBeltWidth="70"
  160. Direction="1"
  161. StrokeBrush="Red"
  162. StrokeDashArray="1.5 1.5"
  163. StrokeFillBrush="Red"
  164. StrokeThickness="2" />
  165. </Grid>
  166. <UniformGrid Grid.Row="2" Columns="10">
  167. <pry:MotorBottle
  168. Width="150"
  169. Height="100"
  170. CurrentValue="89"
  171. IsRun="True"
  172. RenderTransformOrigin="0.5,0.5">
  173. <pry:MotorBottle.RenderTransform>
  174. <TransformGroup>
  175. <RotateTransform Angle="270" />
  176. <ScaleTransform ScaleX="-1" />
  177. </TransformGroup>
  178. </pry:MotorBottle.RenderTransform>
  179. </pry:MotorBottle>
  180. <pry:MotorBottle
  181. Width="150"
  182. Height="100"
  183. CurrentValue="13"
  184. IsRun="True"
  185. RenderTransformOrigin="0.5,0.5">
  186. <pry:MotorBottle.RenderTransform>
  187. <TransformGroup>
  188. <RotateTransform Angle="270" />
  189. <ScaleTransform ScaleX="-1" />
  190. </TransformGroup>
  191. </pry:MotorBottle.RenderTransform>
  192. </pry:MotorBottle>
  193. <pry:MotorBottle
  194. Width="150"
  195. Height="100"
  196. CurrentValue="31"
  197. IsRun="True"
  198. RenderTransformOrigin="0.5,0.5">
  199. <pry:MotorBottle.RenderTransform>
  200. <TransformGroup>
  201. <RotateTransform Angle="270" />
  202. <ScaleTransform ScaleX="-1" />
  203. </TransformGroup>
  204. </pry:MotorBottle.RenderTransform>
  205. </pry:MotorBottle>
  206. <pry:MotorBottle
  207. Width="150"
  208. Height="100"
  209. CurrentValue="96"
  210. IsRun="True"
  211. RenderTransformOrigin="0.5,0.5">
  212. <pry:MotorBottle.RenderTransform>
  213. <TransformGroup>
  214. <RotateTransform Angle="270" />
  215. <ScaleTransform ScaleX="-1" />
  216. </TransformGroup>
  217. </pry:MotorBottle.RenderTransform>
  218. </pry:MotorBottle>
  219. <pry:MotorBottle
  220. Width="150"
  221. Height="100"
  222. CurrentValue="80"
  223. IsRun="True"
  224. RenderTransformOrigin="0.5,0.5">
  225. <pry:MotorBottle.RenderTransform>
  226. <TransformGroup>
  227. <RotateTransform Angle="270" />
  228. <ScaleTransform ScaleX="-1" />
  229. </TransformGroup>
  230. </pry:MotorBottle.RenderTransform>
  231. </pry:MotorBottle>
  232. <pry:MotorBottle
  233. Width="150"
  234. Height="100"
  235. CurrentValue="26"
  236. IsRun="True"
  237. RenderTransformOrigin="0.5,0.5">
  238. <pry:MotorBottle.RenderTransform>
  239. <TransformGroup>
  240. <RotateTransform Angle="270" />
  241. <ScaleTransform ScaleX="-1" />
  242. </TransformGroup>
  243. </pry:MotorBottle.RenderTransform>
  244. </pry:MotorBottle>
  245. <pry:MotorBottle
  246. Width="150"
  247. Height="100"
  248. CurrentValue="20"
  249. IsRun="True"
  250. RenderTransformOrigin="0.5,0.5">
  251. <pry:MotorBottle.RenderTransform>
  252. <TransformGroup>
  253. <RotateTransform Angle="270" />
  254. <ScaleTransform ScaleX="-1" />
  255. </TransformGroup>
  256. </pry:MotorBottle.RenderTransform>
  257. </pry:MotorBottle>
  258. <pry:MotorBottle
  259. Width="150"
  260. Height="100"
  261. CurrentValue="100"
  262. IsRun="True"
  263. RenderTransformOrigin="0.5,0.5">
  264. <pry:MotorBottle.RenderTransform>
  265. <TransformGroup>
  266. <RotateTransform Angle="270" />
  267. <ScaleTransform ScaleX="-1" />
  268. </TransformGroup>
  269. </pry:MotorBottle.RenderTransform>
  270. </pry:MotorBottle>
  271. </UniformGrid>
  272. <Grid.RowDefinitions>
  273. <RowDefinition Height="0.5*" />
  274. <RowDefinition />
  275. <RowDefinition Height="0.5*" />
  276. </Grid.RowDefinitions>
  277. </Grid>
  278. </UserControl>