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

UHardwareStatusView.xaml 20 KiB

1 jaar geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <UserControl x:Class="BPASmartClient.DosingSystem.View.UHardwareStatusView"
  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:local="clr-namespace:BPASmartClient.DosingSystem.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
  8. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.DataContext>
  12. <vm:UHardwareStatusViewModel/>
  13. </UserControl.DataContext>
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="0.8*" />
  17. <RowDefinition />
  18. <RowDefinition Height="0.8*" />
  19. </Grid.RowDefinitions>
  20. <!--#region 顶部料仓-->
  21. <Grid Name="TopGrid">
  22. <ListView
  23. Height="{Binding ElementName=TopGrid, Path=ActualHeight}"
  24. VerticalAlignment="Center"
  25. Background="Transparent"
  26. BorderThickness="0"
  27. ItemsSource="{Binding TopDeviceCurrentStatuses}"
  28. ScrollViewer.VerticalScrollBarVisibility="Disabled"
  29. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  30. <ListView.ItemsPanel>
  31. <ItemsPanelTemplate>
  32. <UniformGrid
  33. HorizontalAlignment="Left"
  34. VerticalAlignment="Top"
  35. Columns="{Binding StockNum}"
  36. Rows="1" />
  37. </ItemsPanelTemplate>
  38. </ListView.ItemsPanel>
  39. <ListView.ItemTemplate>
  40. <DataTemplate>
  41. <Border Margin="5" Background="Transparent">
  42. <Grid Background="Transparent">
  43. <Grid.RowDefinitions>
  44. <RowDefinition />
  45. <RowDefinition />
  46. <RowDefinition Height="0.6*" />
  47. </Grid.RowDefinitions>
  48. <StackPanel Grid.Row="1">
  49. <StackPanel
  50. Grid.Row="1"
  51. Margin="0,2,0,0"
  52. HorizontalAlignment="Center"
  53. Orientation="Horizontal">
  54. <TextBlock
  55. FontSize="20"
  56. Foreground="#FF0084FF"
  57. Text="{Binding Weight}" />
  58. <TextBlock
  59. FontSize="20"
  60. Foreground="#FF0084FF"
  61. Text=" kg" />
  62. </StackPanel>
  63. <StackPanel
  64. Grid.Row="1"
  65. Margin="0,2,0,0"
  66. HorizontalAlignment="Center"
  67. Orientation="Horizontal">
  68. <TextBlock
  69. FontSize="20"
  70. Foreground="#FF0084FF"
  71. Text="{Binding DeviceNum}" />
  72. <TextBlock
  73. FontSize="20"
  74. Foreground="#FF0084FF"
  75. Text=" 号仓" />
  76. </StackPanel>
  77. <TextBlock
  78. Grid.Row="1"
  79. Margin="0,2,0,0"
  80. HorizontalAlignment="Center"
  81. VerticalAlignment="Center"
  82. FontSize="20"
  83. Foreground="#FF0084FF"
  84. Text="{Binding DeviceName}" />
  85. </StackPanel>
  86. <Grid Grid.Row="2">
  87. <Grid.ColumnDefinitions>
  88. <ColumnDefinition />
  89. <ColumnDefinition />
  90. </Grid.ColumnDefinitions>
  91. <StackPanel Background="Transparent">
  92. <Ellipse
  93. Width="30"
  94. Height="30"
  95. HorizontalAlignment="Center"
  96. VerticalAlignment="Center"
  97. Fill="{Binding BucketFlagbit, Converter={StaticResource BoolToFillColorConverter}}"
  98. RenderTransformOrigin="0.5,0.5">
  99. <Ellipse.OpacityMask>
  100. <RadialGradientBrush>
  101. <GradientStop Offset="0" Color="Transparent" />
  102. <GradientStop Offset="1" Color="#00c2f4" />
  103. </RadialGradientBrush>
  104. </Ellipse.OpacityMask>
  105. <!--<Ellipse.RenderTransform>
  106. <ScaleTransform x:Name="Scale" />
  107. </Ellipse.RenderTransform>-->
  108. </Ellipse>
  109. <TextBlock
  110. Margin="0,5,0,0"
  111. HorizontalAlignment="Center"
  112. FontSize="16"
  113. Foreground="#00c2f4"
  114. Text="到位检测" />
  115. </StackPanel>
  116. <StackPanel Name="skp" Grid.Column="1">
  117. <ToggleButton
  118. Width="80"
  119. Height="30"
  120. Margin="5,0,5,0"
  121. HorizontalAlignment="Center"
  122. VerticalAlignment="Center"
  123. Background="Transparent"
  124. Command="{Binding DataContext.RecipeControlCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  125. CommandParameter="{Binding}"
  126. FontSize="20"
  127. IsChecked="{Binding BaitingControl}"
  128. Style="{StaticResource SwitchToggleButtonStyle}" />
  129. <TextBlock
  130. Margin="0,5,0,0"
  131. HorizontalAlignment="Center"
  132. FontSize="16"
  133. Foreground="#00c2f4"
  134. Text="出料控制" />
  135. </StackPanel>
  136. </Grid>
  137. <Image
  138. Margin="20,30,20,0"
  139. Source="/BPASmartClient.CustomResource;component/Image/荧光/矩形发光.png"
  140. Stretch="Fill"
  141. Visibility="{Binding IsOpen, Converter={StaticResource BoolToVisibilityConvert}}" />
  142. <Image Source="/BPASmartClient.CustomResource;component/Image/荧光/29.png" Visibility="{Binding BaitingControl, Converter={StaticResource BoolToVisibilityConvert}}" />
  143. <Image
  144. Grid.RowSpan="2"
  145. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  146. Stretch="Fill" />
  147. <Grid
  148. Name="WeightGr"
  149. Height="45"
  150. Margin="20,-30,20,0">
  151. <Grid.Background>
  152. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" />
  153. </Grid.Background>
  154. <TextBox
  155. Name="outName"
  156. Width="{Binding ElementName=WeightGr, Path=ActualWidth}"
  157. Height="{Binding ElementName=WeightGr, Path=ActualHeight}"
  158. Margin="0,-2,0,0"
  159. HorizontalContentAlignment="Center"
  160. VerticalContentAlignment="Center"
  161. Background="Transparent"
  162. BorderThickness="0"
  163. CaretBrush="#009dff"
  164. FontSize="20"
  165. Foreground="#009dff"
  166. Text="{Binding SetWeight}" />
  167. </Grid>
  168. </Grid>
  169. </Border>
  170. </DataTemplate>
  171. </ListView.ItemTemplate>
  172. </ListView>
  173. </Grid>
  174. <!--#endregion-->
  175. <!--#region 输送带-->
  176. <Grid
  177. x:Name="gr"
  178. Grid.Row="1"
  179. Margin="0,10,0,0">
  180. <pry:ConveyorBelt
  181. Grid.Row="1"
  182. Width="{Binding ElementName=gr, Path=ActualWidth}"
  183. Height="{Binding ElementName=gr, Path=ActualHeight}"
  184. Margin="10,0,30,0"
  185. ConveyorBeltWidth="70"
  186. Direction="{Binding ConveyerBeltStatus}"
  187. StrokeBrush="#00BEFA"
  188. StrokeDashArray="1.5 1.5"
  189. StrokeFillBrush="#00BEFA"
  190. StrokeThickness="2" />
  191. </Grid>
  192. <!--#endregion-->
  193. <!--#region 底部料仓-->
  194. <Grid Grid.Row="2">
  195. <ListView
  196. VerticalAlignment="Center"
  197. Background="Transparent"
  198. BorderThickness="0"
  199. ItemsSource="{Binding BottomDeviceCurrentStatuses}"
  200. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  201. <ListView.ItemsPanel>
  202. <ItemsPanelTemplate>
  203. <UniformGrid
  204. HorizontalAlignment="Left"
  205. VerticalAlignment="Top"
  206. Columns="{Binding StockNum}"
  207. Rows="1" />
  208. </ItemsPanelTemplate>
  209. </ListView.ItemsPanel>
  210. <ListView.ItemTemplate>
  211. <DataTemplate>
  212. <Border Margin="5" Background="Transparent">
  213. <Grid Height="270" Background="Transparent">
  214. <Grid.RowDefinitions>
  215. <RowDefinition />
  216. <RowDefinition />
  217. <RowDefinition Height="0.6*" />
  218. </Grid.RowDefinitions>
  219. <StackPanel Grid.Row="1">
  220. <StackPanel
  221. Grid.Row="1"
  222. Margin="0,2,0,0"
  223. HorizontalAlignment="Center"
  224. Orientation="Horizontal">
  225. <TextBlock
  226. FontSize="20"
  227. Foreground="#FF0084FF"
  228. Text="{Binding Weight}" />
  229. <TextBlock
  230. FontSize="20"
  231. Foreground="#FF0084FF"
  232. Text=" kg" />
  233. </StackPanel>
  234. <StackPanel
  235. Grid.Row="1"
  236. Margin="0,2,0,0"
  237. HorizontalAlignment="Center"
  238. Orientation="Horizontal">
  239. <TextBlock
  240. FontSize="20"
  241. Foreground="#FF0084FF"
  242. Text="{Binding DeviceNum}" />
  243. <TextBlock
  244. FontSize="20"
  245. Foreground="#FF0084FF"
  246. Text=" 号仓" />
  247. </StackPanel>
  248. <TextBlock
  249. Grid.Row="1"
  250. Margin="0,2,0,0"
  251. HorizontalAlignment="Center"
  252. VerticalAlignment="Center"
  253. FontSize="20"
  254. Foreground="#FF0084FF"
  255. Text="{Binding DeviceName}" />
  256. </StackPanel>
  257. <!--<StackPanel Grid.Row="2" Orientation="Horizontal">-->
  258. <Grid Grid.Row="2">
  259. <Grid.ColumnDefinitions>
  260. <ColumnDefinition />
  261. <ColumnDefinition />
  262. </Grid.ColumnDefinitions>
  263. <StackPanel Background="Transparent">
  264. <Ellipse
  265. Width="30"
  266. Height="30"
  267. HorizontalAlignment="Center"
  268. VerticalAlignment="Center"
  269. Fill="{Binding BucketFlagbit, Converter={StaticResource BoolToFillColorConverter}}"
  270. RenderTransformOrigin="0.5,0.5">
  271. <Ellipse.OpacityMask>
  272. <RadialGradientBrush>
  273. <GradientStop Offset="0" Color="Transparent" />
  274. <GradientStop Offset="1" Color="#00c2f4" />
  275. </RadialGradientBrush>
  276. </Ellipse.OpacityMask>
  277. <!--<Ellipse.RenderTransform>
  278. <ScaleTransform x:Name="Scale" />
  279. </Ellipse.RenderTransform>-->
  280. </Ellipse>
  281. <TextBlock
  282. Margin="0,5,0,0"
  283. HorizontalAlignment="Center"
  284. FontSize="16"
  285. Foreground="#00c2f4"
  286. Text="到位检测" />
  287. </StackPanel>
  288. <StackPanel Grid.Column="1">
  289. <ToggleButton
  290. Width="80"
  291. Height="30"
  292. Margin="5,0,5,0"
  293. HorizontalAlignment="Center"
  294. VerticalAlignment="Center"
  295. Background="Transparent"
  296. FontSize="20"
  297. IsChecked="{Binding BaitingControl}"
  298. Style="{StaticResource SwitchToggleButtonStyle}" />
  299. <TextBlock
  300. Margin="0,5,0,0"
  301. HorizontalAlignment="Center"
  302. FontSize="16"
  303. Foreground="#00c2f4"
  304. Text="出料控制" />
  305. </StackPanel>
  306. <!--</StackPanel>-->
  307. </Grid>
  308. <Image
  309. Margin="20,30,20,0"
  310. Source="/BPASmartClient.CustomResource;component/Image/荧光/矩形发光.png"
  311. Stretch="Fill"
  312. Visibility="{Binding IsOpen, Converter={StaticResource BoolToVisibilityConvert}}" />
  313. <Image Source="/BPASmartClient.CustomResource;component/Image/荧光/29.png" Visibility="{Binding BaitingControl, Converter={StaticResource BoolToVisibilityConvert}}" />
  314. <Image
  315. Grid.RowSpan="2"
  316. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  317. Stretch="Fill" />
  318. <Grid
  319. Name="WeightGr"
  320. Height="45"
  321. Margin="20,-30,20,0">
  322. <Grid.Background>
  323. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" />
  324. </Grid.Background>
  325. <TextBox
  326. Name="outName"
  327. Width="{Binding ElementName=WeightGr, Path=ActualWidth}"
  328. Height="{Binding ElementName=WeightGr, Path=ActualHeight}"
  329. Margin="0,-2,0,0"
  330. HorizontalContentAlignment="Center"
  331. VerticalContentAlignment="Center"
  332. Background="Transparent"
  333. BorderThickness="0"
  334. CaretBrush="#009dff"
  335. FontSize="20"
  336. Foreground="#009dff"
  337. Text="{Binding SetWeight}" />
  338. </Grid>
  339. </Grid>
  340. </Border>
  341. </DataTemplate>
  342. </ListView.ItemTemplate>
  343. </ListView>
  344. </Grid>
  345. <!--#endregion-->
  346. </Grid>
  347. </UserControl>