98 lines
		
	
	
		
			8.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			98 lines
		
	
	
		
			8.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.OpenBoxNewWindow"
							 | 
						||
| 
								 | 
							
								             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:DM_Weight.Views"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d" 
							 | 
						||
| 
								 | 
							
								             xmlns:convert="clr-namespace:DM_Weight.Converter"
							 | 
						||
| 
								 | 
							
								             d:DesignHeight="450" d:DesignWidth="800">
							 | 
						||
| 
								 | 
							
								    <UserControl.Resources>
							 | 
						||
| 
								 | 
							
								        <convert:OrderStatusConverter x:Key="OrderStatusConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:BoxNumConverter x:Key="BoxNumConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:StatusConverter x:Key="StatusConverter" />
							 | 
						||
| 
								 | 
							
								    </UserControl.Resources>
							 | 
						||
| 
								 | 
							
								    <Grid>
							 | 
						||
| 
								 | 
							
								        <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition Width="Auto"/>
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition Width="*"/>
							 | 
						||
| 
								 | 
							
								        </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								        <Grid  Margin="6" Grid.Column="0">
							 | 
						||
| 
								 | 
							
								            <Grid.Resources>
							 | 
						||
| 
								 | 
							
								                <Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignPaperLightButton}">
							 | 
						||
| 
								 | 
							
								                    <Setter Property="Foreground" Value="#00a0ea" />
							 | 
						||
| 
								 | 
							
								                    <Setter Property="BorderBrush" Value="#00a0ea" />
							 | 
						||
| 
								 | 
							
								                    <Style.Triggers>
							 | 
						||
| 
								 | 
							
								                        <Trigger Property="IsMouseOver" Value="True">
							 | 
						||
| 
								 | 
							
								                            <Setter Property="Background" Value="#d1e7f5" />
							 | 
						||
| 
								 | 
							
								                            <Setter Property="BorderBrush" Value="#d1e7f5" />
							 | 
						||
| 
								 | 
							
								                        </Trigger>
							 | 
						||
| 
								 | 
							
								                        <DataTrigger Value="True">
							 | 
						||
| 
								 | 
							
								                            <DataTrigger.Binding>
							 | 
						||
| 
								 | 
							
								                                <MultiBinding Converter="{StaticResource DrawerSelectConverter}">
							 | 
						||
| 
								 | 
							
								                                    <Binding RelativeSource="{ RelativeSource Mode=Self }" Path="Content" />
							 | 
						||
| 
								 | 
							
								                                    <Binding Path="DrawerNo" />
							 | 
						||
| 
								 | 
							
								                                </MultiBinding>
							 | 
						||
| 
								 | 
							
								                            </DataTrigger.Binding>
							 | 
						||
| 
								 | 
							
								                            <Setter Property="Background" Value="#d1e7f5" />
							 | 
						||
| 
								 | 
							
								                            <Setter Property="BorderBrush" Value="#d1e7f5" />
							 | 
						||
| 
								 | 
							
								                        </DataTrigger>
							 | 
						||
| 
								 | 
							
								                    </Style.Triggers>
							 | 
						||
| 
								 | 
							
								                </Style>
							 | 
						||
| 
								 | 
							
								            </Grid.Resources>
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								                <!--<RowDefinition />-->
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								                <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								            </Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="0" Grid.Column="0" Width="120" Content="1号药箱" Background="{Binding Button1Color}" Command="{Binding UpdateDrawerNo,ConverterParameter=1}" CommandParameter="1" IsEnabled="{Binding Button1Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="1" Grid.Column="0" Width="120" Content="2号药箱" Background="{Binding Button2Color}"  Command="{Binding UpdateDrawerNo}" CommandParameter="2" IsEnabled="{Binding Button2Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="2" Grid.Column="0" Width="120" Content="3号药箱"  Background="{Binding Button3Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="3" IsEnabled="{Binding Button3Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="3" Grid.Column="0" Width="120" Content="4号药箱"  Background="{Binding Button4Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="4" IsEnabled="{Binding Button4Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="4" Grid.Column="0" Width="120" Content="5号药箱"  Background="{Binding Button5Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="5" IsEnabled="{Binding Button5Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="5" Grid.Column="0" Width="120" Content="6号药箱"  Background="{Binding Button6Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="6" IsEnabled="{Binding Button6Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="6" Grid.Column="0" Width="120" Content="7号药箱"  Background="{Binding Button7Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="7" IsEnabled="{Binding Button7Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="7" Grid.Column="0" Width="120" Content="8号药箱"  Background="{Binding Button8Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="8" IsEnabled="{Binding Button8Enable}"/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="8" Grid.Column="0" Width="120" Content="9号药箱"  Background="{Binding Button9Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="9"   IsEnabled="{Binding Button9Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Margin="0 0  3 0" Grid.Row="0" Grid.Column="1" Width="120" Content="10号药箱" Background="{Binding Button10Color}"  Command="{Binding UpdateDrawerNo}" CommandParameter="10" IsEnabled="{Binding Button10Enable}"/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="1" Grid.Column="1" Width="120" Content="11号药箱"  Background="{Binding Button11Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="11" IsEnabled="{Binding Button11Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="2" Grid.Column="1" Width="120" Content="12号药箱"  Background="{Binding Button12Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="12" IsEnabled="{Binding Button12Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="3" Grid.Column="1" Width="120" Content="13号药箱"  Background="{Binding Button13Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="13" IsEnabled="{Binding Button13Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="4" Grid.Column="1" Width="120" Content="14号药箱"  Background="{Binding Button14Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="14" IsEnabled="{Binding Button14Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="5" Grid.Column="1" Width="120" Content="15号药箱"  Background="{Binding Button15Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="15" IsEnabled="{Binding Button15Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="6" Grid.Column="1" Width="120" Content="16号药箱"  Background="{Binding Button16Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="16" IsEnabled="{Binding Button16Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="7" Grid.Column="1" Width="120" Content="17号药箱"  Background="{Binding Button17Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="17" IsEnabled="{Binding Button17Enable}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="8" Grid.Column="1" Width="120" Content="18号药箱"  Background="{Binding Button18Color}" Command="{Binding UpdateDrawerNo}" CommandParameter="18" IsEnabled="{Binding Button18Enable}"/>
							 | 
						||
| 
								 | 
							
								            <!--<Button Grid.Row="8" Grid.Column="1" Width="120" Content="19号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="19" IsEnabled="{Binding DrawerNo, Converter={StaticResource BoxNumConverter}, ConverterParameter=19}"/>
							 | 
						||
| 
								 | 
							
								            <Button Grid.Row="9" Grid.Column="1" Width="120" Content="20号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="20" IsEnabled="{Binding DrawerNo, Converter={StaticResource BoxNumConverter}, ConverterParameter=20}"/>-->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								        <Grid Grid.Column="1" Margin="6">
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            <materialDesign:Card Foreground="{DynamicResource PrimaryHueLightForegroundBrush}" Padding="8">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <Button Width="180" Height="70" Content="{Binding SelfContent}" Command="{Binding OpenBoxDelegate}" CommandParameter="0"  FontSize="30" Foreground="Red"
							 | 
						||
| 
								 | 
							
								                    IsEnabled="{Binding SelfEnable}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding SelfStatus, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                    materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding SelfStatus, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                    Style="{StaticResource MaterialDesignOutlinedLightButton}"/>
							 | 
						||
| 
								 | 
							
								            </materialDesign:Card>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								    </Grid>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |