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

233 regels
10 KiB

  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. <Grid.RowDefinitions>
  19. <RowDefinition Height="0.5*" />
  20. <RowDefinition />
  21. <RowDefinition Height="0.5*" />
  22. </Grid.RowDefinitions>
  23. <!--#region 顶部料仓-->
  24. <Grid Name="TopGrid">
  25. <ListView
  26. Height="{Binding ElementName=TopGrid, Path=ActualHeight}"
  27. VerticalAlignment="Center"
  28. Background="Transparent"
  29. BorderThickness="0"
  30. ItemsSource="{Binding TopDeviceCurrentStatuses}"
  31. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  32. <ListView.ItemsPanel>
  33. <ItemsPanelTemplate>
  34. <!--<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>-->
  35. <UniformGrid
  36. HorizontalAlignment="Left"
  37. VerticalAlignment="Top"
  38. Columns="8"
  39. Rows="1" />
  40. </ItemsPanelTemplate>
  41. </ListView.ItemsPanel>
  42. <ListView.ItemTemplate>
  43. <DataTemplate>
  44. <Border Margin="5" Background="Transparent">
  45. <Grid Height="220">
  46. <Grid.RowDefinitions>
  47. <RowDefinition />
  48. <RowDefinition />
  49. </Grid.RowDefinitions>
  50. <TextBlock
  51. Margin="0,0,0,35"
  52. HorizontalAlignment="Center"
  53. VerticalAlignment="Bottom"
  54. FontSize="25"
  55. Foreground="#ffccd61f"
  56. Text="{Binding DeviceName}" />
  57. <StackPanel
  58. Grid.Row="1"
  59. Margin="0,10,0,0"
  60. HorizontalAlignment="Center"
  61. Orientation="Horizontal">
  62. <TextBlock
  63. FontSize="20"
  64. Foreground="#FF0084FF"
  65. Text="{Binding Weight}" />
  66. <TextBlock
  67. FontSize="20"
  68. Foreground="#FF0084FF"
  69. Text=" kg" />
  70. </StackPanel>
  71. <StackPanel
  72. Grid.Row="1"
  73. Margin="0,40,0,0"
  74. HorizontalAlignment="Center"
  75. Orientation="Horizontal">
  76. <TextBlock
  77. FontSize="20"
  78. Foreground="#FF0084FF"
  79. Text="{Binding DeviceNum}" />
  80. <TextBlock
  81. FontSize="20"
  82. Foreground="#FF0084FF"
  83. Text=" 号仓" />
  84. </StackPanel>
  85. <StackPanel
  86. Grid.Row="1"
  87. Margin="0,70,0,0"
  88. HorizontalAlignment="Center"
  89. Orientation="Horizontal">
  90. <TextBlock
  91. FontSize="20"
  92. Foreground="#FF0084FF"
  93. Text="运行状态:" />
  94. <TextBlock
  95. FontSize="20"
  96. Foreground="#FF0084FF"
  97. Text="{Binding RunStatus}" />
  98. </StackPanel>
  99. <Image
  100. Grid.RowSpan="2"
  101. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  102. Stretch="Fill" />
  103. </Grid>
  104. </Border>
  105. </DataTemplate>
  106. </ListView.ItemTemplate>
  107. </ListView>
  108. </Grid>
  109. <!--#endregion-->
  110. <Grid x:Name="gr" Grid.Row="1">
  111. <pry:ConveyorBelt
  112. Grid.Row="1"
  113. Width="{Binding ElementName=gr, Path=ActualWidth}"
  114. Height="{Binding ElementName=gr, Path=ActualHeight}"
  115. Margin="10,0,400,0"
  116. ConveyorBeltWidth="70"
  117. Direction="0"
  118. StrokeBrush="#00BEFA"
  119. StrokeDashArray="1.5 1.5"
  120. StrokeFillBrush="#00BEFA"
  121. StrokeThickness="2" />
  122. </Grid>
  123. <!--#region 底部料仓-->
  124. <Grid Grid.Row="2">
  125. <ListView
  126. VerticalAlignment="Center"
  127. Background="Transparent"
  128. BorderThickness="0"
  129. ItemsSource="{Binding BottomDeviceCurrentStatuses}"
  130. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  131. <ListView.ItemsPanel>
  132. <ItemsPanelTemplate>
  133. <UniformGrid
  134. HorizontalAlignment="Left"
  135. VerticalAlignment="Top"
  136. Columns="8"
  137. Rows="1" />
  138. </ItemsPanelTemplate>
  139. </ListView.ItemsPanel>
  140. <ListView.ItemTemplate>
  141. <DataTemplate>
  142. <Border Margin="5" Background="Transparent">
  143. <Grid Height="220">
  144. <Grid.RowDefinitions>
  145. <RowDefinition />
  146. <RowDefinition />
  147. </Grid.RowDefinitions>
  148. <TextBlock
  149. Margin="0,0,0,35"
  150. HorizontalAlignment="Center"
  151. VerticalAlignment="Bottom"
  152. FontSize="25"
  153. Foreground="#ffccd61f"
  154. Text="{Binding DeviceName}" />
  155. <StackPanel
  156. Grid.Row="1"
  157. Margin="0,10,0,0"
  158. HorizontalAlignment="Center"
  159. Orientation="Horizontal">
  160. <TextBlock
  161. FontSize="20"
  162. Foreground="#FF0084FF"
  163. Text="{Binding Weight}" />
  164. <TextBlock
  165. FontSize="20"
  166. Foreground="#FF0084FF"
  167. Text=" kg" />
  168. </StackPanel>
  169. <StackPanel
  170. Grid.Row="1"
  171. Margin="0,40,0,0"
  172. HorizontalAlignment="Center"
  173. Orientation="Horizontal">
  174. <TextBlock
  175. FontSize="20"
  176. Foreground="#FF0084FF"
  177. Text="{Binding DeviceNum}" />
  178. <TextBlock
  179. FontSize="20"
  180. Foreground="#FF0084FF"
  181. Text=" 号仓" />
  182. </StackPanel>
  183. <StackPanel
  184. Grid.Row="1"
  185. Margin="0,70,0,0"
  186. HorizontalAlignment="Center"
  187. Orientation="Horizontal">
  188. <TextBlock
  189. FontSize="20"
  190. Foreground="#FF0084FF"
  191. Text="运行状态:" />
  192. <TextBlock
  193. FontSize="20"
  194. Foreground="#FF0084FF"
  195. Text="{Binding RunStatus}" />
  196. </StackPanel>
  197. <Image
  198. Grid.RowSpan="2"
  199. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  200. Stretch="Fill" />
  201. </Grid>
  202. </Border>
  203. </DataTemplate>
  204. </ListView.ItemTemplate>
  205. </ListView>
  206. </Grid>
  207. <!--#endregion-->
  208. </Grid>
  209. </UserControl>