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

206 lines
8.7 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.DosingHKProject.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.DosingHKProject.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.DosingHKProject.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,25,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,70,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. <Image
  86. Grid.RowSpan="2"
  87. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  88. Stretch="Fill" />
  89. </Grid>
  90. </Border>
  91. </DataTemplate>
  92. </ListView.ItemTemplate>
  93. </ListView>
  94. </Grid>
  95. <!--#endregion-->
  96. <Grid x:Name="gr" Grid.Row="1">
  97. <pry:ConveyorBelt
  98. Grid.Row="1"
  99. Width="{Binding ElementName=gr, Path=ActualWidth}"
  100. Height="{Binding ElementName=gr, Path=ActualHeight}"
  101. Margin="10,0,400,0"
  102. ConveyorBeltWidth="70"
  103. Direction="0"
  104. StrokeBrush="#00BEFA"
  105. StrokeDashArray="1.5 1.5"
  106. StrokeFillBrush="#00BEFA"
  107. StrokeThickness="2" />
  108. </Grid>
  109. <!--#region 底部料仓-->
  110. <Grid Grid.Row="2">
  111. <ListView
  112. VerticalAlignment="Center"
  113. Background="Transparent"
  114. BorderThickness="0"
  115. ItemsSource="{Binding BottomDeviceCurrentStatuses}"
  116. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  117. <ListView.ItemsPanel>
  118. <ItemsPanelTemplate>
  119. <UniformGrid
  120. HorizontalAlignment="Left"
  121. VerticalAlignment="Top"
  122. Columns="8"
  123. Rows="1" />
  124. </ItemsPanelTemplate>
  125. </ListView.ItemsPanel>
  126. <ListView.ItemTemplate>
  127. <DataTemplate>
  128. <Border Margin="5" Background="Transparent">
  129. <Grid Height="220">
  130. <Grid.RowDefinitions>
  131. <RowDefinition />
  132. <RowDefinition />
  133. </Grid.RowDefinitions>
  134. <TextBlock
  135. Margin="0,0,0,35"
  136. HorizontalAlignment="Center"
  137. VerticalAlignment="Bottom"
  138. FontSize="25"
  139. Foreground="#ffccd61f"
  140. Text="{Binding DeviceName}" />
  141. <StackPanel
  142. Grid.Row="1"
  143. Margin="0,25,0,0"
  144. HorizontalAlignment="Center"
  145. Orientation="Horizontal">
  146. <TextBlock
  147. FontSize="20"
  148. Foreground="#FF0084FF"
  149. Text="{Binding Weight}" />
  150. <TextBlock
  151. FontSize="20"
  152. Foreground="#FF0084FF"
  153. Text=" kg" />
  154. </StackPanel>
  155. <StackPanel
  156. Grid.Row="1"
  157. Margin="0,70,0,0"
  158. HorizontalAlignment="Center"
  159. Orientation="Horizontal">
  160. <TextBlock
  161. FontSize="20"
  162. Foreground="#FF0084FF"
  163. Text="{Binding DeviceNum}" />
  164. <TextBlock
  165. FontSize="20"
  166. Foreground="#FF0084FF"
  167. Text=" 号仓" />
  168. </StackPanel>
  169. <Image
  170. Grid.RowSpan="2"
  171. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  172. Stretch="Fill" />
  173. </Grid>
  174. </Border>
  175. </DataTemplate>
  176. </ListView.ItemTemplate>
  177. </ListView>
  178. </Grid>
  179. <!--#endregion-->
  180. </Grid>
  181. </UserControl>