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

371 rivejä
19 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.SmallBatchingSystem.Views.RecipeControlView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.SmallBatchingSystem.Views"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  9. xmlns:vm="clr-namespace:BPASmartClient.SmallBatchingSystem.ViewModels"
  10. d:DesignHeight="450"
  11. d:DesignWidth="800"
  12. mc:Ignorable="d">
  13. <UserControl.DataContext>
  14. <vm:RecipeControlViewModel />
  15. </UserControl.DataContext>
  16. <Grid Margin="20">
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="35" />
  19. <RowDefinition />
  20. </Grid.RowDefinitions>
  21. <Button
  22. Width="150"
  23. Height="30"
  24. Margin="10,0,10,0"
  25. HorizontalAlignment="Right"
  26. Command="{Binding DeviceInitCommand}"
  27. Content="初始化"
  28. FontSize="20"
  29. Style="{StaticResource ImageButtonStyle}" />
  30. <Grid
  31. Name="ggr"
  32. Grid.Row="1"
  33. Margin="10">
  34. <ListBox
  35. Margin="5"
  36. VerticalAlignment="Top"
  37. Background="Transparent"
  38. BorderThickness="0"
  39. ItemsSource="{Binding Recipes}"
  40. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  41. <ListBox.ItemsPanel>
  42. <ItemsPanelTemplate>
  43. <!--<UniformGrid
  44. HorizontalAlignment="Left"
  45. VerticalAlignment="Top"
  46. Columns="8" />-->
  47. <WrapPanel Orientation="Horizontal" />
  48. </ItemsPanelTemplate>
  49. </ListBox.ItemsPanel>
  50. <ListBox.ItemTemplate>
  51. <DataTemplate>
  52. <Grid
  53. Name="tt"
  54. Width="180"
  55. Height="220"
  56. Margin="5">
  57. <Grid.RowDefinitions>
  58. <RowDefinition Height="30" />
  59. <RowDefinition Height="20" />
  60. <RowDefinition Height="128" />
  61. <RowDefinition Height="2" />
  62. <RowDefinition Height="40" />
  63. </Grid.RowDefinitions>
  64. <Image
  65. Grid.RowSpan="5"
  66. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  67. Stretch="Fill" />
  68. <TextBlock
  69. Grid.Row="0"
  70. Margin="2,5,0,0"
  71. HorizontalAlignment="Center"
  72. VerticalAlignment="Top"
  73. FontSize="18"
  74. Foreground="#FF2AB2E7"
  75. Text="{Binding RecipeName}" />
  76. <TextBlock
  77. Grid.Row="1"
  78. Margin="5,0,0,0"
  79. VerticalAlignment="Top"
  80. Foreground="#FF2AB2E7"
  81. Text="配方信息:" />
  82. <ScrollViewer
  83. Grid.Row="2"
  84. VerticalAlignment="Top"
  85. Background="Transparent"
  86. HorizontalScrollBarVisibility="Hidden"
  87. VerticalScrollBarVisibility="Hidden">
  88. <Grid>
  89. <Grid.ColumnDefinitions>
  90. <ColumnDefinition Width="auto" />
  91. <ColumnDefinition />
  92. </Grid.ColumnDefinitions>
  93. <ItemsControl ItemsSource="{Binding SiloInfoModels}">
  94. <ItemsControl.ItemTemplate>
  95. <DataTemplate>
  96. <Grid Width="150">
  97. <Grid.ColumnDefinitions>
  98. <ColumnDefinition />
  99. <ColumnDefinition Width="0.1*" />
  100. <ColumnDefinition />
  101. </Grid.ColumnDefinitions>
  102. <TextBlock
  103. Margin="5,0,0,0"
  104. HorizontalAlignment="Right"
  105. VerticalAlignment="Center"
  106. Foreground="#aa2AB2E7"
  107. Text="{Binding SiloName}" />
  108. <TextBlock
  109. Grid.Column="1"
  110. Margin="1,0,0,0"
  111. HorizontalAlignment="Center"
  112. VerticalAlignment="Center"
  113. Foreground="#aa2AB2E7"
  114. Text=":" />
  115. <TextBlock
  116. Grid.Column="2"
  117. Margin="5,0,0,0"
  118. HorizontalAlignment="Left"
  119. VerticalAlignment="Center"
  120. Foreground="#aa2AB2E7"
  121. Text="{Binding SiloWeight}" />
  122. </Grid>
  123. </DataTemplate>
  124. </ItemsControl.ItemTemplate>
  125. </ItemsControl>
  126. </Grid>
  127. </ScrollViewer>
  128. <!--<Grid
  129. Grid.Row="3"
  130. Height="2"
  131. VerticalAlignment="Bottom">
  132. <Grid.Background>
  133. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/直线.png" Stretch="Fill" />
  134. </Grid.Background>
  135. </Grid>-->
  136. <Image
  137. Grid.Row="3"
  138. Width="{Binding ElementName=tt, Path=ActualWidth}"
  139. Height="2"
  140. VerticalAlignment="Bottom"
  141. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  142. Stretch="Fill" />
  143. <Grid
  144. Name="gr"
  145. Grid.Row="4"
  146. Height="30"
  147. Margin="0,0,0,10"
  148. VerticalAlignment="Bottom"
  149. Background="Transparent">
  150. <!--<Grid.ColumnDefinitions>
  151. <ColumnDefinition />
  152. <ColumnDefinition />
  153. </Grid.ColumnDefinitions>-->
  154. <!--<Image
  155. Height="2"
  156. Grid.ColumnSpan="2"
  157. Width="{Binding ElementName=gr, Path=ActualWidth}"
  158. VerticalAlignment="Top"
  159. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  160. <pry:IcoButton
  161. Width="{Binding ElementName=gr, Path=ActualWidth}"
  162. Height="{Binding ElementName=gr, Path=ActualHeight}"
  163. Margin="4,4,4,0"
  164. HorizontalAlignment="Center"
  165. VerticalAlignment="Center"
  166. Background="#222bd06f"
  167. BorderThickness="0"
  168. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  169. CommandParameter="{Binding RecipeName}"
  170. Content="配方下发"
  171. EnterBackground="#332bd06f"
  172. FontStyle="Normal"
  173. Foreground="#ff2bd06f"
  174. IcoText="&#xe6cf;"
  175. IsEnabled="{Binding IsEnable}"
  176. Style="{StaticResource IcoButtonStyle}" />
  177. <!--<pry:IcoButton
  178. Width="{Binding ElementName=gr, Path=ActualWidth}"
  179. Height="{Binding ElementName=gr, Path=ActualHeight}"
  180. Margin="4,4,3,0"
  181. HorizontalAlignment="Center"
  182. VerticalAlignment="Center"
  183. Background="#11F53F62"
  184. BorderThickness="0"
  185. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  186. CommandParameter="{Binding RecipCode}"
  187. Content="删除"
  188. EnterBackground="#22F53F62"
  189. FontStyle="Normal"
  190. Foreground="#FFF53F62"
  191. IcoText="&#xe68e;"
  192. Style="{StaticResource IcoButtonStyle}" />
  193. <pry:IcoButton
  194. Grid.Column="1"
  195. Width="{Binding ElementName=gr, Path=ActualWidth}"
  196. Height="{Binding ElementName=gr, Path=ActualHeight}"
  197. Margin="3,4,4,0"
  198. HorizontalAlignment="Center"
  199. VerticalAlignment="Center"
  200. Background="#112AB2E7"
  201. BorderThickness="0"
  202. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  203. CommandParameter="{Binding RecipCode}"
  204. Content="编辑"
  205. EnterBackground="#222AB2E7"
  206. Foreground="#FF2AB2E7"
  207. IcoText="&#xe636;"
  208. Style="{StaticResource IcoButtonStyle}" />-->
  209. </Grid>
  210. <!--</StackPanel>-->
  211. </Grid>
  212. <!--<Grid Name="tt" Margin="5">
  213. <Grid.RowDefinitions>
  214. <RowDefinition Height="auto" />
  215. <RowDefinition Height="auto" />
  216. <RowDefinition />
  217. <RowDefinition />
  218. </Grid.RowDefinitions>
  219. <Image
  220. Grid.RowSpan="4"
  221. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  222. Stretch="Fill" />
  223. <TextBlock
  224. Grid.Row="0"
  225. Margin="2,5,0,0"
  226. HorizontalAlignment="Center"
  227. VerticalAlignment="Top"
  228. FontSize="18"
  229. Foreground="#FF2AB2E7"
  230. Text="{Binding RecipeName}" />
  231. <TextBlock
  232. Grid.Row="1"
  233. Margin="5,0,0,5"
  234. Foreground="#ffc000"
  235. Text="配方信息:" />
  236. <ScrollViewer
  237. Grid.Row="2"
  238. HorizontalScrollBarVisibility="Hidden"
  239. VerticalScrollBarVisibility="Hidden">
  240. <Grid>
  241. <Grid.ColumnDefinitions>
  242. <ColumnDefinition Width="auto" />
  243. <ColumnDefinition />
  244. </Grid.ColumnDefinitions>
  245. <ItemsControl ItemsSource="{Binding RawMaterials}">
  246. <ItemsControl.ItemTemplate>
  247. <DataTemplate>
  248. <Grid>
  249. <TextBlock
  250. Grid.Row="1"
  251. Margin="5,0,0,0"
  252. HorizontalAlignment="Right"
  253. VerticalAlignment="Center"
  254. Foreground="#aaffc000"
  255. Text="{Binding RawMaterialName}" />
  256. </Grid>
  257. </DataTemplate>
  258. </ItemsControl.ItemTemplate>
  259. </ItemsControl>
  260. <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
  261. <ItemsControl.ItemTemplate>
  262. <DataTemplate>
  263. <StackPanel Orientation="Horizontal">
  264. <TextBlock
  265. Margin="5,0,0,0"
  266. HorizontalAlignment="Center"
  267. VerticalAlignment="Center"
  268. Foreground="#aaffc000"
  269. Text=":" />
  270. <TextBlock
  271. Margin="5,0,0,0"
  272. HorizontalAlignment="Center"
  273. VerticalAlignment="Center"
  274. Foreground="#aaffc000"
  275. Text="{Binding RawMaterialWeight}" />
  276. <TextBlock
  277. Margin="5,0,0,0"
  278. HorizontalAlignment="Center"
  279. VerticalAlignment="Center"
  280. Foreground="#aaffc000"
  281. Text="g" />
  282. </StackPanel>
  283. </DataTemplate>
  284. </ItemsControl.ItemTemplate>
  285. </ItemsControl>
  286. </Grid>
  287. </ScrollViewer>
  288. <Grid
  289. Name="grb"
  290. Grid.Row="3"
  291. Height="30"
  292. Margin="0,0,0,10"
  293. VerticalAlignment="Bottom"
  294. Background="Transparent">
  295. <Image
  296. Width="{Binding ElementName=grb, Path=ActualWidth}"
  297. VerticalAlignment="Top"
  298. StretchDirection="Both"
  299. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />
  300. <pry:IcoButton
  301. Width="{Binding ElementName=grb, Path=ActualWidth}"
  302. Height="{Binding ElementName=grb, Path=ActualHeight}"
  303. Margin="4,4,4,0"
  304. HorizontalAlignment="Center"
  305. VerticalAlignment="Center"
  306. Background="#222bd06f"
  307. BorderThickness="0"
  308. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  309. CommandParameter="{Binding RecipeName}"
  310. Content="配方下发"
  311. EnterBackground="#332bd06f"
  312. FontStyle="Normal"
  313. Foreground="#ff2bd06f"
  314. IcoText="&#xe6cf;"
  315. IsEnabled="{Binding IsEnable}"
  316. Style="{StaticResource IcoButtonStyle}" />
  317. </Grid>
  318. </Grid>-->
  319. </DataTemplate>
  320. </ListBox.ItemTemplate>
  321. </ListBox>
  322. </Grid>
  323. </Grid>
  324. </UserControl>