|
- <Window x:Class="BPASmartClient.MorkF.View.LocalMenu"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:local="clr-namespace:BPASmartClient.MorkF.View"
- xmlns:vm="clr-namespace:BPASmartClient.MorkF.ViewModel"
- mc:Ignorable="d"
- Title="LocalMenu" Height="900" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" MouseLeftButtonDown="Window_MouseLeftButtonDown" Background="Gray"
- >
- <Window.DataContext>
- <vm:LocalMenuViewModel/>
- </Window.DataContext>
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Style TargetType="ListBoxItem" x:Key="newFoodList" >
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border BorderBrush="Black" BorderThickness="0" Background="Transparent" Margin="5">
- <StackPanel Orientation="Vertical">
- <TextBlock Text="步骤:"/>
- <TextBox Text="{Binding FryTime}" HorizontalAlignment="Center" VerticalAlignment="Center" />
- <ComboBox Width="120" ItemsSource="{Binding DataContext.strPotActions , RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- SelectedValue="{Binding Actions}" Margin="10,0"/>
- <TextBlock Text="时间"/>
- <TextBox Text="{Binding During}" Margin="10,0"/>
-
- <TextBox Text="{Binding SeasoningLists[0].Loc}" Margin="10,0"/>
- <TextBox Text="{Binding SeasoningLists[0].Qty}" Margin="10,0"/>
- <Button Content="删除" Margin="10,0" HorizontalAlignment="Center"/>
- </StackPanel>
-
- </Border>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="ListBoxItem" >
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border BorderBrush="Black" BorderThickness="0" Background="Transparent" Margin="5">
- <Grid Width="600" HorizontalAlignment="Center" VerticalAlignment="Center" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBox Grid.Column="0" Text="{Binding FryTime}" HorizontalAlignment="Center" VerticalAlignment="Center" />
- <TextBox Grid.Column="1" Text="{Binding During}" Margin="10,0"/>
- <ComboBox Grid.Column="2" Width="120" ItemsSource="{Binding DataContext.strPotActions , RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- SelectedValue="{Binding Actions}" Margin="10,0"/>
- <TextBox Grid.Column="3" Text="{Binding SeasoningLists[0].Loc}" Margin="10,0"/>
- <TextBox Grid.Column="4" Text="{Binding SeasoningLists[0].Qty}" Margin="10,0"/>
- <Button Grid.Column="5" Content="删除" Margin="10,0" HorizontalAlignment="Center"
- Command="{Binding DataContext.Delete, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- CommandParameter="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"/>
- </Grid>
- </Border>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
-
- </Window.Resources>
- <Grid >
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"/>
- </Grid.Background>
- <Grid.RowDefinitions>
- <RowDefinition Height="80"/>
- <RowDefinition Height="80"/>
- <RowDefinition Height="50"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel Margin="10,20,10,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
-
- <TextBox Text="{Binding MaterialName}" Width="80" Height="40" Margin="10,0"/>
- <Button Content="增加菜谱" Command="{Binding AddMaterial}" Width="80" Height="40" Margin="10,0"/>
- </StackPanel>
- <StackPanel Grid.Row="1" Margin="10,20,10,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
- <ComboBox Name="Materials" Width="100" Height="40" SelectionChanged="Materials_SelectionChanged" SelectedIndex="0" IsReadOnly="True"
- ItemsSource="{Binding MaterialNames}" SelectedItem="{Binding SelectMaterialName}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-
- <!--<Button Content="下单" Command="{Binding NewStartLocalMaterial}" Width="80" Height="40" Margin="10,0" Cursor="Hand"/>-->
- <!--<Button Content="菜谱重命名" Command="{Binding RenameMaterial}" Width="80" Height="40" Margin="10,0"/>-->
- <Button Content="删除菜谱" Command="{Binding DeleteMaterial}" Width="80" Height="40" Margin="10,0"/>
- <Button Content="增加步骤" Command="{Binding AddFryTime}" Width="80" Height="40" Margin="10,0"/>
- <Button Content="保存" Command="{Binding Save}" Width="80" Height="40" Margin="10,0"/>
- <Button Content="退出" Click="Button_Click" Width="80" Height="40" Margin="10,0"/>
- </StackPanel>
-
- <Grid Grid.Row="2" Width="600" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="步骤" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="1" Text="时间" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="2" Text="动作" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="3" Text="调料位置" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="4" Text="调料重量" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="5" Text="删除" HorizontalAlignment="Center"/>
- </Grid>
- <ListBox x:Name="listview1" Grid.Row="3" BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Center" AllowDrop="True"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding PotActionStep}" Margin=" 10" Background="Transparent"
- ItemContainerStyle="{DynamicResource newFoodList}"
- >
-
- </ListBox>
- </Grid>
- </Window>
|