步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
6.1 KiB

<Page x:Class="BBWY.Client.Views.PackerTask.PackerTaskList"
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:BBWY.Client.Views.PackerTask"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
DataContext="{Binding PackerTaskVM,Source={StaticResource Locator}}"
mc:Ignorable="d" Background="White"
d:DesignHeight="450" d:DesignWidth="2048"
Title="cesih">
<Page.Resources>
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<!--<Setter Property="Content" Value="{Binding ElementName=txt,Path=Text}"/>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" VerticalAlignment="Center" Width="{TemplateBinding Width}" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="35">
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Content}" />
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Tag}" Foreground="{StaticResource Text.Pink}" Margin="5 0 0 0" />
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" />
<Setter Property="Foreground" Value="white"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<sys:Int32 x:Key="d0">0</sys:Int32>
<sys:Int32 x:Key="d1">1</sys:Int32>
<sys:Int32 x:Key="d3">2</sys:Int32>
<sys:Int32 x:Key="d7">6</sys:Int32>
<sys:Int32 x:Key="d15">14</sys:Int32>
<sys:Int32 x:Key="d30">29</sys:Int32>-->
</Page.Resources>
<Grid>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/>
<Grid Margin="5,5">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
<!---->
</Grid.RowDefinitions>
<StackPanel Grid.RowSpan="1" HorizontalAlignment="Left" Orientation="Horizontal">
<!--<RadioButton Height="35" Width="126" VerticalAlignment="Center" x:Name="qb" Content="全部" Command="{Binding SetTaskStateCommand}"
IsChecked="{Binding PackTaskState,Mode=TwoWay,Converter={StaticResource taskStateToBoolean},ConverterParameter=#null:True:False}"
/>-->
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.待包装}" Content="待包装" Tag="{Binding WaitPackCount,Mode=TwoWay}"
IsChecked="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:PackTaskState.已完成}" Content="已完成"
IsChecked="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=已完成:True:False}"
/>
</StackPanel>
<Border Grid.Row="2" Margin="0,0,0,0" BorderBrush="{StaticResource Border.Brush}" BorderThickness="0,1,0,0" />
<Grid Grid.Row="1" Margin="0,5,0,0">
<local:PackerWaitPackageControl Visibility="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:Visible:Collapsed}"/>
<local:PackerPackCompletedControl Visibility="{Binding PackTaskState,Converter={StaticResource objConverter},ConverterParameter=已完成:Visible:Collapsed}"/>
</Grid>
<c:PageControl PageIndex="{Binding PageIndex,Mode=TwoWay}"
PageSize="{Binding PageSize,Mode=TwoWay}"
RecordCount="{Binding OrderCount,Mode=TwoWay}"
Grid.Row="2"
HorizontalAlignment="Left" Width="auto">
<b:Interaction.Triggers>
<b:EventTrigger EventName="OnPageIndexChanged">
<b:InvokeCommandAction Command="{Binding TaskPageIndexChangedCommand}" PassEventArgsToCommand="True"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:PageControl>
</Grid>
</Grid>
</Page>