终端一体化运控平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

RecipeControlView.xaml 42 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodSmallStation.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.JXJFoodSmallStation.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.JXJFoodSmallStation.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.JXJFoodSmallStation.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 RemoteRecipes}"
  312. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  313. <ListBox.ItemsPanel>
  314. <ItemsPanelTemplate>
  315. <UniformGrid
  316. HorizontalAlignment="Left"
  317. VerticalAlignment="Top"
  318. Columns="6" />
  319. </ItemsPanelTemplate>
  320. </ListBox.ItemsPanel>
  321. <ListBox.ItemTemplate>
  322. <DataTemplate>
  323. <Grid
  324. Name="tt"
  325. Height="220"
  326. Margin="5">
  327. <Grid.RowDefinitions>
  328. <RowDefinition Height="30" />
  329. <RowDefinition Height="20" />
  330. <RowDefinition Height="128" />
  331. <RowDefinition Height="2" />
  332. <RowDefinition Height="40" />
  333. </Grid.RowDefinitions>
  334. <Image
  335. Grid.RowSpan="5"
  336. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  337. Stretch="Fill" />
  338. <TextBlock
  339. Grid.Row="0"
  340. Margin="2,5,0,0"
  341. HorizontalAlignment="Center"
  342. VerticalAlignment="Top"
  343. FontSize="18"
  344. Foreground="#FF2AB2E7"
  345. Text="{Binding RecipeName}" />
  346. <TextBlock
  347. Grid.Row="1"
  348. Margin="5,0,0,0"
  349. VerticalAlignment="Top"
  350. Foreground="#FF2AB2E7"
  351. Text="配方信息:" />
  352. <ScrollViewer
  353. Grid.Row="2"
  354. VerticalAlignment="Top"
  355. Background="Transparent"
  356. HorizontalScrollBarVisibility="Hidden"
  357. VerticalScrollBarVisibility="Hidden">
  358. <Grid>
  359. <Grid.ColumnDefinitions>
  360. <ColumnDefinition Width="auto" />
  361. <ColumnDefinition />
  362. </Grid.ColumnDefinitions>
  363. <ItemsControl ItemsSource="{Binding RawMaterials}">
  364. <ItemsControl.ItemTemplate>
  365. <DataTemplate>
  366. <Grid>
  367. <TextBlock
  368. Grid.Row="1"
  369. Margin="5,0,0,0"
  370. HorizontalAlignment="Right"
  371. VerticalAlignment="Center"
  372. Foreground="#aa2AB2E7"
  373. Text="{Binding RawMaterialName}" />
  374. </Grid>
  375. </DataTemplate>
  376. </ItemsControl.ItemTemplate>
  377. </ItemsControl>
  378. <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
  379. <ItemsControl.ItemTemplate>
  380. <DataTemplate>
  381. <StackPanel Orientation="Horizontal">
  382. <TextBlock
  383. Margin="5,0,0,0"
  384. HorizontalAlignment="Center"
  385. VerticalAlignment="Center"
  386. Foreground="#aa2AB2E7"
  387. Text=":" />
  388. <TextBlock
  389. Margin="5,0,0,0"
  390. HorizontalAlignment="Center"
  391. VerticalAlignment="Center"
  392. Foreground="#aa2AB2E7"
  393. Text="{Binding RawMaterialWeight}" />
  394. <TextBlock
  395. Margin="5,0,0,0"
  396. HorizontalAlignment="Center"
  397. VerticalAlignment="Center"
  398. Foreground="#aa2AB2E7"
  399. Text="g" />
  400. </StackPanel>
  401. </DataTemplate>
  402. </ItemsControl.ItemTemplate>
  403. </ItemsControl>
  404. </Grid>
  405. </ScrollViewer>
  406. <!--<Grid
  407. Grid.Row="3"
  408. Height="2"
  409. VerticalAlignment="Bottom">
  410. <Grid.Background>
  411. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/直线.png" Stretch="Fill" />
  412. </Grid.Background>
  413. </Grid>-->
  414. <Image
  415. Grid.Row="3"
  416. Width="{Binding ElementName=tt, Path=ActualWidth}"
  417. Height="2"
  418. VerticalAlignment="Bottom"
  419. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  420. Stretch="Fill" />
  421. <Grid
  422. Name="gr"
  423. Grid.Row="4"
  424. Height="30"
  425. Margin="0,0,0,10"
  426. VerticalAlignment="Bottom"
  427. Background="Transparent">
  428. <!--<Grid.ColumnDefinitions>
  429. <ColumnDefinition />
  430. <ColumnDefinition />
  431. </Grid.ColumnDefinitions>-->
  432. <!--<Image
  433. Height="2"
  434. Grid.ColumnSpan="2"
  435. Width="{Binding ElementName=gr, Path=ActualWidth}"
  436. VerticalAlignment="Top"
  437. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  438. <pry:IcoButton
  439. Width="{Binding ElementName=gr, Path=ActualWidth}"
  440. Height="{Binding ElementName=gr, Path=ActualHeight}"
  441. Margin="4,4,4,0"
  442. HorizontalAlignment="Center"
  443. VerticalAlignment="Center"
  444. Background="#222bd06f"
  445. BorderThickness="0"
  446. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  447. CommandParameter="{Binding RecipeName}"
  448. Content="配方下发"
  449. EnterBackground="#332bd06f"
  450. FontStyle="Normal"
  451. Foreground="#ff2bd06f"
  452. IcoText="&#xe6cf;"
  453. IsEnabled="{Binding IsEnable}"
  454. Style="{StaticResource IcoButtonStyle}" />
  455. <!--<pry:IcoButton
  456. Width="{Binding ElementName=gr, Path=ActualWidth}"
  457. Height="{Binding ElementName=gr, Path=ActualHeight}"
  458. Margin="4,4,3,0"
  459. HorizontalAlignment="Center"
  460. VerticalAlignment="Center"
  461. Background="#11F53F62"
  462. BorderThickness="0"
  463. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  464. CommandParameter="{Binding RecipCode}"
  465. Content="删除"
  466. EnterBackground="#22F53F62"
  467. FontStyle="Normal"
  468. Foreground="#FFF53F62"
  469. IcoText="&#xe68e;"
  470. Style="{StaticResource IcoButtonStyle}" />
  471. <pry:IcoButton
  472. Grid.Column="1"
  473. Width="{Binding ElementName=gr, Path=ActualWidth}"
  474. Height="{Binding ElementName=gr, Path=ActualHeight}"
  475. Margin="3,4,4,0"
  476. HorizontalAlignment="Center"
  477. VerticalAlignment="Center"
  478. Background="#112AB2E7"
  479. BorderThickness="0"
  480. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  481. CommandParameter="{Binding RecipCode}"
  482. Content="编辑"
  483. EnterBackground="#222AB2E7"
  484. Foreground="#FF2AB2E7"
  485. IcoText="&#xe636;"
  486. Style="{StaticResource IcoButtonStyle}" />-->
  487. </Grid>
  488. <!--</StackPanel>-->
  489. </Grid>
  490. <!--<Grid Name="tt" Margin="5">
  491. <Grid.RowDefinitions>
  492. <RowDefinition Height="auto" />
  493. <RowDefinition Height="auto" />
  494. <RowDefinition />
  495. <RowDefinition />
  496. </Grid.RowDefinitions>
  497. <Image
  498. Grid.RowSpan="4"
  499. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  500. Stretch="Fill" />
  501. <TextBlock
  502. Grid.Row="0"
  503. Margin="2,5,0,0"
  504. HorizontalAlignment="Center"
  505. VerticalAlignment="Top"
  506. FontSize="18"
  507. Foreground="#FF2AB2E7"
  508. Text="{Binding RecipeName}" />
  509. <TextBlock
  510. Grid.Row="1"
  511. Margin="5,0,0,5"
  512. Foreground="#ffc000"
  513. Text="配方信息:" />
  514. <ScrollViewer
  515. Grid.Row="2"
  516. HorizontalScrollBarVisibility="Hidden"
  517. VerticalScrollBarVisibility="Hidden">
  518. <Grid>
  519. <Grid.ColumnDefinitions>
  520. <ColumnDefinition Width="auto" />
  521. <ColumnDefinition />
  522. </Grid.ColumnDefinitions>
  523. <ItemsControl ItemsSource="{Binding RawMaterials}">
  524. <ItemsControl.ItemTemplate>
  525. <DataTemplate>
  526. <Grid>
  527. <TextBlock
  528. Grid.Row="1"
  529. Margin="5,0,0,0"
  530. HorizontalAlignment="Right"
  531. VerticalAlignment="Center"
  532. Foreground="#aaffc000"
  533. Text="{Binding RawMaterialName}" />
  534. </Grid>
  535. </DataTemplate>
  536. </ItemsControl.ItemTemplate>
  537. </ItemsControl>
  538. <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
  539. <ItemsControl.ItemTemplate>
  540. <DataTemplate>
  541. <StackPanel Orientation="Horizontal">
  542. <TextBlock
  543. Margin="5,0,0,0"
  544. HorizontalAlignment="Center"
  545. VerticalAlignment="Center"
  546. Foreground="#aaffc000"
  547. Text=":" />
  548. <TextBlock
  549. Margin="5,0,0,0"
  550. HorizontalAlignment="Center"
  551. VerticalAlignment="Center"
  552. Foreground="#aaffc000"
  553. Text="{Binding RawMaterialWeight}" />
  554. <TextBlock
  555. Margin="5,0,0,0"
  556. HorizontalAlignment="Center"
  557. VerticalAlignment="Center"
  558. Foreground="#aaffc000"
  559. Text="g" />
  560. </StackPanel>
  561. </DataTemplate>
  562. </ItemsControl.ItemTemplate>
  563. </ItemsControl>
  564. </Grid>
  565. </ScrollViewer>
  566. <Grid
  567. Name="grb"
  568. Grid.Row="3"
  569. Height="30"
  570. Margin="0,0,0,10"
  571. VerticalAlignment="Bottom"
  572. Background="Transparent">
  573. <Image
  574. Width="{Binding ElementName=grb, Path=ActualWidth}"
  575. VerticalAlignment="Top"
  576. StretchDirection="Both"
  577. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />
  578. <pry:IcoButton
  579. Width="{Binding ElementName=grb, Path=ActualWidth}"
  580. Height="{Binding ElementName=grb, Path=ActualHeight}"
  581. Margin="4,4,4,0"
  582. HorizontalAlignment="Center"
  583. VerticalAlignment="Center"
  584. Background="#222bd06f"
  585. BorderThickness="0"
  586. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  587. CommandParameter="{Binding RecipeName}"
  588. Content="配方下发"
  589. EnterBackground="#332bd06f"
  590. FontStyle="Normal"
  591. Foreground="#ff2bd06f"
  592. IcoText="&#xe6cf;"
  593. IsEnabled="{Binding IsEnable}"
  594. Style="{StaticResource IcoButtonStyle}" />
  595. </Grid>
  596. </Grid>-->
  597. </DataTemplate>
  598. </ListBox.ItemTemplate>
  599. </ListBox>
  600. </Grid>
  601. <Grid
  602. Name="gr"
  603. Grid.Column="1"
  604. Margin="10">
  605. <Grid.RowDefinitions>
  606. <RowDefinition Height="50" />
  607. <RowDefinition />
  608. </Grid.RowDefinitions>
  609. <pry:ImageBorder
  610. Grid.RowSpan="2"
  611. Width="{Binding ElementName=gr, Path=ActualWidth}"
  612. Height="{Binding ElementName=gr, Path=ActualHeight}" />
  613. <Grid Margin="5">
  614. <Grid.ColumnDefinitions>
  615. <ColumnDefinition />
  616. <ColumnDefinition />
  617. <ColumnDefinition />
  618. </Grid.ColumnDefinitions>
  619. <RadioButton
  620. Click="RadioButtonWait_Click"
  621. Command="{Binding ChangeRecipeStateCommand}"
  622. Content="等待中"
  623. GroupName="state"
  624. IsChecked="True"
  625. Style="{DynamicResource RadioState}" />
  626. <RadioButton
  627. Grid.Column="1"
  628. Click="RadioButtonMaking_Click"
  629. Content="执行中"
  630. GroupName="state"
  631. Style="{DynamicResource RadioState}" />
  632. <RadioButton
  633. Grid.Column="2"
  634. Click="RadioButtonCompelete_Click"
  635. Content="已完成"
  636. GroupName="state"
  637. Style="{DynamicResource RadioState}" />
  638. </Grid>
  639. <ScrollViewer
  640. Grid.Row="1"
  641. HorizontalScrollBarVisibility="Hidden"
  642. VerticalScrollBarVisibility="Hidden">
  643. <Border>
  644. <Grid Grid.Row="1">
  645. <Grid x:Name="repiceListMaking" Margin="5">
  646. <Grid.RowDefinitions>
  647. <RowDefinition Height="30" />
  648. <RowDefinition />
  649. </Grid.RowDefinitions>
  650. <TextBlock
  651. Margin="10,0"
  652. HorizontalAlignment="Left"
  653. VerticalAlignment="Center"
  654. FontSize="18"
  655. Foreground="#FF2AB2E7"
  656. Text="{Binding CurrentRecipeName}" />
  657. <ItemsControl
  658. Grid.Row="1"
  659. Margin="50,0"
  660. ItemsSource="{Binding recipeProcesses}">
  661. <ItemsControl.ItemTemplate>
  662. <DataTemplate>
  663. <Grid Margin="5">
  664. <Grid.ColumnDefinitions>
  665. <ColumnDefinition />
  666. <ColumnDefinition Width="16" />
  667. <ColumnDefinition />
  668. </Grid.ColumnDefinitions>
  669. <TextBlock
  670. Margin="10,0,5,0"
  671. HorizontalAlignment="Left"
  672. VerticalAlignment="Center"
  673. FontSize="15"
  674. Foreground="#AA2AB2E7"
  675. Text="{Binding RawMaterialName}"
  676. ToolTip="{Binding RawMaterialSource, Converter={StaticResource IntToSourceConvert}}" />
  677. <TextBlock
  678. Grid.Column="1"
  679. Margin="0,0,5,0"
  680. HorizontalAlignment="Left"
  681. VerticalAlignment="Center"
  682. FontSize="15"
  683. Foreground="#AA2AB2E7"
  684. Text=":" />
  685. <Button
  686. Grid.Column="2"
  687. HorizontalAlignment="Center"
  688. VerticalAlignment="Center"
  689. Command="{Binding DataContext.ChangeRecipeStateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  690. CommandParameter="{Binding RawMaterialId}"
  691. Content="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}"
  692. IsEnabled="{Binding RawMaterialSource, Converter={StaticResource EnbleConvert}}"
  693. Style="{StaticResource materialMakingButton}" />
  694. </Grid>
  695. </DataTemplate>
  696. </ItemsControl.ItemTemplate>
  697. </ItemsControl>
  698. </Grid>
  699. <!--<TreeView x:Name="repiceListMaking" ItemsSource="{Binding RecipeProcesse}"
  700. ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Background="Wheat" ItemContainerStyle="{StaticResource recipeTreeItem}">
  701. </TreeView>-->
  702. <!-- 等待和已完成 -->
  703. <TreeView
  704. x:Name="repiceList"
  705. HorizontalAlignment="Stretch"
  706. Background="Transparent"
  707. BorderThickness="0"
  708. ItemContainerStyle="{StaticResource recipeTreeItem}"
  709. ItemsSource="{Binding UserTreeWait}"
  710. ScrollViewer.VerticalScrollBarVisibility="Visible" />
  711. </Grid>
  712. </Border>
  713. </ScrollViewer>
  714. </Grid>
  715. </Grid>
  716. </UserControl>