|
- <UserControl
- x:Class="BPASmartClient.SmallBatchingSystem.Views.RecipeControlView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.SmallBatchingSystem.Views"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.SmallBatchingSystem.ViewModels"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
-
- <UserControl.DataContext>
- <vm:RecipeControlViewModel />
- </UserControl.DataContext>
-
- <Grid Margin="20">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="35" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Button
- Width="150"
- Height="30"
- Margin="10,0,10,0"
- HorizontalAlignment="Right"
- Command="{Binding AddCommand}"
- Content="初始化"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Grid
- Name="ggr"
- Grid.Row="1"
- Margin="10">
- <ListBox
- Margin="5"
- VerticalAlignment="Top"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding Recipes}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <!--<UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8" />-->
- <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="2,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- FontSize="18"
- Foreground="#FF2AB2E7"
- Text="{Binding RecipeName}" />
-
- <TextBlock
- Grid.Row="1"
- Margin="5,0,0,0"
- VerticalAlignment="Top"
- Foreground="#FF2AB2E7"
- Text="配方信息:" />
-
- <ScrollViewer
- Grid.Row="2"
- VerticalAlignment="Top"
- Background="Transparent"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <ItemsControl ItemsSource="{Binding SiloInfoModels}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Width="150">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="0.1*" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- Text="{Binding SiloName}" />
-
- <TextBlock
- Grid.Column="1"
- Margin="1,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- Text=":" />
-
- <TextBlock
- Grid.Column="2"
- Margin="5,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- Text="{Binding SiloWeight}" />
- </Grid>
- </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="{Binding IsEnable}"
- 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>
- </UserControl>
|