|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- <Window
- x:Class="BPASmartClient.JXJFoodSmallStation.View.NewLocalRecipeView"
- 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.JXJFoodSmallStation.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
- Title="NewRemoteRecipeView"
- Width="700"
- Height="520"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="false"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:NewLocalRecipeViewModel />
- </Window.DataContext>
-
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
-
- <ResourceDictionary>
- <!--#region ListBox样式-->
- <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="BorderBrush" Value="{x:Null}" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontSize" Value="20" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="border" CornerRadius="8">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Window.Resources>
-
- <Border
- Name="br"
- BorderBrush="#0CADF5"
- BorderThickness="2">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
- <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗2.png" />-->
- </Border.Background>
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="40" />
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <StackPanel VerticalAlignment="Center" Grid.Column="0" Orientation="Horizontal">
- <TextBlock
- Width="100"
- Margin="10,0,10,0"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="配方名称:" />
- <TextBox
- Width="120"
- Height="30"
- FontSize="16"
- Text="{Binding RecipeName}" />
- </StackPanel>
- <WrapPanel VerticalAlignment="Center" Grid.Column="1">
- <TextBlock
- Width="100"
- Margin="10,0,10,0"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="配方编码:" />
- <TextBox
- Width="120"
- Height="30"
- FontSize="16"
- Text="{Binding RecipeCode}" />
- </WrapPanel>
- </Grid>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <WrapPanel VerticalAlignment="Center" Grid.Column="0">
- <TextBlock
- Width="100"
- Margin="10,0,10,0"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="托盘编号:" />
- <TextBox
- Width="120"
- Height="30"
- FontSize="16"
- Text="{Binding TrayNum}" />
- </WrapPanel>
- <WrapPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1">
- <Button
- Width="100"
- Height="40"
- Margin="5,0,5,0"
- Command="{Binding AddCommand}"
- Content="添加原料"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Width="100"
- Height="40"
- Margin="5,0,10,0"
- Command="{Binding SaveCommand}"
- Content="保存配方"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Name ="Close"
- Width="100"
- Height="40"
- Margin="5,0,5,0"
- Content="取消"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- </WrapPanel>
- </Grid>
-
-
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="2"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBlock Text="原料名称" HorizontalAlignment="Center" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" />
- <Grid Grid.Column="2">
- <TextBlock Text="原料桶号" HorizontalAlignment="Center" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock Grid.Column="3" Text="原料重量" HorizontalAlignment="Center" />
- <Grid Grid.Column="4">
- <TextBlock Text="功能操作" HorizontalAlignment="Center" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
- </Grid>
- <Grid Grid.Row="3">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding RawMaterial}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBox
- Text="{Binding RawMaterialName}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <TextBox
- Grid.Column="1"
- Text="{Binding RawMaterialLocation }" />
-
- <Grid Grid.Column="2">
- <TextBox
- Text="{Binding RawMaterialBarrelNum}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="3"
- Text="{Binding RawMaterialWeight}" />
-
- <Grid Grid.Column="4">
- <Button
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialLocation}"
- Content="删除"
- FontSize="16" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderThickness="1,0,1,1" />
-
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
-
-
- </Grid>
- </Border>
- </Window>
|