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

RecipeSendDownView.xaml 47 KiB

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