|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063 |
- <UserControl
- x:Class="BPASmartClient.DosingSystem.View.RecipeControlView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BPASmartClient.DosingSystem.Converter"
- xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- d:DesignHeight="800"
- d:DesignWidth="1400"
- mc:Ignorable="d">
-
- <UserControl.DataContext>
- <vm:RecipeControlViewModel x:Name="bingSource" />
- </UserControl.DataContext>
-
- <UserControl.Resources>
-
- <con:RunStatusConvert x:Key="RunStatusConvert" />
- <con:EnbleConvert x:Key="EnbleConvert" />
- <con:IntToSourceConvert x:Key="IntToSourceConvert" />
-
- <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
- <Style.Resources>
- <!-- SelectedItem with focus -->
- <SolidColorBrush
- x:Key="{x:Static SystemColors.HighlightBrushKey}"
- Opacity=".4"
- Color="White" />
- <!-- SelectedItem without focus -->
- <SolidColorBrush
- x:Key="{x:Static SystemColors.ControlBrushKey}"
- Opacity=".4"
- Color="White" />
- </Style.Resources>
- <!-- 设置触发器 -->
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- </Style.Triggers>
- </Style>
-
- <Style x:Key="RadioState" TargetType="RadioButton">
- <Setter Property="Margin" Value="1" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="#ddd" />
- <Setter Property="VerticalContentAlignment" Value="Bottom" />
- <Setter Property="Margin" Value="2,5" />
- <Setter Property="FontSize" Value="16" />
- <Setter Property="FontFamily" Value="Consolas" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="RadioButton">
- <Border
- Name="radiobutton"
- Background="{TemplateBinding Background}"
- CornerRadius="5"
- Opacity="0.85">
- <Grid>
- <!--<Border
- x:Name="back_border"
- BorderBrush="Black"
- BorderThickness="0"
- CornerRadius="1">
- <Border.Effect>
- <BlurEffect KernelType="Gaussian" Radius="2" />
- </Border.Effect>
- </Border>
- <Border
- x:Name="fore_border"
- Margin="2"
- BorderBrush="White"
- BorderThickness="0"
- CornerRadius="{Binding ElementName=button, Path=CornerRadius}"
- Opacity="0.7">
- <Border.Effect>
- <BlurEffect KernelType="Gaussian" Radius="2" />
- </Border.Effect>
- </Border>-->
-
-
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}"
- TextBlock.FontFamily="{TemplateBinding FontFamily}"
- TextBlock.FontSize="{TemplateBinding FontSize}"
- TextBlock.Foreground="{TemplateBinding Foreground}" />
-
- <Image
- Name="im"
- Source="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png"
- Stretch="Fill" />
- </Grid>
- </Border>
-
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="True">
- <!--<Setter TargetName="back_border" Property="BorderThickness" Value="1,0,1,1" />
- <Setter TargetName="back_border" Property="CornerRadius" Value="5" />
- <Setter TargetName="fore_border" Property="BorderThickness" Value="0,2,0,0" />
- <Setter Property="Background" Value=" #4169E1" />-->
- <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 7.png" />
-
- </Trigger>
-
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png" />
- </Trigger>
-
- <Trigger Property="IsMouseOver" Value="True">
- <!--<Setter TargetName="back_border" Property="BorderBrush" Value="white" />
- <Setter TargetName="back_border" Property="BorderThickness" Value="1,1,1,1" />-->
- <Setter TargetName="radiobutton" Property="Opacity" Value="1" />
- <!--<Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮背景蓝色.png" />-->
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- </Setter.Value>
-
- </Setter>
-
- </Style>
- <Style x:Key="materialMakingButton" TargetType="Button">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="FontSize" Value="16" />
- <Setter Property="Foreground" Value="#CD5555" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Border
- x:Name="brState"
- Padding="2"
- BorderBrush="White"
- BorderThickness="0">
- <TextBlock
- x:Name="txState"
- Margin="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="True">
- <Setter TargetName="brState" Property="BorderThickness" Value="0" />
- <Setter TargetName="brState" Property="CornerRadius" Value="5" />
- <Setter TargetName="brState" Property="Background" Value="#F0FFFF" />
- <Setter TargetName="txState" Property="Foreground" Value="#CD5555" />
- </Trigger>
- <DataTrigger Binding="{Binding RecipeStatus}" Value="3">
- <Setter TargetName="brState" Property="Background" Value="#F0FFFF" />
- <Setter TargetName="txState" Property="Foreground" Value="#3CB371" />
- </DataTrigger>
- <DataTrigger Binding="{Binding RecipeStatus}" Value="2">
- <Setter TargetName="txState" Property="Foreground" Value="Aqua" />
- </DataTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True" />
- <Condition Property="IsEnabled" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="txState" Property="FontSize" Value="17 " />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- </Setter.Value>
- </Setter>
- <Style.Triggers />
-
- </Style>
-
- <DataTemplate x:Key="TreeItemTemplate" DataType="TreeViewItem">
- <Grid Height="28" Margin="50,0,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="#aa2AB2E7"
- Text="原料:" />
- <TextBlock
- Grid.Column="1"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="#aa2AB2E7"
- Text="{Binding RawMaterialName}" />
- </Grid>
- </DataTemplate>
-
- <Style x:Key="recipeTreeItem" TargetType="TreeViewItem">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="IsExpanded" Value="True" />
- <Setter Property="HeaderTemplate">
- <Setter.Value>
- <HierarchicalDataTemplate ItemTemplate="{StaticResource TreeItemTemplate}" ItemsSource="{Binding RawMaterials, Mode=TwoWay}">
- <StackPanel
- Height="28"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="#FF2AB2E7"
- Text="配方:" />
- <TextBlock
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="#FF2AB2E7"
- Text="{Binding RecipeName}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TreeViewItem}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Border
- x:Name="Bd"
- Grid.Column="0"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter
- x:Name="PART_Header"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- ContentSource="Header" />
- </Border>
- <ItemsPresenter
- x:Name="ItemsHost"
- Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Visibility="Collapsed" />
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="SelectionStates">
- <VisualState x:Name="Selected">
- <Storyboard>
- <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
-
- <VisualState x:Name="Unselected" />
- <VisualState x:Name="SelectedInactive">
- <Storyboard>
- <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup x:Name="ExpansionStates">
- <VisualState x:Name="Expanded">
- <Storyboard>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="(UIElement.Visibility)">
- <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
- </ObjectAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Collapsed" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="HasHeader" Value="false" />
- <Condition Property="Width" Value="Auto" />
- </MultiTrigger.Conditions>
- <Setter TargetName="PART_Header" Property="MinWidth" Value="75" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="HasHeader" Value="false" />
- <Condition Property="Height" Value="Auto" />
- </MultiTrigger.Conditions>
- <Setter TargetName="PART_Header" Property="MinHeight" Value="19" />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </UserControl.Resources>
-
- <Grid Margin="20">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="0.25*" />
- </Grid.ColumnDefinitions>
-
- <Grid Name="ggr" Margin="10">
-
- <pry:ImageBorder Width="{Binding ElementName=ggr, Path=ActualWidth}" Height="{Binding ElementName=ggr, Path=ActualHeight}" />
-
- <ListBox
- Margin="5"
- VerticalAlignment="Top"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding Recipes}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
-
- <ListBox.ItemTemplate>
- <DataTemplate>
-
- <Grid
- Name="tt"
- Width="180"
- Height="220"
- Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition Height="20" />
- <RowDefinition Height="128" />
- <RowDefinition Height="2" />
- <RowDefinition Height="40" />
- </Grid.RowDefinitions>
-
- <Image
- Grid.RowSpan="5"
- Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
- Stretch="Fill" />
- <TextBlock
- Grid.Row="0"
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- Foreground="#FF2AB2E7"
- Text="配方信息:" />
- <TextBlock
- Grid.Row="1"
- Margin="20,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="12"
- Foreground="#FF2AB2E7"
- Text="配方名称:" />
- <TextBlock
- Grid.Row="1"
- Margin="100,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="12"
- Foreground="#FF2AB2E7"
- Text="{Binding RecipeName}" />
-
- <ScrollViewer
- Grid.Row="2"
- VerticalAlignment="Top"
- Background="Transparent"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <ItemsControl ItemsSource="{Binding RawMaterials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid>
- <TextBlock
- Grid.Row="1"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- Text="{Binding RawMaterialName}" />
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
- <!--<ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
-
- <TextBlock
- Margin="5,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- Text=":" />
-
- <TextBlock
- Margin="5,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- Text="{Binding RawMaterialWeight}" />
-
- <TextBlock
- Margin="5,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- Text="g" />
-
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>-->
-
- </Grid>
-
- </ScrollViewer>
-
- <!--<Grid
- Grid.Row="3"
- Height="2"
- VerticalAlignment="Bottom">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/直线.png" Stretch="Fill" />
- </Grid.Background>
- </Grid>-->
-
- <Image
- Grid.Row="3"
- Width="{Binding ElementName=tt, Path=ActualWidth}"
- Height="2"
- VerticalAlignment="Bottom"
- Source="/BPASmartClient.CustomResource;component/Image/直线.png"
- Stretch="Fill" />
-
- <Grid
- Name="gr"
- Grid.Row="4"
- Height="30"
- Margin="0,0,0,10"
- VerticalAlignment="Bottom"
- Background="Transparent">
- <!--<Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>-->
-
- <!--<Image
- Height="2"
- Grid.ColumnSpan="2"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- VerticalAlignment="Top"
- Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
-
- <pry:IcoButton
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="4,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#222bd06f"
- BorderThickness="0"
- Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeName}"
- Content="配方下发"
- EnterBackground="#332bd06f"
- FontStyle="Normal"
- Foreground="#ff2bd06f"
- IcoText=""
- IsEnabled="True"
- Style="{StaticResource IcoButtonStyle}" />
-
- <!--<pry:IcoButton
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="4,4,3,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#11F53F62"
- BorderThickness="0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipCode}"
- Content="删除"
- EnterBackground="#22F53F62"
- FontStyle="Normal"
- Foreground="#FFF53F62"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- <pry:IcoButton
- Grid.Column="1"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="3,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#112AB2E7"
- BorderThickness="0"
- Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipCode}"
- Content="编辑"
- EnterBackground="#222AB2E7"
- Foreground="#FF2AB2E7"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />-->
-
- </Grid>
- <!--</StackPanel>-->
- </Grid>
-
- <!--<Grid Name="tt" Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Image
- Grid.RowSpan="4"
- Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
- Stretch="Fill" />
-
- <TextBlock
- Grid.Row="0"
- Margin="2,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- FontSize="18"
- Foreground="#FF2AB2E7"
- Text="{Binding RecipeName}" />
-
-
- <TextBlock
- Grid.Row="1"
- Margin="5,0,0,5"
- Foreground="#ffc000"
- Text="配方信息:" />
-
- <ScrollViewer
- Grid.Row="2"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <ItemsControl ItemsSource="{Binding RawMaterials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid>
- <TextBlock
- Grid.Row="1"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aaffc000"
- Text="{Binding RawMaterialName}" />
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
- <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
-
- <TextBlock
- Margin="5,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#aaffc000"
- Text=":" />
-
- <TextBlock
- Margin="5,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#aaffc000"
- Text="{Binding RawMaterialWeight}" />
-
- <TextBlock
- Margin="5,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#aaffc000"
- Text="g" />
-
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
- </Grid>
-
- </ScrollViewer>
-
-
-
- <Grid
- Name="grb"
- Grid.Row="3"
- Height="30"
- Margin="0,0,0,10"
- VerticalAlignment="Bottom"
- Background="Transparent">
-
- <Image
- Width="{Binding ElementName=grb, Path=ActualWidth}"
- VerticalAlignment="Top"
- StretchDirection="Both"
- Source="/BPASmartClient.CustomResource;component/Image/直线.png" />
-
- <pry:IcoButton
- Width="{Binding ElementName=grb, Path=ActualWidth}"
- Height="{Binding ElementName=grb, Path=ActualHeight}"
- Margin="4,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#222bd06f"
- BorderThickness="0"
- Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeName}"
- Content="配方下发"
- EnterBackground="#332bd06f"
- FontStyle="Normal"
- Foreground="#ff2bd06f"
- IcoText=""
- IsEnabled="{Binding IsEnable}"
- Style="{StaticResource IcoButtonStyle}" />
-
-
- </Grid>
-
- </Grid>-->
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
-
- </Grid>
-
- <Grid
- Name="gr"
- Grid.Column="1"
- Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}" />
-
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <RadioButton
- Click="RadioButtonWait_Click"
- Command="{Binding ChangeRecipeStateCommand}"
- Content="等待中"
- GroupName="state"
- IsChecked="True"
- Style="{DynamicResource RadioState}" />
- <RadioButton
- Grid.Column="1"
- Click="RadioButtonMaking_Click"
- Content="执行中"
- GroupName="state"
- Style="{DynamicResource RadioState}" />
- <RadioButton
- Grid.Column="2"
- Click="RadioButtonCompelete_Click"
- Content="已完成"
- GroupName="state"
- Style="{DynamicResource RadioState}" />
-
- </Grid>
-
-
- <!--<ScrollViewer
- Grid.Row="1"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <Border>
- <Grid Grid.Row="1">
- <Grid x:Name="repiceListMaking" Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="18"
- Foreground="#FF2AB2E7"
- Text="{Binding CurrentRecipeName}" />
- <ItemsControl
- Grid.Row="1"
- Margin="50,0"
- ItemsSource="{Binding recipeProcesses}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="16" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Margin="10,0,5,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="#AA2AB2E7"
- Text="{Binding RawMaterialName}"
- ToolTip="{Binding RawMaterialSource, Converter={StaticResource IntToSourceConvert}}" />
- <TextBlock
- Grid.Column="1"
- Margin="0,0,5,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="#AA2AB2E7"
- Text=":" />
- <Button
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Command="{Binding DataContext.ChangeRecipeStateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialId}"
- Content="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}"
- IsEnabled="{Binding RawMaterialSource, Converter={StaticResource EnbleConvert}}"
- Style="{StaticResource materialMakingButton}" />
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
-
- </ItemsControl>
-
- </Grid>
- -->
- <!--<TreeView x:Name="repiceListMaking" ItemsSource="{Binding RecipeProcesse}"
- ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Background="Wheat" ItemContainerStyle="{StaticResource recipeTreeItem}">
- </TreeView>-->
-
- <!-- 等待和已完成 -->
- <!--<TreeView
- x:Name="repiceList"
- HorizontalAlignment="Stretch"
- Background="Transparent"
- BorderThickness="0"
- ItemContainerStyle="{StaticResource recipeTreeItem}"
- ItemsSource="{Binding UserTreeWait}"
- ScrollViewer.VerticalScrollBarVisibility="Visible" />-->
- <!--
- </Grid>
- </Border>
- </ScrollViewer>-->
-
- <!--#region 等待制作和制作完成列表显示-->
- <Grid
- Name="WaitOrCompleteGrid"
- Grid.Row="1"
- Margin="10">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="0"
- Margin="0,5"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50" />
- <ColumnDefinition />
- <ColumnDefinition Width="70" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="序号" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="配方名称" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- Style="{StaticResource TitleTextblockStyle}"
- Text="状态" />
-
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
- </Grid>
- <!--#endregion-->
-
- <ScrollViewer
- Grid.Row="1"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <ItemsControl Name="Wait" ItemsSource="{Binding UserTreeWait}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50" />
- <ColumnDefinition />
- <ColumnDefinition Width="100" />
- </Grid.ColumnDefinitions>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="#FF2AB2E7"
- Text="{Binding SerialNum}" />
-
- <Grid Grid.Column="1">
- <TextBlock
- Grid.Column="1"
- Margin="5,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="#FF2AB2E7"
- Text="{Binding RecipeName}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="{Binding RecipStatus, Converter={StaticResource RecipeStatusConvert}}"
- Text="{Binding RecipStatus}" />
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1" />
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- <!--#endregion-->
-
- <!--#region 制作中设备状态监视-->
- <Grid
- Name="CookingGrid"
- Grid.Row="1"
- Margin="10"
- Visibility="Collapsed">
-
-
-
- <!--<Grid.RowDefinitions>
- <RowDefinition Height="30"/>
- <RowDefinition/>
- </Grid.RowDefinitions>-->
-
- <ItemsControl ItemsSource="{Binding recipeProcesses}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition Height="30" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="40" />
- <RowDefinition Height="10" />
- </Grid.RowDefinitions>
-
- <Image
- Grid.RowSpan="5"
- Source="/BPASmartClient.CustomResource;component/Image/背景边框4.png"
- Stretch="Fill" />
- <!--<Image
- Grid.RowSpan="4"
- Source="/BPASmartClient.CustomResource;component/Image/组合边框2.png"
- Stretch="Fill" />-->
-
- <TextBlock
- Grid.Row="0"
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- FontSize="18"
- Foreground="#FF2AB2E7"
- Text="{Binding RecipeName}" />
-
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="1"
- Height="30"
- Margin="5,0"
- VerticalAlignment="Top"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="原料" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="状态" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
- </Grid>
- <!--#endregion-->
-
- <ItemsControl
- Grid.Row="2"
- Margin="0,0,0,15"
- ItemsSource="{Binding RawMaterials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <StackPanel
- Margin="0,0,5,0"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="{Binding RawMaterialName}" />
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text=":" />
-
- </StackPanel>
-
- <StackPanel
- Grid.Column="1"
- Margin="2,0,0,0"
- Orientation="Horizontal">
- <TextBlock
- Margin="0,0,5,0"
- Foreground="{Binding Status, Converter={StaticResource ForegroundConverter}}"
- Style="{StaticResource TitleTextblockStyle}"
- Text="{Binding Status}" />
-
- <TextBlock
- FontFamily="/BPASmartClient.CustomResource;component/Fonts/#iconfont"
- FontSize="20"
- Foreground="{Binding Status, Converter={StaticResource ForegroundConverter}}"
- Style="{StaticResource TitleTextblockStyle}"
- Text="{Binding Status, Converter={StaticResource StatusIconConverter}}" />
- </StackPanel>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
- <Button
- Grid.Row="3"
- Height="40"
- Margin="20,0,20,0"
- VerticalContentAlignment="Center"
- Command="{Binding DataContext.CancelRecipeCommand, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
- CommandParameter="{Binding}"
- Content="取消配料"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
-
- <!--<Button
- Grid.Row="3"
- Height="40"
- Margin="5,0,5,0"
- Command="{Binding CancelRecipeCommand}"
- CommandParameter="{Binding}"
- Content="取消配料"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />-->
-
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
- </Grid>
-
- <!--#endregion-->
-
-
-
-
-
-
- </Grid>
-
- </Grid>
- </UserControl>
|