终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

489 righe
24 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.DosingSystem.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.DosingSystem.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.DosingSystem.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.8*" />
  20. <RowDefinition />
  21. <RowDefinition Height="0.8*" />
  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.VerticalScrollBarVisibility="Disabled"
  32. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  33. <ListView.ItemsPanel>
  34. <ItemsPanelTemplate>
  35. <!--<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>-->
  36. <UniformGrid
  37. HorizontalAlignment="Left"
  38. VerticalAlignment="Top"
  39. Columns="8"
  40. Rows="1" />
  41. </ItemsPanelTemplate>
  42. </ListView.ItemsPanel>
  43. <ListView.ItemTemplate>
  44. <DataTemplate>
  45. <Border Margin="5" Background="Transparent">
  46. <Grid Background="Transparent">
  47. <Grid.RowDefinitions>
  48. <RowDefinition />
  49. <RowDefinition />
  50. <RowDefinition Height="0.6*" />
  51. </Grid.RowDefinitions>
  52. <StackPanel Grid.Row="1">
  53. <StackPanel
  54. Grid.Row="1"
  55. Margin="0,2,0,0"
  56. HorizontalAlignment="Center"
  57. Orientation="Horizontal">
  58. <TextBlock
  59. FontSize="20"
  60. Foreground="#FF0084FF"
  61. Text="{Binding Weight}" />
  62. <TextBlock
  63. FontSize="20"
  64. Foreground="#FF0084FF"
  65. Text=" kg" />
  66. </StackPanel>
  67. <StackPanel
  68. Grid.Row="1"
  69. Margin="0,2,0,0"
  70. HorizontalAlignment="Center"
  71. Orientation="Horizontal">
  72. <TextBlock
  73. FontSize="20"
  74. Foreground="#FF0084FF"
  75. Text="{Binding DeviceNum}" />
  76. <TextBlock
  77. FontSize="20"
  78. Foreground="#FF0084FF"
  79. Text=" 号仓" />
  80. </StackPanel>
  81. <TextBlock
  82. Grid.Row="1"
  83. Margin="0,2,0,0"
  84. HorizontalAlignment="Center"
  85. VerticalAlignment="Center"
  86. FontSize="20"
  87. Foreground="#FF0084FF"
  88. Text="{Binding DeviceName}" />
  89. </StackPanel>
  90. <Grid Grid.Row="2">
  91. <Grid.ColumnDefinitions>
  92. <ColumnDefinition />
  93. <ColumnDefinition />
  94. </Grid.ColumnDefinitions>
  95. <StackPanel Background="Transparent">
  96. <Ellipse
  97. Width="30"
  98. Height="30"
  99. HorizontalAlignment="Center"
  100. VerticalAlignment="Center"
  101. Fill="{Binding BucketFlagbit, Converter={StaticResource BoolToFillColorConverter}}"
  102. RenderTransformOrigin="0.5,0.5">
  103. <Ellipse.OpacityMask>
  104. <RadialGradientBrush>
  105. <GradientStop Offset="0" Color="Transparent" />
  106. <GradientStop Offset="1" Color="#00c2f4" />
  107. </RadialGradientBrush>
  108. </Ellipse.OpacityMask>
  109. <!--<Ellipse.RenderTransform>
  110. <ScaleTransform x:Name="Scale" />
  111. </Ellipse.RenderTransform>-->
  112. </Ellipse>
  113. <TextBlock
  114. Margin="0,5,0,0"
  115. HorizontalAlignment="Center"
  116. FontSize="16"
  117. Foreground="#00c2f4"
  118. Text="到位检测" />
  119. </StackPanel>
  120. <StackPanel Name="skp" Grid.Column="1">
  121. <ToggleButton
  122. Width="80"
  123. Height="30"
  124. Margin="5,0,5,0"
  125. HorizontalAlignment="Center"
  126. VerticalAlignment="Center"
  127. Background="Transparent"
  128. Command="{Binding DataContext.RecipeControlCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  129. CommandParameter="{Binding}"
  130. FontSize="20"
  131. IsChecked="{Binding BaitingControl}"
  132. Style="{StaticResource SwitchToggleButtonStyle}" />
  133. <TextBlock
  134. Margin="0,5,0,0"
  135. HorizontalAlignment="Center"
  136. FontSize="16"
  137. Foreground="#00c2f4"
  138. Text="出料控制" />
  139. </StackPanel>
  140. </Grid>
  141. <Image
  142. Margin="20,30,20,0"
  143. Source="/BPASmartClient.CustomResource;component/Image/荧光/矩形发光.png"
  144. Stretch="Fill"
  145. Visibility="{Binding IsOpen, Converter={StaticResource BoolToVisibilityConvert}}" />
  146. <Image Source="/BPASmartClient.CustomResource;component/Image/荧光/29.png" Visibility="{Binding BaitingControl, Converter={StaticResource BoolToVisibilityConvert}}" />
  147. <Image
  148. Grid.RowSpan="2"
  149. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  150. Stretch="Fill" />
  151. <Grid
  152. Name="WeightGr"
  153. Height="45"
  154. Margin="20,-30,20,0">
  155. <Grid.Background>
  156. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" />
  157. </Grid.Background>
  158. <TextBox
  159. Name="outName"
  160. Width="{Binding ElementName=WeightGr, Path=ActualWidth}"
  161. Height="{Binding ElementName=WeightGr, Path=ActualHeight}"
  162. Margin="0,-2,0,0"
  163. HorizontalContentAlignment="Center"
  164. VerticalContentAlignment="Center"
  165. Background="Transparent"
  166. BorderThickness="0"
  167. CaretBrush="#009dff"
  168. FontSize="20"
  169. Foreground="#009dff"
  170. Text="{Binding SetWeight}" />
  171. </Grid>
  172. </Grid>
  173. </Border>
  174. </DataTemplate>
  175. </ListView.ItemTemplate>
  176. </ListView>
  177. </Grid>
  178. <!--#endregion-->
  179. <!--#region 输送带-->
  180. <Grid
  181. x:Name="gr"
  182. Grid.Row="1"
  183. Background="Transparent">
  184. <!--<pry:ConveyorBelt
  185. Grid.Row="1"
  186. Width="{Binding ElementName=gr, Path=ActualWidth}"
  187. Height="{Binding ElementName=gr, Path=ActualHeight}"
  188. Margin="10,0,30,0"
  189. ConveyorBeltWidth="70"
  190. Direction="0"
  191. StrokeBrush="#00BEFA"
  192. StrokeDashArray="1.5 1.5"
  193. StrokeFillBrush="#00BEFA"
  194. StrokeThickness="2" />-->
  195. <Grid.RowDefinitions>
  196. <RowDefinition />
  197. <RowDefinition />
  198. <RowDefinition />
  199. <RowDefinition />
  200. </Grid.RowDefinitions>
  201. <Grid Grid.Row="2">
  202. <Grid.ColumnDefinitions>
  203. <ColumnDefinition />
  204. <ColumnDefinition />
  205. <ColumnDefinition />
  206. <ColumnDefinition />
  207. <ColumnDefinition />
  208. <ColumnDefinition />
  209. </Grid.ColumnDefinitions>
  210. <Ellipse
  211. Width="30"
  212. Height="30"
  213. HorizontalAlignment="Center"
  214. VerticalAlignment="Bottom"
  215. Fill="{Binding OnDetection, Converter={StaticResource BoolToFillColorConverter}}"
  216. RenderTransformOrigin="0.5,0.5">
  217. <Ellipse.OpacityMask>
  218. <RadialGradientBrush>
  219. <GradientStop Offset="0" Color="Transparent" />
  220. <GradientStop Offset="1" Color="#00c2f4" />
  221. </RadialGradientBrush>
  222. </Ellipse.OpacityMask>
  223. </Ellipse>
  224. <Ellipse
  225. Grid.Column="5"
  226. Width="30"
  227. Height="30"
  228. HorizontalAlignment="Center"
  229. VerticalAlignment="Bottom"
  230. Fill="{Binding UnderDetection, Converter={StaticResource BoolToFillColorConverter}}"
  231. RenderTransformOrigin="0.5,0.5">
  232. <Ellipse.OpacityMask>
  233. <RadialGradientBrush>
  234. <GradientStop Offset="0" Color="Transparent" />
  235. <GradientStop Offset="1" Color="#00c2f4" />
  236. </RadialGradientBrush>
  237. </Ellipse.OpacityMask>
  238. </Ellipse>
  239. </Grid>
  240. <Grid Grid.Row="3">
  241. <Grid.ColumnDefinitions>
  242. <ColumnDefinition />
  243. <ColumnDefinition />
  244. <ColumnDefinition />
  245. <ColumnDefinition />
  246. <ColumnDefinition />
  247. <ColumnDefinition />
  248. </Grid.ColumnDefinitions>
  249. <TextBlock
  250. Margin="0,5,0,0"
  251. HorizontalAlignment="Center"
  252. FontSize="16"
  253. Foreground="#00c2f4"
  254. Text="上桶工位检测" />
  255. <TextBlock
  256. Grid.Column="5"
  257. Margin="0,5,0,0"
  258. HorizontalAlignment="Center"
  259. FontSize="16"
  260. Foreground="#00c2f4"
  261. Text="下桶工位检测" />
  262. </Grid>
  263. <pry:ConveyBelt2
  264. Grid.RowSpan="4"
  265. Margin="-12,0,10,0"
  266. BeltDashThickess="50"
  267. BeltHeight="{Binding ElementName=gr, Path=ActualHeight}"
  268. BeltWidth="{Binding ElementName=gr, Path=ActualWidth}"
  269. IsRun="{Binding ConveyerBeltStatus}" />
  270. <!--<StackPanel
  271. Grid.Row="1"
  272. Margin="20,0,0,0"
  273. HorizontalAlignment="Left"
  274. VerticalAlignment="Top"
  275. Orientation="Horizontal">
  276. <TextBlock
  277. Margin="0,0,5,0"
  278. FontSize="20"
  279. Foreground="#00c2f4"
  280. Text="输送带控制" />
  281. <ToggleButton
  282. Width="80"
  283. Height="30"
  284. Margin="5,0,5,0"
  285. Background="Transparent"
  286. FontSize="20"
  287. IsChecked="{Binding ConveyerBeltWork}"
  288. Style="{StaticResource SwitchToggleButtonStyle}" />
  289. </StackPanel>-->
  290. </Grid>
  291. <!--#endregion-->
  292. <!--#region 底部料仓-->
  293. <Grid Grid.Row="2">
  294. <ListView
  295. VerticalAlignment="Center"
  296. Background="Transparent"
  297. BorderThickness="0"
  298. ItemsSource="{Binding BottomDeviceCurrentStatuses}"
  299. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  300. <ListView.ItemsPanel>
  301. <ItemsPanelTemplate>
  302. <UniformGrid
  303. HorizontalAlignment="Left"
  304. VerticalAlignment="Top"
  305. Columns="8"
  306. Rows="1" />
  307. </ItemsPanelTemplate>
  308. </ListView.ItemsPanel>
  309. <ListView.ItemTemplate>
  310. <DataTemplate>
  311. <Border Margin="5" Background="Transparent">
  312. <Grid Height="270" Background="Transparent">
  313. <Grid.RowDefinitions>
  314. <RowDefinition />
  315. <RowDefinition />
  316. <RowDefinition Height="0.6*" />
  317. </Grid.RowDefinitions>
  318. <StackPanel Grid.Row="1">
  319. <StackPanel
  320. Grid.Row="1"
  321. Margin="0,2,0,0"
  322. HorizontalAlignment="Center"
  323. Orientation="Horizontal">
  324. <TextBlock
  325. FontSize="20"
  326. Foreground="#FF0084FF"
  327. Text="{Binding Weight}" />
  328. <TextBlock
  329. FontSize="20"
  330. Foreground="#FF0084FF"
  331. Text=" kg" />
  332. </StackPanel>
  333. <StackPanel
  334. Grid.Row="1"
  335. Margin="0,2,0,0"
  336. HorizontalAlignment="Center"
  337. Orientation="Horizontal">
  338. <TextBlock
  339. FontSize="20"
  340. Foreground="#FF0084FF"
  341. Text="{Binding DeviceNum}" />
  342. <TextBlock
  343. FontSize="20"
  344. Foreground="#FF0084FF"
  345. Text=" 号仓" />
  346. </StackPanel>
  347. <TextBlock
  348. Grid.Row="1"
  349. Margin="0,2,0,0"
  350. HorizontalAlignment="Center"
  351. VerticalAlignment="Center"
  352. FontSize="20"
  353. Foreground="#FF0084FF"
  354. Text="{Binding DeviceName}" />
  355. </StackPanel>
  356. <StackPanel Grid.Row="2" Orientation="Horizontal">
  357. <StackPanel Background="Transparent">
  358. <Ellipse
  359. Width="30"
  360. Height="30"
  361. HorizontalAlignment="Center"
  362. VerticalAlignment="Center"
  363. Fill="{Binding BucketFlagbit, Converter={StaticResource BoolToFillColorConverter}}"
  364. RenderTransformOrigin="0.5,0.5">
  365. <Ellipse.OpacityMask>
  366. <RadialGradientBrush>
  367. <GradientStop Offset="0" Color="Transparent" />
  368. <GradientStop Offset="1" Color="#00c2f4" />
  369. </RadialGradientBrush>
  370. </Ellipse.OpacityMask>
  371. <!--<Ellipse.RenderTransform>
  372. <ScaleTransform x:Name="Scale" />
  373. </Ellipse.RenderTransform>-->
  374. </Ellipse>
  375. <TextBlock
  376. Margin="0,5,0,0"
  377. HorizontalAlignment="Center"
  378. FontSize="16"
  379. Foreground="#00c2f4"
  380. Text="到位检测" />
  381. </StackPanel>
  382. <StackPanel>
  383. <ToggleButton
  384. Width="80"
  385. Height="30"
  386. Margin="5,0,5,0"
  387. HorizontalAlignment="Center"
  388. VerticalAlignment="Center"
  389. Background="Transparent"
  390. FontSize="20"
  391. IsChecked="{Binding BaitingControl}"
  392. Style="{StaticResource SwitchToggleButtonStyle}" />
  393. <TextBlock
  394. Margin="0,5,0,0"
  395. HorizontalAlignment="Center"
  396. FontSize="16"
  397. Foreground="#00c2f4"
  398. Text="出料控制" />
  399. </StackPanel>
  400. </StackPanel>
  401. <Image
  402. Margin="20,30,20,0"
  403. Source="/BPASmartClient.CustomResource;component/Image/荧光/矩形发光.png"
  404. Stretch="Fill"
  405. Visibility="{Binding IsOpen, Converter={StaticResource BoolToVisibilityConvert}}" />
  406. <Image Source="/BPASmartClient.CustomResource;component/Image/荧光/29.png" Visibility="{Binding BaitingControl, Converter={StaticResource BoolToVisibilityConvert}}" />
  407. <Image
  408. Grid.RowSpan="2"
  409. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  410. Stretch="Fill" />
  411. <Grid
  412. Name="WeightGr"
  413. Height="45"
  414. Margin="20,-30,20,0">
  415. <Grid.Background>
  416. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" />
  417. </Grid.Background>
  418. <TextBox
  419. Name="outName"
  420. Width="{Binding ElementName=WeightGr, Path=ActualWidth}"
  421. Height="{Binding ElementName=WeightGr, Path=ActualHeight}"
  422. Margin="0,-2,0,0"
  423. HorizontalContentAlignment="Center"
  424. VerticalContentAlignment="Center"
  425. Background="Transparent"
  426. BorderThickness="0"
  427. CaretBrush="#009dff"
  428. FontSize="20"
  429. Foreground="#009dff"
  430. Text="{Binding SetWeight}" />
  431. </Grid>
  432. </Grid>
  433. </Border>
  434. </DataTemplate>
  435. </ListView.ItemTemplate>
  436. </ListView>
  437. </Grid>
  438. <!--#endregion-->
  439. </Grid>
  440. </UserControl>