|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <Window x:Class="BPASmartClient.MorkBF.VIew.FoodManagerView"
- 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:local="clr-namespace:BPASmartClient.MorkBF.VIew"
- xmlns:con="clr-namespace:BPASmartClient.MorkBF.Convert"
- xmlns:vm ="clr-namespace:BPASmartClient.MorkBF.ViewModel"
- mc:Ignorable="d"
- Title="FoodManagerView" Height="450" Width="1020" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
- <Window.DataContext>
- <vm:FoodManagerViewModel/>
- </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>
- <con:StirToVisibilityConverter x:Key="StirToVisibilityConverter" />
- <con:FirePositionToVisibilityConverter x:Key="FirePositionToVisibilityConverter" />
- <con:AccessoriesToVisibilityConverter x:Key="AccessoriesToVisibilityConverter" />
- </ResourceDictionary>
- </Window.Resources>
- <Border CornerRadius="1,60,00,70" Background="#1E1E1E" >
- <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown" Margin="0,-4,0,4">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不规则矩形.png"/>
- </Grid.Background>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="50"/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Height="45">
- <TextBlock Text="菜品名称:" Margin="10,0"/>
- <TextBox Text="{Binding GoodName}" Width="160" Margin="10,0" FontSize="16"/>
- <Button Content="添加新步骤" Margin="10,0" Style="{StaticResource ButtonStyle}" Height="36" Command="{Binding AddCommand}"/>
- <Button Content="保存" Margin="10,0" Style="{StaticResource ButtonStyle}" Height="36" Width="80" Command="{Binding SaveCommand}"/>
- <Button Content="退出" Margin="10,0" Style="{StaticResource ButtonStyle}" Height="36" Width="80" Click="Button_Click"/>
- </StackPanel>
- <Grid Grid.Row="1">
- <ListBox ItemsSource="{Binding FryPotProcesses}" FontSize="15" x:Name="mylist">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal" Margin="0,10">
- <TextBlock Text="步骤--" Margin="10,0,2,0" VerticalAlignment="Center"/>
- <TextBlock Text="{Binding FryTime,Mode=TwoWay}" VerticalAlignment="Center"/>
- <TextBlock Text="加热时间--" Margin="10,0,2,0" VerticalAlignment="Center"/>
- <TextBox Text="{Binding FryDuration}" Margin="10,0" Width="40" VerticalAlignment="Center"/>
- <TextBlock Text="动作--" Margin="10,0,2,0" VerticalAlignment="Center"/>
- <ComboBox ItemsSource="{Binding DataContext.FryAction,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- SelectedItem="{Binding fryActions}" Width="100" IsReadOnly="True" Margin="2,0,10,0"/>
- <TextBlock Text="加热挡位--" Margin="10,0,2,0" VerticalAlignment="Center"/>
- <ComboBox ItemsSource="{Binding DataContext.Gear,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- SelectedItem="{Binding FryGear}" Width="50" Margin="2,0,10,0" />
- <TextBlock Text="搅拌挡位--" Margin="10,0,2,0" VerticalAlignment="Center"
- Visibility="{Binding fryActions,Converter={StaticResource StirToVisibilityConverter}}"/>
- <ComboBox ItemsSource="{Binding DataContext.Gear,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}" SelectedItem="{Binding StirGear}" Width="50" Margin="2,0,10,0"
- Visibility="{Binding fryActions,Converter={StaticResource StirToVisibilityConverter}}"/>
- <TextBlock Text="炒制位置--" Margin="10,0,2,0" VerticalAlignment="Center"
- Visibility="{Binding fryActions,Converter={StaticResource FirePositionToVisibilityConverter}}"/>
- <ComboBox ItemsSource="{Binding DataContext.PotPostion,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor} }" SelectedItem="{Binding FryPosition}" Width="50" Margin="2,0,10,0"
- Visibility="{Binding fryActions,Converter={StaticResource FirePositionToVisibilityConverter}}"/>
- <TextBlock Text="物料位置--" Margin="10,0,2,0" VerticalAlignment="Center"
- Visibility="{Binding fryActions,Converter={StaticResource AccessoriesToVisibilityConverter}}"/>
- <TextBox Text="{Binding accessories[0].Loc}" VerticalAlignment="Center" Width="50"
- Visibility="{Binding fryActions,Converter={StaticResource AccessoriesToVisibilityConverter}}"/>
- <Button Content="删除" Margin="10,0" Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- CommandParameter="{Binding DataContext,RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"/>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="70,0" >
- <TextBlock Text="关火搅拌时间" Margin="10,0"/>
- <TextBox Text="{Binding FryOffStirTime}" Width="60"/>
- <TextBlock Text="秒" Margin="10"/>
- </StackPanel>
-
- </Grid>
- </Border>
- </Window>
|