终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

1058 rindas
54 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.DosingSystem.View.RecipeControlView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:con="clr-namespace:BPASmartClient.DosingSystem.Converter"
  6. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  11. xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
  12. d:DesignHeight="800"
  13. d:DesignWidth="1400"
  14. mc:Ignorable="d">
  15. <UserControl.DataContext>
  16. <vm:RecipeControlViewModel x:Name="bingSource" />
  17. </UserControl.DataContext>
  18. <UserControl.Resources>
  19. <con:RunStatusConvert x:Key="RunStatusConvert" />
  20. <con:EnbleConvert x:Key="EnbleConvert" />
  21. <con:IntToSourceConvert x:Key="IntToSourceConvert" />
  22. <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
  23. <Style.Resources>
  24. <!-- SelectedItem with focus -->
  25. <SolidColorBrush
  26. x:Key="{x:Static SystemColors.HighlightBrushKey}"
  27. Opacity=".4"
  28. Color="White" />
  29. <!-- SelectedItem without focus -->
  30. <SolidColorBrush
  31. x:Key="{x:Static SystemColors.ControlBrushKey}"
  32. Opacity=".4"
  33. Color="White" />
  34. </Style.Resources>
  35. <!-- 设置触发器 -->
  36. <Style.Triggers>
  37. <Trigger Property="IsMouseOver" Value="true">
  38. <Setter Property="Background" Value="White" />
  39. <Setter Property="Foreground" Value="White" />
  40. </Trigger>
  41. <Trigger Property="IsFocused" Value="true">
  42. <Setter Property="Background" Value="White" />
  43. <Setter Property="Foreground" Value="White" />
  44. </Trigger>
  45. </Style.Triggers>
  46. </Style>
  47. <Style x:Key="RadioState" TargetType="RadioButton">
  48. <Setter Property="Margin" Value="1" />
  49. <Setter Property="Background" Value="Transparent" />
  50. <Setter Property="Foreground" Value="#ddd" />
  51. <Setter Property="VerticalContentAlignment" Value="Bottom" />
  52. <Setter Property="Margin" Value="2,5" />
  53. <Setter Property="FontSize" Value="16" />
  54. <Setter Property="FontFamily" Value="Consolas" />
  55. <Setter Property="Template">
  56. <Setter.Value>
  57. <ControlTemplate TargetType="RadioButton">
  58. <Border
  59. Name="radiobutton"
  60. Background="{TemplateBinding Background}"
  61. CornerRadius="5"
  62. Opacity="0.85">
  63. <Grid>
  64. <!--<Border
  65. x:Name="back_border"
  66. BorderBrush="Black"
  67. BorderThickness="0"
  68. CornerRadius="1">
  69. <Border.Effect>
  70. <BlurEffect KernelType="Gaussian" Radius="2" />
  71. </Border.Effect>
  72. </Border>
  73. <Border
  74. x:Name="fore_border"
  75. Margin="2"
  76. BorderBrush="White"
  77. BorderThickness="0"
  78. CornerRadius="{Binding ElementName=button, Path=CornerRadius}"
  79. Opacity="0.7">
  80. <Border.Effect>
  81. <BlurEffect KernelType="Gaussian" Radius="2" />
  82. </Border.Effect>
  83. </Border>-->
  84. <ContentPresenter
  85. HorizontalAlignment="Center"
  86. VerticalAlignment="Center"
  87. Content="{TemplateBinding Content}"
  88. TextBlock.FontFamily="{TemplateBinding FontFamily}"
  89. TextBlock.FontSize="{TemplateBinding FontSize}"
  90. TextBlock.Foreground="{TemplateBinding Foreground}" />
  91. <Image
  92. Name="im"
  93. Source="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png"
  94. Stretch="Fill" />
  95. </Grid>
  96. </Border>
  97. <ControlTemplate.Triggers>
  98. <Trigger Property="IsChecked" Value="True">
  99. <!--<Setter TargetName="back_border" Property="BorderThickness" Value="1,0,1,1" />
  100. <Setter TargetName="back_border" Property="CornerRadius" Value="5" />
  101. <Setter TargetName="fore_border" Property="BorderThickness" Value="0,2,0,0" />
  102. <Setter Property="Background" Value=" #4169E1" />-->
  103. <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 7.png" />
  104. </Trigger>
  105. <Trigger Property="IsChecked" Value="False">
  106. <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png" />
  107. </Trigger>
  108. <Trigger Property="IsMouseOver" Value="True">
  109. <!--<Setter TargetName="back_border" Property="BorderBrush" Value="white" />
  110. <Setter TargetName="back_border" Property="BorderThickness" Value="1,1,1,1" />-->
  111. <Setter TargetName="radiobutton" Property="Opacity" Value="1" />
  112. <!--<Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮背景蓝色.png" />-->
  113. </Trigger>
  114. </ControlTemplate.Triggers>
  115. </ControlTemplate>
  116. </Setter.Value>
  117. </Setter>
  118. </Style>
  119. <Style x:Key="materialMakingButton" TargetType="Button">
  120. <Setter Property="Background" Value="Transparent" />
  121. <Setter Property="FontSize" Value="16" />
  122. <Setter Property="Foreground" Value="#CD5555" />
  123. <Setter Property="BorderThickness" Value="0" />
  124. <Setter Property="HorizontalAlignment" Value="Left" />
  125. <Setter Property="Template">
  126. <Setter.Value>
  127. <ControlTemplate>
  128. <Border
  129. x:Name="brState"
  130. Padding="2"
  131. BorderBrush="White"
  132. BorderThickness="0">
  133. <TextBlock
  134. x:Name="txState"
  135. Margin="1"
  136. HorizontalAlignment="Center"
  137. VerticalAlignment="Center"
  138. Text="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}" />
  139. </Border>
  140. <ControlTemplate.Triggers>
  141. <Trigger Property="IsEnabled" Value="True">
  142. <Setter TargetName="brState" Property="BorderThickness" Value="0" />
  143. <Setter TargetName="brState" Property="CornerRadius" Value="5" />
  144. <Setter TargetName="brState" Property="Background" Value="#F0FFFF" />
  145. <Setter TargetName="txState" Property="Foreground" Value="#CD5555" />
  146. </Trigger>
  147. <DataTrigger Binding="{Binding RecipeStatus}" Value="3">
  148. <Setter TargetName="brState" Property="Background" Value="#F0FFFF" />
  149. <Setter TargetName="txState" Property="Foreground" Value="#3CB371" />
  150. </DataTrigger>
  151. <DataTrigger Binding="{Binding RecipeStatus}" Value="2">
  152. <Setter TargetName="txState" Property="Foreground" Value="Aqua" />
  153. </DataTrigger>
  154. <MultiTrigger>
  155. <MultiTrigger.Conditions>
  156. <Condition Property="IsMouseOver" Value="True" />
  157. <Condition Property="IsEnabled" Value="True" />
  158. </MultiTrigger.Conditions>
  159. <Setter TargetName="txState" Property="FontSize" Value="17 " />
  160. </MultiTrigger>
  161. </ControlTemplate.Triggers>
  162. </ControlTemplate>
  163. </Setter.Value>
  164. </Setter>
  165. <Style.Triggers />
  166. </Style>
  167. <DataTemplate x:Key="TreeItemTemplate" DataType="TreeViewItem">
  168. <Grid Height="28" Margin="50,0,0,0">
  169. <Grid.ColumnDefinitions>
  170. <ColumnDefinition Width="*" />
  171. <ColumnDefinition Width="*" />
  172. </Grid.ColumnDefinitions>
  173. <TextBlock
  174. Margin="10,0"
  175. HorizontalAlignment="Left"
  176. VerticalAlignment="Center"
  177. FontSize="15"
  178. Foreground="#aa2AB2E7"
  179. Text="原料:" />
  180. <TextBlock
  181. Grid.Column="1"
  182. Margin="10,0"
  183. HorizontalAlignment="Left"
  184. VerticalAlignment="Center"
  185. FontSize="15"
  186. Foreground="#aa2AB2E7"
  187. Text="{Binding RawMaterialName}" />
  188. </Grid>
  189. </DataTemplate>
  190. <Style x:Key="recipeTreeItem" TargetType="TreeViewItem">
  191. <Setter Property="Background" Value="Transparent" />
  192. <Setter Property="BorderThickness" Value="0" />
  193. <Setter Property="IsExpanded" Value="True" />
  194. <Setter Property="HeaderTemplate">
  195. <Setter.Value>
  196. <HierarchicalDataTemplate ItemTemplate="{StaticResource TreeItemTemplate}" ItemsSource="{Binding RawMaterials, Mode=TwoWay}">
  197. <StackPanel
  198. Height="28"
  199. HorizontalAlignment="Left"
  200. VerticalAlignment="Center"
  201. Orientation="Horizontal">
  202. <TextBlock
  203. Margin="5,0,0,0"
  204. VerticalAlignment="Center"
  205. FontSize="15"
  206. Foreground="#FF2AB2E7"
  207. Text="配方:" />
  208. <TextBlock
  209. Margin="5,0,0,0"
  210. VerticalAlignment="Center"
  211. FontSize="15"
  212. Foreground="#FF2AB2E7"
  213. Text="{Binding RecipeName}" />
  214. </StackPanel>
  215. </HierarchicalDataTemplate>
  216. </Setter.Value>
  217. </Setter>
  218. <Setter Property="Template">
  219. <Setter.Value>
  220. <ControlTemplate TargetType="{x:Type TreeViewItem}">
  221. <Grid>
  222. <Grid.ColumnDefinitions>
  223. <ColumnDefinition Width="Auto" />
  224. <ColumnDefinition Width="*" />
  225. </Grid.ColumnDefinitions>
  226. <Grid.RowDefinitions>
  227. <RowDefinition Height="Auto" />
  228. <RowDefinition />
  229. </Grid.RowDefinitions>
  230. <Border
  231. x:Name="Bd"
  232. Grid.Column="0"
  233. Padding="{TemplateBinding Padding}"
  234. Background="{TemplateBinding Background}"
  235. BorderBrush="{TemplateBinding BorderBrush}"
  236. BorderThickness="{TemplateBinding BorderThickness}">
  237. <ContentPresenter
  238. x:Name="PART_Header"
  239. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  240. ContentSource="Header" />
  241. </Border>
  242. <ItemsPresenter
  243. x:Name="ItemsHost"
  244. Grid.Row="1"
  245. Grid.Column="0"
  246. Grid.ColumnSpan="2"
  247. Visibility="Collapsed" />
  248. <VisualStateManager.VisualStateGroups>
  249. <VisualStateGroup x:Name="SelectionStates">
  250. <VisualState x:Name="Selected">
  251. <Storyboard>
  252. <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  253. <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
  254. </ColorAnimationUsingKeyFrames>
  255. </Storyboard>
  256. </VisualState>
  257. <VisualState x:Name="Unselected" />
  258. <VisualState x:Name="SelectedInactive">
  259. <Storyboard>
  260. <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  261. <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
  262. </ColorAnimationUsingKeyFrames>
  263. </Storyboard>
  264. </VisualState>
  265. </VisualStateGroup>
  266. <VisualStateGroup x:Name="ExpansionStates">
  267. <VisualState x:Name="Expanded">
  268. <Storyboard>
  269. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="(UIElement.Visibility)">
  270. <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
  271. </ObjectAnimationUsingKeyFrames>
  272. </Storyboard>
  273. </VisualState>
  274. <VisualState x:Name="Collapsed" />
  275. </VisualStateGroup>
  276. </VisualStateManager.VisualStateGroups>
  277. </Grid>
  278. <ControlTemplate.Triggers>
  279. <MultiTrigger>
  280. <MultiTrigger.Conditions>
  281. <Condition Property="HasHeader" Value="false" />
  282. <Condition Property="Width" Value="Auto" />
  283. </MultiTrigger.Conditions>
  284. <Setter TargetName="PART_Header" Property="MinWidth" Value="75" />
  285. </MultiTrigger>
  286. <MultiTrigger>
  287. <MultiTrigger.Conditions>
  288. <Condition Property="HasHeader" Value="false" />
  289. <Condition Property="Height" Value="Auto" />
  290. </MultiTrigger.Conditions>
  291. <Setter TargetName="PART_Header" Property="MinHeight" Value="19" />
  292. </MultiTrigger>
  293. </ControlTemplate.Triggers>
  294. </ControlTemplate>
  295. </Setter.Value>
  296. </Setter>
  297. </Style>
  298. </UserControl.Resources>
  299. <Grid Margin="20">
  300. <Grid.ColumnDefinitions>
  301. <ColumnDefinition />
  302. <ColumnDefinition Width="0.25*" />
  303. </Grid.ColumnDefinitions>
  304. <Grid Name="ggr" Margin="10">
  305. <pry:ImageBorder Width="{Binding ElementName=ggr, Path=ActualWidth}" Height="{Binding ElementName=ggr, Path=ActualHeight}" />
  306. <ListBox
  307. Margin="5"
  308. VerticalAlignment="Top"
  309. Background="Transparent"
  310. BorderThickness="0"
  311. ItemsSource="{Binding Recipes}"
  312. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  313. <ListBox.ItemsPanel>
  314. <ItemsPanelTemplate>
  315. <WrapPanel Orientation="Horizontal" />
  316. </ItemsPanelTemplate>
  317. </ListBox.ItemsPanel>
  318. <ListBox.ItemTemplate>
  319. <DataTemplate>
  320. <Grid
  321. Name="tt"
  322. Width="180"
  323. Height="220"
  324. Margin="5">
  325. <Grid.RowDefinitions>
  326. <RowDefinition Height="30" />
  327. <RowDefinition Height="20" />
  328. <RowDefinition Height="128" />
  329. <RowDefinition Height="2" />
  330. <RowDefinition Height="40" />
  331. </Grid.RowDefinitions>
  332. <Image
  333. Grid.RowSpan="5"
  334. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  335. Stretch="Fill" />
  336. <TextBlock
  337. Grid.Row="0"
  338. Margin="2,5,0,0"
  339. HorizontalAlignment="Center"
  340. VerticalAlignment="Top"
  341. FontSize="18"
  342. Foreground="#FF2AB2E7"
  343. Text="{Binding RecipeName}" />
  344. <TextBlock
  345. Grid.Row="1"
  346. Margin="5,0,0,0"
  347. VerticalAlignment="Top"
  348. Foreground="#FF2AB2E7"
  349. Text="配方信息:" />
  350. <ScrollViewer
  351. Grid.Row="2"
  352. VerticalAlignment="Top"
  353. Background="Transparent"
  354. HorizontalScrollBarVisibility="Hidden"
  355. VerticalScrollBarVisibility="Hidden">
  356. <Grid>
  357. <Grid.ColumnDefinitions>
  358. <ColumnDefinition Width="auto" />
  359. <ColumnDefinition />
  360. </Grid.ColumnDefinitions>
  361. <ItemsControl ItemsSource="{Binding RawMaterials}">
  362. <ItemsControl.ItemTemplate>
  363. <DataTemplate>
  364. <Grid>
  365. <TextBlock
  366. Grid.Row="1"
  367. Margin="5,0,0,0"
  368. HorizontalAlignment="Right"
  369. VerticalAlignment="Center"
  370. Foreground="#aa2AB2E7"
  371. Text="{Binding RawMaterialName}" />
  372. </Grid>
  373. </DataTemplate>
  374. </ItemsControl.ItemTemplate>
  375. </ItemsControl>
  376. <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
  377. <ItemsControl.ItemTemplate>
  378. <DataTemplate>
  379. <StackPanel Orientation="Horizontal">
  380. <TextBlock
  381. Margin="5,0,0,0"
  382. HorizontalAlignment="Center"
  383. VerticalAlignment="Center"
  384. Foreground="#aa2AB2E7"
  385. Text=":" />
  386. <TextBlock
  387. Margin="5,0,0,0"
  388. HorizontalAlignment="Center"
  389. VerticalAlignment="Center"
  390. Foreground="#aa2AB2E7"
  391. Text="{Binding RawMaterialWeight}" />
  392. <TextBlock
  393. Margin="5,0,0,0"
  394. HorizontalAlignment="Center"
  395. VerticalAlignment="Center"
  396. Foreground="#aa2AB2E7"
  397. Text="g" />
  398. </StackPanel>
  399. </DataTemplate>
  400. </ItemsControl.ItemTemplate>
  401. </ItemsControl>
  402. </Grid>
  403. </ScrollViewer>
  404. <!--<Grid
  405. Grid.Row="3"
  406. Height="2"
  407. VerticalAlignment="Bottom">
  408. <Grid.Background>
  409. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/直线.png" Stretch="Fill" />
  410. </Grid.Background>
  411. </Grid>-->
  412. <Image
  413. Grid.Row="3"
  414. Width="{Binding ElementName=tt, Path=ActualWidth}"
  415. Height="2"
  416. VerticalAlignment="Bottom"
  417. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  418. Stretch="Fill" />
  419. <Grid
  420. Name="gr"
  421. Grid.Row="4"
  422. Height="30"
  423. Margin="0,0,0,10"
  424. VerticalAlignment="Bottom"
  425. Background="Transparent">
  426. <!--<Grid.ColumnDefinitions>
  427. <ColumnDefinition />
  428. <ColumnDefinition />
  429. </Grid.ColumnDefinitions>-->
  430. <!--<Image
  431. Height="2"
  432. Grid.ColumnSpan="2"
  433. Width="{Binding ElementName=gr, Path=ActualWidth}"
  434. VerticalAlignment="Top"
  435. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  436. <pry:IcoButton
  437. Width="{Binding ElementName=gr, Path=ActualWidth}"
  438. Height="{Binding ElementName=gr, Path=ActualHeight}"
  439. Margin="4,4,4,0"
  440. HorizontalAlignment="Center"
  441. VerticalAlignment="Center"
  442. Background="#222bd06f"
  443. BorderThickness="0"
  444. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  445. CommandParameter="{Binding RecipeName}"
  446. Content="配方下发"
  447. EnterBackground="#332bd06f"
  448. FontStyle="Normal"
  449. Foreground="#ff2bd06f"
  450. IcoText="&#xe6cf;"
  451. IsEnabled="{Binding IsEnable}"
  452. Style="{StaticResource IcoButtonStyle}" />
  453. <!--<pry:IcoButton
  454. Width="{Binding ElementName=gr, Path=ActualWidth}"
  455. Height="{Binding ElementName=gr, Path=ActualHeight}"
  456. Margin="4,4,3,0"
  457. HorizontalAlignment="Center"
  458. VerticalAlignment="Center"
  459. Background="#11F53F62"
  460. BorderThickness="0"
  461. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  462. CommandParameter="{Binding RecipCode}"
  463. Content="删除"
  464. EnterBackground="#22F53F62"
  465. FontStyle="Normal"
  466. Foreground="#FFF53F62"
  467. IcoText="&#xe68e;"
  468. Style="{StaticResource IcoButtonStyle}" />
  469. <pry:IcoButton
  470. Grid.Column="1"
  471. Width="{Binding ElementName=gr, Path=ActualWidth}"
  472. Height="{Binding ElementName=gr, Path=ActualHeight}"
  473. Margin="3,4,4,0"
  474. HorizontalAlignment="Center"
  475. VerticalAlignment="Center"
  476. Background="#112AB2E7"
  477. BorderThickness="0"
  478. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  479. CommandParameter="{Binding RecipCode}"
  480. Content="编辑"
  481. EnterBackground="#222AB2E7"
  482. Foreground="#FF2AB2E7"
  483. IcoText="&#xe636;"
  484. Style="{StaticResource IcoButtonStyle}" />-->
  485. </Grid>
  486. <!--</StackPanel>-->
  487. </Grid>
  488. <!--<Grid Name="tt" Margin="5">
  489. <Grid.RowDefinitions>
  490. <RowDefinition Height="auto" />
  491. <RowDefinition Height="auto" />
  492. <RowDefinition />
  493. <RowDefinition />
  494. </Grid.RowDefinitions>
  495. <Image
  496. Grid.RowSpan="4"
  497. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  498. Stretch="Fill" />
  499. <TextBlock
  500. Grid.Row="0"
  501. Margin="2,5,0,0"
  502. HorizontalAlignment="Center"
  503. VerticalAlignment="Top"
  504. FontSize="18"
  505. Foreground="#FF2AB2E7"
  506. Text="{Binding RecipeName}" />
  507. <TextBlock
  508. Grid.Row="1"
  509. Margin="5,0,0,5"
  510. Foreground="#ffc000"
  511. Text="配方信息:" />
  512. <ScrollViewer
  513. Grid.Row="2"
  514. HorizontalScrollBarVisibility="Hidden"
  515. VerticalScrollBarVisibility="Hidden">
  516. <Grid>
  517. <Grid.ColumnDefinitions>
  518. <ColumnDefinition Width="auto" />
  519. <ColumnDefinition />
  520. </Grid.ColumnDefinitions>
  521. <ItemsControl ItemsSource="{Binding RawMaterials}">
  522. <ItemsControl.ItemTemplate>
  523. <DataTemplate>
  524. <Grid>
  525. <TextBlock
  526. Grid.Row="1"
  527. Margin="5,0,0,0"
  528. HorizontalAlignment="Right"
  529. VerticalAlignment="Center"
  530. Foreground="#aaffc000"
  531. Text="{Binding RawMaterialName}" />
  532. </Grid>
  533. </DataTemplate>
  534. </ItemsControl.ItemTemplate>
  535. </ItemsControl>
  536. <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
  537. <ItemsControl.ItemTemplate>
  538. <DataTemplate>
  539. <StackPanel Orientation="Horizontal">
  540. <TextBlock
  541. Margin="5,0,0,0"
  542. HorizontalAlignment="Center"
  543. VerticalAlignment="Center"
  544. Foreground="#aaffc000"
  545. Text=":" />
  546. <TextBlock
  547. Margin="5,0,0,0"
  548. HorizontalAlignment="Center"
  549. VerticalAlignment="Center"
  550. Foreground="#aaffc000"
  551. Text="{Binding RawMaterialWeight}" />
  552. <TextBlock
  553. Margin="5,0,0,0"
  554. HorizontalAlignment="Center"
  555. VerticalAlignment="Center"
  556. Foreground="#aaffc000"
  557. Text="g" />
  558. </StackPanel>
  559. </DataTemplate>
  560. </ItemsControl.ItemTemplate>
  561. </ItemsControl>
  562. </Grid>
  563. </ScrollViewer>
  564. <Grid
  565. Name="grb"
  566. Grid.Row="3"
  567. Height="30"
  568. Margin="0,0,0,10"
  569. VerticalAlignment="Bottom"
  570. Background="Transparent">
  571. <Image
  572. Width="{Binding ElementName=grb, Path=ActualWidth}"
  573. VerticalAlignment="Top"
  574. StretchDirection="Both"
  575. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />
  576. <pry:IcoButton
  577. Width="{Binding ElementName=grb, Path=ActualWidth}"
  578. Height="{Binding ElementName=grb, Path=ActualHeight}"
  579. Margin="4,4,4,0"
  580. HorizontalAlignment="Center"
  581. VerticalAlignment="Center"
  582. Background="#222bd06f"
  583. BorderThickness="0"
  584. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  585. CommandParameter="{Binding RecipeName}"
  586. Content="配方下发"
  587. EnterBackground="#332bd06f"
  588. FontStyle="Normal"
  589. Foreground="#ff2bd06f"
  590. IcoText="&#xe6cf;"
  591. IsEnabled="{Binding IsEnable}"
  592. Style="{StaticResource IcoButtonStyle}" />
  593. </Grid>
  594. </Grid>-->
  595. </DataTemplate>
  596. </ListBox.ItemTemplate>
  597. </ListBox>
  598. </Grid>
  599. <Grid
  600. Name="gr"
  601. Grid.Column="1"
  602. Margin="10">
  603. <Grid.RowDefinitions>
  604. <RowDefinition Height="50" />
  605. <RowDefinition />
  606. </Grid.RowDefinitions>
  607. <pry:ImageBorder
  608. Grid.RowSpan="2"
  609. Width="{Binding ElementName=gr, Path=ActualWidth}"
  610. Height="{Binding ElementName=gr, Path=ActualHeight}" />
  611. <Grid Margin="5">
  612. <Grid.ColumnDefinitions>
  613. <ColumnDefinition />
  614. <ColumnDefinition />
  615. <ColumnDefinition />
  616. </Grid.ColumnDefinitions>
  617. <RadioButton
  618. Click="RadioButtonWait_Click"
  619. Command="{Binding ChangeRecipeStateCommand}"
  620. Content="等待中"
  621. GroupName="state"
  622. IsChecked="True"
  623. Style="{DynamicResource RadioState}" />
  624. <RadioButton
  625. Grid.Column="1"
  626. Click="RadioButtonMaking_Click"
  627. Content="执行中"
  628. GroupName="state"
  629. Style="{DynamicResource RadioState}" />
  630. <RadioButton
  631. Grid.Column="2"
  632. Click="RadioButtonCompelete_Click"
  633. Content="已完成"
  634. GroupName="state"
  635. Style="{DynamicResource RadioState}" />
  636. </Grid>
  637. <!--<ScrollViewer
  638. Grid.Row="1"
  639. HorizontalScrollBarVisibility="Hidden"
  640. VerticalScrollBarVisibility="Hidden">
  641. <Border>
  642. <Grid Grid.Row="1">
  643. <Grid x:Name="repiceListMaking" Margin="5">
  644. <Grid.RowDefinitions>
  645. <RowDefinition Height="30" />
  646. <RowDefinition />
  647. </Grid.RowDefinitions>
  648. <TextBlock
  649. Margin="10,0"
  650. HorizontalAlignment="Left"
  651. VerticalAlignment="Center"
  652. FontSize="18"
  653. Foreground="#FF2AB2E7"
  654. Text="{Binding CurrentRecipeName}" />
  655. <ItemsControl
  656. Grid.Row="1"
  657. Margin="50,0"
  658. ItemsSource="{Binding recipeProcesses}">
  659. <ItemsControl.ItemTemplate>
  660. <DataTemplate>
  661. <Grid Margin="5">
  662. <Grid.ColumnDefinitions>
  663. <ColumnDefinition />
  664. <ColumnDefinition Width="16" />
  665. <ColumnDefinition />
  666. </Grid.ColumnDefinitions>
  667. <TextBlock
  668. Margin="10,0,5,0"
  669. HorizontalAlignment="Left"
  670. VerticalAlignment="Center"
  671. FontSize="15"
  672. Foreground="#AA2AB2E7"
  673. Text="{Binding RawMaterialName}"
  674. ToolTip="{Binding RawMaterialSource, Converter={StaticResource IntToSourceConvert}}" />
  675. <TextBlock
  676. Grid.Column="1"
  677. Margin="0,0,5,0"
  678. HorizontalAlignment="Left"
  679. VerticalAlignment="Center"
  680. FontSize="15"
  681. Foreground="#AA2AB2E7"
  682. Text=":" />
  683. <Button
  684. Grid.Column="2"
  685. HorizontalAlignment="Center"
  686. VerticalAlignment="Center"
  687. Command="{Binding DataContext.ChangeRecipeStateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  688. CommandParameter="{Binding RawMaterialId}"
  689. Content="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}"
  690. IsEnabled="{Binding RawMaterialSource, Converter={StaticResource EnbleConvert}}"
  691. Style="{StaticResource materialMakingButton}" />
  692. </Grid>
  693. </DataTemplate>
  694. </ItemsControl.ItemTemplate>
  695. </ItemsControl>
  696. </Grid>
  697. -->
  698. <!--<TreeView x:Name="repiceListMaking" ItemsSource="{Binding RecipeProcesse}"
  699. ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Background="Wheat" ItemContainerStyle="{StaticResource recipeTreeItem}">
  700. </TreeView>-->
  701. <!-- 等待和已完成 -->
  702. <!--<TreeView
  703. x:Name="repiceList"
  704. HorizontalAlignment="Stretch"
  705. Background="Transparent"
  706. BorderThickness="0"
  707. ItemContainerStyle="{StaticResource recipeTreeItem}"
  708. ItemsSource="{Binding UserTreeWait}"
  709. ScrollViewer.VerticalScrollBarVisibility="Visible" />-->
  710. <!--
  711. </Grid>
  712. </Border>
  713. </ScrollViewer>-->
  714. <!--#region 等待制作和制作完成列表显示-->
  715. <Grid
  716. Name="WaitOrCompleteGrid"
  717. Grid.Row="1"
  718. Margin="10">
  719. <Grid.RowDefinitions>
  720. <RowDefinition Height="30" />
  721. <RowDefinition />
  722. </Grid.RowDefinitions>
  723. <!--#region 表格标题栏设置-->
  724. <Grid
  725. Grid.Row="0"
  726. Margin="0,5"
  727. Background="#ff0C255F">
  728. <Grid.ColumnDefinitions>
  729. <ColumnDefinition Width="50" />
  730. <ColumnDefinition />
  731. <ColumnDefinition Width="100" />
  732. </Grid.ColumnDefinitions>
  733. <TextBlock
  734. Grid.Column="0"
  735. Style="{StaticResource TitleTextblockStyle}"
  736. Text="序号" />
  737. <Grid Grid.Column="1">
  738. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="配方名称" />
  739. <Border
  740. BorderBrush="{StaticResource bordColor}"
  741. BorderThickness="1,0,1,0"
  742. Cursor="SizeWE" />
  743. </Grid>
  744. <TextBlock
  745. Grid.Column="2"
  746. Style="{StaticResource TitleTextblockStyle}"
  747. Text="状态" />
  748. <Border
  749. Grid.ColumnSpan="10"
  750. BorderBrush="{StaticResource bordColor}"
  751. BorderThickness="1,0,1,0" />
  752. </Grid>
  753. <!--#endregion-->
  754. <ScrollViewer
  755. Grid.Row="1"
  756. HorizontalScrollBarVisibility="Hidden"
  757. VerticalScrollBarVisibility="Hidden">
  758. <ItemsControl Name="Wait" ItemsSource="{Binding UserTreeWait}">
  759. <ItemsControl.ItemTemplate>
  760. <DataTemplate>
  761. <Grid Height="30">
  762. <Grid.ColumnDefinitions>
  763. <ColumnDefinition Width="50" />
  764. <ColumnDefinition />
  765. <ColumnDefinition Width="100" />
  766. </Grid.ColumnDefinitions>
  767. <TextBlock
  768. HorizontalAlignment="Center"
  769. VerticalAlignment="Center"
  770. FontSize="16"
  771. Foreground="#FF2AB2E7"
  772. Text="{Binding SerialNum}" />
  773. <Grid Grid.Column="1">
  774. <TextBlock
  775. Grid.Column="1"
  776. Margin="5,0,0,0"
  777. HorizontalAlignment="Left"
  778. VerticalAlignment="Center"
  779. FontSize="16"
  780. Foreground="#FF2AB2E7"
  781. Text="{Binding RecipeName}" />
  782. <Border
  783. BorderBrush="{StaticResource bordColor}"
  784. BorderThickness="1,0,1,0"
  785. Cursor="SizeWE" />
  786. </Grid>
  787. <TextBlock
  788. Grid.Column="2"
  789. HorizontalAlignment="Center"
  790. VerticalAlignment="Center"
  791. FontSize="16"
  792. Foreground="{Binding RecipStatus, Converter={StaticResource RecipeStatusConvert}}"
  793. Text="{Binding RecipStatus}" />
  794. <Border
  795. Grid.ColumnSpan="10"
  796. BorderBrush="{StaticResource bordColor}"
  797. BorderThickness="1" />
  798. </Grid>
  799. </DataTemplate>
  800. </ItemsControl.ItemTemplate>
  801. </ItemsControl>
  802. </ScrollViewer>
  803. </Grid>
  804. <!--#endregion-->
  805. <!--#region 制作中设备状态监视-->
  806. <Grid
  807. Name="CookingGrid"
  808. Grid.Row="1"
  809. Margin="10"
  810. Visibility="Collapsed">
  811. <!--<Grid.RowDefinitions>
  812. <RowDefinition Height="30"/>
  813. <RowDefinition/>
  814. </Grid.RowDefinitions>-->
  815. <ItemsControl ItemsSource="{Binding recipeProcesses}">
  816. <ItemsControl.ItemTemplate>
  817. <DataTemplate>
  818. <Grid>
  819. <Grid.RowDefinitions>
  820. <RowDefinition Height="30" />
  821. <RowDefinition Height="30" />
  822. <RowDefinition Height="auto" />
  823. <RowDefinition Height="40" />
  824. <RowDefinition Height="10" />
  825. </Grid.RowDefinitions>
  826. <Image
  827. Grid.RowSpan="5"
  828. Source="/BPASmartClient.CustomResource;component/Image/背景边框4.png"
  829. Stretch="Fill" />
  830. <!--<Image
  831. Grid.RowSpan="4"
  832. Source="/BPASmartClient.CustomResource;component/Image/组合边框2.png"
  833. Stretch="Fill" />-->
  834. <TextBlock
  835. Grid.Row="0"
  836. Margin="0,5,0,0"
  837. HorizontalAlignment="Center"
  838. VerticalAlignment="Top"
  839. FontSize="18"
  840. Foreground="#FF2AB2E7"
  841. Text="{Binding RecipeName}" />
  842. <!--#region 表格标题栏设置-->
  843. <Grid
  844. Grid.Row="1"
  845. Height="30"
  846. Margin="5,0"
  847. VerticalAlignment="Top"
  848. Background="#ff0C255F">
  849. <Grid.ColumnDefinitions>
  850. <ColumnDefinition />
  851. <ColumnDefinition />
  852. </Grid.ColumnDefinitions>
  853. <TextBlock
  854. Grid.Column="0"
  855. Style="{StaticResource TitleTextblockStyle}"
  856. Text="原料" />
  857. <Grid Grid.Column="1">
  858. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="状态" />
  859. <Border
  860. BorderBrush="{StaticResource bordColor}"
  861. BorderThickness="1,0,1,0"
  862. Cursor="SizeWE" />
  863. </Grid>
  864. <Border
  865. Grid.ColumnSpan="10"
  866. BorderBrush="{StaticResource bordColor}"
  867. BorderThickness="1,0,1,0" />
  868. </Grid>
  869. <!--#endregion-->
  870. <ItemsControl
  871. Grid.Row="2"
  872. Margin="0,0,0,15"
  873. ItemsSource="{Binding RawMaterials}">
  874. <ItemsControl.ItemTemplate>
  875. <DataTemplate>
  876. <Grid Height="30">
  877. <Grid.ColumnDefinitions>
  878. <ColumnDefinition />
  879. <ColumnDefinition />
  880. </Grid.ColumnDefinitions>
  881. <StackPanel
  882. Margin="0,0,5,0"
  883. HorizontalAlignment="Right"
  884. Orientation="Horizontal">
  885. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="{Binding RawMaterialName}" />
  886. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text=":" />
  887. </StackPanel>
  888. <StackPanel
  889. Grid.Column="1"
  890. Margin="2,0,0,0"
  891. Orientation="Horizontal">
  892. <TextBlock
  893. Margin="0,0,5,0"
  894. Foreground="{Binding Status, Converter={StaticResource ForegroundConverter}}"
  895. Style="{StaticResource TitleTextblockStyle}"
  896. Text="{Binding Status}" />
  897. <TextBlock
  898. FontFamily="/BPASmartClient.CustomResource;component/Fonts/#iconfont"
  899. FontSize="20"
  900. Foreground="{Binding Status, Converter={StaticResource ForegroundConverter}}"
  901. Style="{StaticResource TitleTextblockStyle}"
  902. Text="{Binding Status, Converter={StaticResource StatusIconConverter}}" />
  903. </StackPanel>
  904. </Grid>
  905. </DataTemplate>
  906. </ItemsControl.ItemTemplate>
  907. </ItemsControl>
  908. <Button
  909. Grid.Row="3"
  910. Height="40"
  911. Margin="20,0,20,0"
  912. VerticalContentAlignment="Center"
  913. Command="{Binding DataContext.CancelRecipeCommand, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
  914. CommandParameter="{Binding}"
  915. Content="取消配料"
  916. FontSize="16"
  917. Style="{StaticResource ControlButtonStyle}" />
  918. <!--<Button
  919. Grid.Row="3"
  920. Height="40"
  921. Margin="5,0,5,0"
  922. Command="{Binding CancelRecipeCommand}"
  923. CommandParameter="{Binding}"
  924. Content="取消配料"
  925. FontSize="20"
  926. Style="{StaticResource ImageButtonStyle}" />-->
  927. </Grid>
  928. </DataTemplate>
  929. </ItemsControl.ItemTemplate>
  930. </ItemsControl>
  931. </Grid>
  932. <!--#endregion-->
  933. </Grid>
  934. </Grid>
  935. </UserControl>