|
- <UserControl x:Class="BPASmartClient.MilkWithTea.View.MainControlView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.MilkWithTea.View"
- xmlns:vm="clr-namespace:BPASmartClient.MilkWithTea.ViewModel"
- xmlns:controls="clr-namespace:BPASmartClient.MilkWithTea.Control"
- xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
- mc:Ignorable="d"
- d:DesignHeight="800" d:DesignWidth="1400" Background="Transparent">
- <UserControl.DataContext>
- <vm:MainControlViewModel/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <con:ColorConverter x:Key="ColorConverter" />
- <con:TextConverter x:Key="TextConverter" />
- <con:OpacityConverter x:Key="OpacityConverter"/>
- <Style TargetType="TextBlock">
- <Setter Property="FontSize" Value="28"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Foreground" Value="DarkSlateGray"/>
- <Setter Property="FontWeight" Value="Bold"/>
- </Style>
-
- <Style TargetType="{x:Type ListBox}">
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
- <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
- <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBox}">
- <Border x:Name="Bd" BorderBrush="Transparent" BorderThickness="0"
- Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
- <ScrollViewer Focusable="false">
- <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Stretch"/>
- </ScrollViewer>
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true"/>
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="DataGridRow">
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Height" Value="28"/>
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Foreground" Value="Black"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
-
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="Background" Value="#4fade8" />
- </Trigger>
- </Style.Triggers>
- </Style>
-
- </ResourceDictionary>
-
- </UserControl.Resources>
- <Grid Background="#F3F6F9" Margin="20">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="6*"/>
- <ColumnDefinition Width="1"/>
- <ColumnDefinition Width="3*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="2*"/>
- <RowDefinition Height="60"/>
- <RowDefinition Height="280"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <GroupBox Header="订单队列" Style="{StaticResource GroupBoxStyle1}" FontSize="18">
- <DataGrid ItemsSource="{Binding orderStatusLists}"
- Grid.Row="1" AutoGenerateColumns="False" RowHeight="250"
- FrozenColumnCount="1" Margin="30,5"
- VerticalAlignment="Top" ForceCursor="False"
- IsReadOnly="True"
- CanUserResizeColumns="False" CanUserResizeRows="False" SelectionMode="Single"
- CanUserReorderColumns="False" RowHeaderWidth="0" CanUserAddRows="False">
- <DataGrid.Columns>
- <DataGridTextColumn Header="取餐号" Binding="{Binding OrderPush.SortNum}" Width="*"
- Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}">
- </DataGridTextColumn>
- <DataGridTextColumn Header="商品名" Binding="{Binding OrderPush.GoodsName}" Width="2*" Foreground="Black" />
- <DataGridTextColumn Header="开始时间" Binding="{Binding StartDate}" Width="2*" Foreground="Black"/>
- <DataGridTextColumn Header="结束时间" Binding="{Binding EndDate}" Width="2*" Foreground="Black"/>
- <DataGridTextColumn Header="制作状态" Binding="{Binding OrderStatus, Converter={StaticResource TextConverter}}" Width="2*" Foreground="Black"/>
- <DataGridTextColumn Header="完成时间" Binding="{Binding CompleteDate}" Width="2*" Foreground="Black" />
- </DataGrid.Columns>
- </DataGrid>
- </GroupBox>
- <GroupBox Grid.Row="2" Header="当前奶茶进度" Style="{StaticResource GroupBoxStyle1}" FontSize="18">
- <Grid >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="220"/>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="1" Text="{Binding CurrentGood}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
- <controls:CircularProgressBar Grid.Column="2" Percent="{Binding MakePercent}" />
- </Grid>
- </GroupBox>
-
-
- <Border Grid.Column="1" Grid.RowSpan="5" BorderBrush="Black" BorderThickness="1" />
- <Grid Opacity="{Binding MakeEnable ,Converter= {StaticResource OpacityConverter}}" Grid.Column="2" Grid.RowSpan="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
-
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="60"/>
- <RowDefinition Height="60"/>
- <RowDefinition Height="50"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="100"/>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Text="本地奶茶下单" HorizontalAlignment="Center" />
- <Border Grid.ColumnSpan="2" Grid.Row="1" Background="Transparent" Visibility="{Binding Visibility}" Margin="5">
- <Border Background="White" Height="50" CornerRadius="10" HorizontalAlignment="Stretch">
- <Grid Height="Auto">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="" FontFamily="/BPASmartClient.CustomResource;component/Fonts/MT/#iconfont" FontSize="28"
- VerticalAlignment="Center" HorizontalAlignment="Center"/>
- <TextBox Grid.Column="1" x:Name="searchQuery"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Center" TextAlignment="Left"
- BorderThickness="0" Background="Transparent"
- IsEnabled="{Binding MakeEnable}"/>
- <TextBlock Grid.Column="1" Margin="3,0,0,0" Text="搜索本地奶茶" FontWeight="Bold" HorizontalAlignment="Left" TextAlignment="Left" VerticalAlignment="Center" Foreground="LightGray" IsHitTestVisible="False">
- <TextBlock.Style>
- <Style TargetType="{x:Type TextBlock}">
- <Setter Property="Visibility" Value="Collapsed"/>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Text, ElementName=searchQuery}" Value="">
- <Setter Property="Visibility" Value="Visible"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- </TextBlock>
- </Grid>
- </Border>
- </Border>
- <TextBlock Text="奶茶" Grid.Row="2" Margin="20,10" FontSize="22" />
- <TextBlock Text="配方" Grid.Row="2" Grid.Column="1" Margin="10" FontSize="22" />
- <Border BorderBrush="#D5DFE5" BorderThickness="4" Grid.Row="3" Margin="20,0,0,0">
- <ListBox ItemsSource="{Binding localTeaWithMilks}" SelectionChanged="ListBox_SelectionChanged" IsEnabled="{Binding MakeEnable}"
- Foreground="LightSlateGray">
- <ListBox.ItemTemplate>
- <DataTemplate >
- <Grid>
- <TextBlock Text="{Binding GoodNames}" Margin="5,10" FontSize="22"
- Background="Transparent" />
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Border>
-
- <ListBox x:Name="recipeList" Grid.Row="3" Grid.Column="1" Margin="5,10"
- ItemsSource="{Binding materialRecipes}" FontSize="18"
- Width="200" HorizontalAlignment="Left" Foreground="LightSlateGray">
- <ListBox.ItemTemplate>
- <DataTemplate >
- <Grid Width="180">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="40"/>
- <ColumnDefinition Width="15"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="{Binding Material}" Margin="20,10" FontSize="16"/>
- <TextBlock Text="{Binding MaterialWeight}" Margin="5,10,0,10" Grid.Column="1" HorizontalAlignment="Left" />
- <TextBlock Text="g" Margin="0,10" HorizontalAlignment="Right" Grid.Column="2"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Button Grid.Row="4" Style="{StaticResource buttonNormal}" VerticalAlignment="Top" Height="40" Width="150" Margin="20"
- Command="{Binding MakeGoodCommand}" IsEnabled="{Binding MakeEnable}">
- <Button.Content>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="30"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="" VerticalAlignment="Center" Foreground="White" FontSize="18" HorizontalAlignment="Center" FontFamily="/BPASmartClient.CustomResource;component/Fonts/MT/#iconfont"/>
- <TextBlock Grid.Column="1" Text="制作奶茶" TextAlignment="Left" VerticalAlignment="Center" FontWeight="Bold" Foreground="White" FontSize="16"/>
- </Grid>
- </Button.Content>
- </Button>
- </Grid>
-
- </Grid>
- </UserControl>
|