130 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			XML
		
	
	
	
			
		
		
	
	
			130 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			XML
		
	
	
	
<UserControl x:Class="DM_Weight.Views.Dialog.ReportDrugNameDialog"
 | 
						|
             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.Dialog"
 | 
						|
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
 | 
						|
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
 | 
						|
             xmlns:convert="clr-namespace:DM_Weight.Converter"
 | 
						|
             xmlns:prism="http://prismlibrary.com/"
 | 
						|
             mc:Ignorable="d" 
 | 
						|
             d:DesignHeight="450" d:DesignWidth="800">
 | 
						|
    <Grid>
 | 
						|
        <Grid.Resources>
 | 
						|
            <convert:NullableToEnabelConverter x:Key="NullableToEnabelConverter" />
 | 
						|
        </Grid.Resources>
 | 
						|
        <Grid.RowDefinitions>
 | 
						|
            <RowDefinition Height="Auto" />
 | 
						|
            <RowDefinition Height="Auto" />
 | 
						|
        </Grid.RowDefinitions>
 | 
						|
        <Grid Background="#03a9f4" Grid.Row="0">
 | 
						|
            <TextBlock VerticalAlignment="Center" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}" Margin="16 4 16 4" Style="{StaticResource MaterialDesignHeadline5TextBlock}" Text="修改药品" />
 | 
						|
            <Button
 | 
						|
             Style="{StaticResource MaterialDesignIconForegroundButton}"
 | 
						|
             Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
 | 
						|
             HorizontalAlignment="Right"
 | 
						|
             Command="{Binding BtnCloseCommand}"
 | 
						|
             ToolTip="关闭">
 | 
						|
                <materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
 | 
						|
            </Button>
 | 
						|
        </Grid>
 | 
						|
        <!--<GroupBox Margin="6"  Grid.Row="1" Header="编辑/新增" materialDesign:ColorZoneAssist.Mode="PrimaryLight">-->
 | 
						|
        <Grid   Grid.Row="1">
 | 
						|
            <Grid.RowDefinitions>
 | 
						|
                <RowDefinition Height="Auto" />
 | 
						|
                <RowDefinition />
 | 
						|
            </Grid.RowDefinitions>
 | 
						|
            <Grid Grid.Row="0">
 | 
						|
                <Grid.ColumnDefinitions>
 | 
						|
                    <ColumnDefinition />
 | 
						|
                    <ColumnDefinition />
 | 
						|
                </Grid.ColumnDefinitions>
 | 
						|
                <Grid.RowDefinitions>
 | 
						|
                    <RowDefinition/>
 | 
						|
                    <RowDefinition/>
 | 
						|
                </Grid.RowDefinitions>
 | 
						|
                <StackPanel  Grid.Column="0"  Grid.ColumnSpan="2"  Orientation="Horizontal"  Margin="10"  HorizontalAlignment="Left" VerticalAlignment="Center">
 | 
						|
                    <ComboBox
 | 
						|
                         Margin="6 0 6 0" 
 | 
						|
                         materialDesign:HintAssist.Hint="药品名称/拼音码"
 | 
						|
                         IsEditable="True"
 | 
						|
                         ItemsSource="{Binding DrugInfos}"
 | 
						|
                         SelectedItem="{Binding DrugInfo}"
 | 
						|
                         DisplayMemberPath="drug_name_spec" IsEnabled="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp"/>
 | 
						|
                </StackPanel>
 | 
						|
                <StackPanel  Grid.Column="1" Grid.ColumnSpan="2"  Orientation="Horizontal" Margin="10" HorizontalAlignment="Right" VerticalAlignment="Center">
 | 
						|
                    <Button  Command="{Binding AddRole}"  Content="保存" />
 | 
						|
                </StackPanel>
 | 
						|
            </Grid>
 | 
						|
            <Grid Grid.Row="1">
 | 
						|
                <Grid.ColumnDefinitions>
 | 
						|
                    <ColumnDefinition />
 | 
						|
                    <ColumnDefinition Width="Auto" />
 | 
						|
                    <ColumnDefinition />
 | 
						|
                </Grid.ColumnDefinitions>
 | 
						|
                <GroupBox Header="查询药品"   Grid.Column="0" Margin="10">
 | 
						|
                    <ScrollViewer  Grid.Row="1"  Grid.Column="1">
 | 
						|
                        <TreeView x:Name="LeftTree" MinWidth="220" ItemsSource="{Binding AllPremissions}" >
 | 
						|
                            <i:Interaction.Triggers>
 | 
						|
                                <i:EventTrigger EventName="SelectedItemChanged">
 | 
						|
                                    <i:InvokeCommandAction Command="{Binding Path=LeftSelectedItemChangedCommand}" 
 | 
						|
                                   CommandParameter="{Binding ElementName=LeftTree, Path=SelectedItem}"/>
 | 
						|
                                </i:EventTrigger>
 | 
						|
                            </i:Interaction.Triggers>
 | 
						|
                            <TreeView.ItemTemplate>
 | 
						|
                                <!--<HierarchicalDataTemplate ItemsSource="{Binding drug_name_spec}">
 | 
						|
                                        <TextBlock Text="{Binding drug_name_spec}" />
 | 
						|
                                    </HierarchicalDataTemplate>-->
 | 
						|
                                <DataTemplate>
 | 
						|
                                    <StackPanel Orientation="Horizontal">
 | 
						|
                                        <TextBlock Text="{Binding drug_name_spec}"/>
 | 
						|
                                    </StackPanel>
 | 
						|
                                </DataTemplate>
 | 
						|
                            </TreeView.ItemTemplate>
 | 
						|
                        </TreeView>
 | 
						|
                    </ScrollViewer>
 | 
						|
                </GroupBox>
 | 
						|
                <StackPanel Grid.Column="1" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
 | 
						|
                    <Button
 | 
						|
                    Margin="0 4 0 4"
 | 
						|
                    Style="{StaticResource MaterialDesignPaperLightButton}"
 | 
						|
                    ToolTip="右移"
 | 
						|
                    IsEnabled="{Binding LeftPremission, Converter={StaticResource NullableToEnabelConverter}}"
 | 
						|
                    Command="{Binding ToRight}"
 | 
						|
                    Content="{materialDesign:PackIcon ChevronRight}"/>
 | 
						|
                    <Button
 | 
						|
                    Margin="0 4 0 4"
 | 
						|
                    Style="{StaticResource MaterialDesignPaperLightButton}"
 | 
						|
                    ToolTip="左移"
 | 
						|
                    IsEnabled="{Binding RightPremission, Converter={StaticResource NullableToEnabelConverter}}"
 | 
						|
                    Command="{Binding ToLeft}"
 | 
						|
                    Content="{materialDesign:PackIcon ChevronLeft}"/>
 | 
						|
                </StackPanel>
 | 
						|
                <GroupBox Header="已选药品"  Grid.Column="2" Margin="10">
 | 
						|
                    <ScrollViewer  Grid.Row="1"  Grid.Column="1">
 | 
						|
                        <TreeView x:Name="RightTree" MinWidth="220" ItemsSource="{Binding RightDrugNameList}">
 | 
						|
                            <i:Interaction.Triggers>
 | 
						|
                                <i:EventTrigger EventName="SelectedItemChanged">
 | 
						|
                                    <i:InvokeCommandAction Command="{Binding Path=RightSelectedItemChangedCommand}" 
 | 
						|
                                   CommandParameter="{Binding ElementName=RightTree, Path=SelectedItem}"/>
 | 
						|
                                </i:EventTrigger>
 | 
						|
                            </i:Interaction.Triggers>
 | 
						|
                            <TreeView.ItemTemplate>
 | 
						|
                                <DataTemplate>
 | 
						|
                                    <StackPanel Orientation="Horizontal">
 | 
						|
                                        <TextBlock Text="{Binding drug_name_spec}"/>
 | 
						|
                                    </StackPanel>
 | 
						|
                                </DataTemplate>
 | 
						|
                            </TreeView.ItemTemplate>
 | 
						|
                        </TreeView>
 | 
						|
                    </ScrollViewer>
 | 
						|
                </GroupBox>
 | 
						|
                <materialDesign:Snackbar   Background="{Binding SnackbarBackground}"   MessageQueue="{Binding SnackbarMessageQueue}"/>
 | 
						|
            </Grid>
 | 
						|
 | 
						|
        </Grid>
 | 
						|
        <!--</GroupBox>-->
 | 
						|
    </Grid>
 | 
						|
</UserControl>
 |