|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <UserControl
- x:Class="BPASmartClient.DosingSystemSingle.View.RecipeSettingsView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystemSingle.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.DosingSystemSingle.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.Resources>
- <SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
- <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
- <SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
- <SolidColorBrush x:Key="CursorColor" Color="Aqua" />
- <SolidColorBrush x:Key="TitleBorderColor" Color="#FF2AB2E7" />
- <SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />
-
- <Style x:Key="TextBlockStyle" TargetType="TextBlock">
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="FontSize" Value="20" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- </Style>
-
- <Style x:Key="buttonStyle" TargetType="Button">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="FontSize" Value="16" />
- <Setter Property="Foreground" Value="Aqua" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="BorderThickness" Value="0" />
- </Style>
-
- <!--<Style x:Key="ListViewStyle" TargetType="ListView" />-->
-
- </UserControl.Resources>
-
- <UserControl.DataContext>
- <vm:RecipeSettingsViewModel />
- </UserControl.DataContext>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="30" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <!--#region 操作按钮-->
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <!--<pry:IcoButton
- Grid.Column="3"
- Width="140"
- Margin="10"
- HorizontalAlignment="Left"
- Command="{Binding NewMaterital}"
- Content="新建原料"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />-->
-
- <!--<Button
- Width="140"
- Height="30"
- Margin="10 0"
- Command="{Binding NewMaterital}"
- Content="新建原料"
- FontSize="16"
- Style="{StaticResource ImageButtonStyle}" />-->
-
- <Button
- Width="140"
- Height="30"
- Margin="10 0"
- Command="{Binding NewRecipe}"
- Content="新建配方"
- FontSize="16"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Button
- Width="140"
- Height="30"
- Margin="10 0"
- Command="{Binding SaveRecipe}"
- Content="保存配方"
- FontSize="16"
- Style="{StaticResource ImageButtonStyle}" />
-
- <!--<pry:IcoButton
- Grid.Column="3"
- Width="140"
- Margin="10"
- HorizontalAlignment="Left"
- Command="{Binding NewRecipe}"
- Content="新建配方"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />-->
-
- <!--<pry:IcoButton
- Grid.Column="3"
- Width="140"
- Margin="10"
- HorizontalAlignment="Left"
- Command="{Binding SaveRecipe}"
- Content="保存配方"
- FontSize="17"
- Foreground="Aqua"
- IcoText=""
- IsEnabled="True"
- Style="{StaticResource IcoButtonStyle}" />-->
- </StackPanel>
- <!--#endregion-->
-
- <ListBox
- Grid.Row="2"
- 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 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
- Grid.ColumnSpan="2"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="2"
- 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,3,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#11F53F62"
- BorderThickness="0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeName}"
- 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 RecipeName}"
- Content="编辑"
- EnterBackground="#222AB2E7"
- Foreground="#FF2AB2E7"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- </Grid>
- <!--</StackPanel>-->
- </Grid>
-
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
-
- </Grid>
- </UserControl>
|