147 lines
		
	
	
		
			9.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			147 lines
		
	
	
		
			9.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.SettingBoxWindow"
							 | 
						||
| 
								 | 
							
								             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:prism="http://prismlibrary.com/"
							 | 
						||
| 
								 | 
							
								             prism:ViewModelLocator.AutoWireViewModel="True"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
							 | 
						||
| 
								 | 
							
								             xmlns:convert="clr-namespace:DM_Weight.Converter"
							 | 
						||
| 
								 | 
							
								             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d">
							 | 
						||
| 
								 | 
							
								    <UserControl.Resources>
							 | 
						||
| 
								 | 
							
								        <convert:StatusConverter x:Key="StatusConverter" />
							 | 
						||
| 
								 | 
							
								        <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
							 | 
						||
| 
								 | 
							
								    </UserControl.Resources>
							 | 
						||
| 
								 | 
							
								    <Grid>
							 | 
						||
| 
								 | 
							
								        <Grid.ColumnDefinitions>
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition Width="Auto" />
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition Width="Auto" />
							 | 
						||
| 
								 | 
							
								            <ColumnDefinition />
							 | 
						||
| 
								 | 
							
								        </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 />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>-->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            <Grid>
							 | 
						||
| 
								 | 
							
								                <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="一号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="0" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="1" Grid.Column="0" Width="120" Content="二号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="1" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="2" Grid.Column="0" Width="120" Content="三号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="2" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="3" Grid.Column="0" Width="120" Content="四号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="3" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="4" Grid.Column="0" Width="120" Content="五号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="4" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="5" Grid.Column="0" Width="120" Content="六号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="5" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="6" Grid.Column="0" Width="120" Content="七号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="6" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="7" Grid.Column="0" Width="120" Content="八号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="7" />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="8" Grid.Column="0" Width="120" Content="九号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="8" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="0" Grid.Column="1" Width="120" Content="十号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="9" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="1" Grid.Column="1" Width="120" Content="十一号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="10" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="2" Grid.Column="1" Width="120" Content="十二号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="11" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="3" Grid.Column="1" Width="120" Content="十三号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="12" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="4" Grid.Column="1" Width="120" Content="十四号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="13" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="5" Grid.Column="1" Width="120" Content="十五号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="14" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="6" Grid.Column="1" Width="120" Content="十六号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="15" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="7" Grid.Column="1" Width="120" Content="十七号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="16" />
							 | 
						||
| 
								 | 
							
								                <Button Margin="0 0  3 0" Grid.Row="8" Grid.Column="1" Width="120" Content="十八号手术间" Command="{Binding UpdateDrawerNo}" CommandParameter="17" />
							 | 
						||
| 
								 | 
							
								                <!--<Button Grid.Row="8" Grid.Column="1" Width="120" Content="19号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="19" />
							 | 
						||
| 
								 | 
							
								                <Button Grid.Row="9" Grid.Column="1" Width="120" Content="20号药箱" Command="{Binding UpdateDrawerNo}" CommandParameter="20" />-->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								        <Grid Grid.Column="2" Margin="6">
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
							 | 
						||
| 
								 | 
							
								                <!--<Button
							 | 
						||
| 
								 | 
							
								                        Margin="6 0 6 6"
							 | 
						||
| 
								 | 
							
								                        ToolTip="打开药箱"
							 | 
						||
| 
								 | 
							
								                        Content="打开药箱"
							 | 
						||
| 
								 | 
							
								                        IsEnabled="{Binding IsEnable}"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding OpenBox}"
							 | 
						||
| 
								 | 
							
								                        materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                        materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding Status, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}" />-->
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Margin="6 0 6 6"
							 | 
						||
| 
								 | 
							
								                        ToolTip="保存设置"
							 | 
						||
| 
								 | 
							
								                        Content="保存设置"
							 | 
						||
| 
								 | 
							
								                        IsEnabled="{Binding IsEnable}"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding SaveSetting}"
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}" />
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Margin="0 0 6 6"
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="刷新"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding Query}"
							 | 
						||
| 
								 | 
							
								                        Content="{materialDesign:PackIcon Refresh}"/>
							 | 
						||
| 
								 | 
							
								            </StackPanel>
							 | 
						||
| 
								 | 
							
								            <StackPanel Grid.Row="1" Margin="6">
							 | 
						||
| 
								 | 
							
								                <ComboBox Margin="6"
							 | 
						||
| 
								 | 
							
								                          Style="{StaticResource MaterialDesignOutlinedComboBox}"
							 | 
						||
| 
								 | 
							
								                          materialDesign:HintAssist.Hint="药师类型"
							 | 
						||
| 
								 | 
							
								                          ItemsSource="{Binding BoxTypeList}"
							 | 
						||
| 
								 | 
							
								                          SelectedItem="{Binding BoxTypeSelectedItem}"
							 | 
						||
| 
								 | 
							
								                          DisplayMemberPath="TypeName"
							 | 
						||
| 
								 | 
							
								                          materialDesign:TextFieldAssist.HasClearButton="True"
							 | 
						||
| 
								 | 
							
								                          Width="256">
							 | 
						||
| 
								 | 
							
								                </ComboBox>
							 | 
						||
| 
								 | 
							
								                <ComboBox  Margin="6" Visibility="{Binding UserStatus}"
							 | 
						||
| 
								 | 
							
								                          Style="{StaticResource MaterialDesignOutlinedComboBox}"
							 | 
						||
| 
								 | 
							
								                          materialDesign:HintAssist.Hint="绑定药师"
							 | 
						||
| 
								 | 
							
								                          ItemsSource="{Binding UserLists}"
							 | 
						||
| 
								 | 
							
								                          SelectedItem="{Binding UserListSelectedItem}"
							 | 
						||
| 
								 | 
							
								                          DisplayMemberPath="UserName"
							 | 
						||
| 
								 | 
							
								                          materialDesign:TextFieldAssist.HasClearButton="True"
							 | 
						||
| 
								 | 
							
								                          Width="256">
							 | 
						||
| 
								 | 
							
								                </ComboBox>
							 | 
						||
| 
								 | 
							
								            </StackPanel>
							 | 
						||
| 
								 | 
							
								            <materialDesign:Snackbar
							 | 
						||
| 
								 | 
							
								                Background="{Binding SnackbarBackground}"
							 | 
						||
| 
								 | 
							
								                MessageQueue="{Binding SnackbarMessageQueue}"/>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								    </Grid>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |