@ -29,11 +29,347 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ApplicantList_ListBoxItem_Style" TargetType="{x:Type ListBoxItem}">
<Setter Property="Margin" Value="10,10,10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderThickness="3"
Width="460"
Height="145"
Margin="2,0,0,0"
Style="{DynamicResource ListBoxItemNormalBackground_Border_Style}">
<Grid >
<TextBlock Text="{Binding Drug_info}"
Margin="110,12,0,0"
HorizontalAlignment="left"
VerticalAlignment="top"
TextAlignment="left"
Style="{DynamicResource ListBoxItemName_TextBlock_Style}"/>
<TextBlock Text="{Binding Pouch_comment}"
Margin="111,32,0,0" FontSize="16"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
<WrapPanel Orientation="Horizontal">
<TextBlock Margin="111,50,0,0" Text="批次单号:" FontSize="14"/>
<TextBlock Text="{Binding Batch_id}"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"
Margin="0,50,0,0"/>
</WrapPanel>
<WrapPanel>
<TextBlock Margin="111,68,0,0" Text="批次日期:" FontSize="14"></TextBlock>
<TextBlock Text="{Binding Batch_date}"
Margin="0,68,0,0"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
</WrapPanel>
<WrapPanel>
<TextBlock Margin="111,86,0,0" Text="病区名称:" FontSize="14"></TextBlock>
<TextBlock Text="{Binding Ward_name}"
Margin="0,86,0,0"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
</WrapPanel>
<Border Style="{DynamicResource ListBoxItemHeadBackground_Border_Style}"
Margin="15,15,0,0"
Width="82"
Height="102"
VerticalAlignment="Top"
HorizontalAlignment="Left" >
<!--<Image Source="{Binding 1.png,Converter={StaticResource IndsxToImageSourceConverter}}"
Margin="2"/>-->
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Batch_type}" FontSize="18"
Foreground="{Binding Batch_type,Converter={StaticResource ForeGroundBatchType}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Image Source="..\Img\1.png"></Image>
</StackPanel>
</Border>
</Grid>
</Border>
<!--控件触发器-->
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<!--LinearGradientBrush,渐变线画笔-->
<LinearGradientBrush
StartPoint="0.4,0"
EndPoint="0.4,1">
<LinearGradientBrush.GradientStops>
<!--GradientStops渐变线停止, GradientStopCollection渐变线停止集合点-->
<GradientStopCollection>
<GradientStop
Color="#FFffeeac"
Offset="0" />
<GradientStop
Color="#FFfbe178"
Offset="0.4" />
<GradientStop
Color="#FFfbe178"
Offset="0.6" />
<GradientStop
Color="#FFfffbd9"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" TargetName="Bd" Value="RoyalBlue"></Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<!--LinearGradientBrush,渐变线画笔-->
<LinearGradientBrush
StartPoint="0.4,0"
EndPoint="0.4,1">
<LinearGradientBrush.GradientStops>
<!--GradientStops渐变线停止, GradientStopCollection渐变线停止集合点-->
<GradientStopCollection>
<GradientStop
Color="#FFC2E0FF"
Offset="0" />
<GradientStop
Color="#FFC2E0dF"
Offset="0.4" />
<GradientStop
Color="#FFC2E0dF"
Offset="0.6" />
<GradientStop
Color="#FFfffbd9"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--ListBox Item样式-->
<Style x:Key="ApplicantList_ListBoxItem_Style1" TargetType="{x:Type ListBoxItem}">
<Setter Property="Margin" Value="10,10,10,0" />
<Setter Property="ToolTip">
<Setter.Value>
<ToolTip ToolTipService.Placement="Top" Content="双击开始调配!" ToolTipService.ShowOnDisabled="True" ToolTipService.ShowDuration="2000"></ToolTip>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderThickness="3"
Width="460"
Height="145"
Margin="2,0,0,0"
Style="{DynamicResource ListBoxItemNormalBackground_Border_Style1}">
<Grid >
<TextBlock Text="{Binding Drug_name}"
Margin="110,12,0,0"
HorizontalAlignment="left"
VerticalAlignment="top"
TextAlignment="left"
Style="{DynamicResource ListBoxItemName_TextBlock_Style}"/>
<TextBlock Text="{Binding Pouch_total}"
Margin="111,32,0,0" FontSize="16" Foreground="{Binding Pouch_total,Converter={StaticResource PouchTotalConverter}}"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
<WrapPanel Orientation="Horizontal">
<TextBlock Margin="111,48,0,0" Text="调配剂量:" FontSize="14"/>
<TextBlock Text="{Binding Dosage_total}" Foreground="{Binding Dosage_total,Converter={StaticResource PouchTotalConverter}}"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"
Margin="0,48,0,0"/>
</WrapPanel>
<WrapPanel>
<TextBlock Margin="111,64,0,0" Text="实际剂量:" FontSize="14"></TextBlock>
<TextBlock Text="{Binding Dosage_real_total}"
Margin="0,64,0,0"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
</WrapPanel>
<WrapPanel>
<TextBlock Margin="111,80,0,0" Text="调配标志:" FontSize="14"></TextBlock>
<TextBlock Text="{Binding Exec_flag}"
Margin="0,80,0,0" Foreground="{Binding Exec_flag,Converter={StaticResource PouchTotalConverter}}"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
</WrapPanel>
<WrapPanel>
<TextBlock Margin="111,96,0,0" Text="调配时间:" FontSize="14"></TextBlock>
<TextBlock Text="{Binding Exec_date}"
Margin="0,96,0,0"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
</WrapPanel>
<Border Style="{DynamicResource ListBoxItemHeadBackground_Border_Style}"
Margin="15,15,0,0"
Width="82"
Height="82"
VerticalAlignment="Top"
HorizontalAlignment="Left" >
<!--<Image Source="{Binding 1.png,Converter={StaticResource IndsxToImageSourceConverter}}"
Margin="2"/>-->
<Image Source="..\Img\drug.png"></Image>
</Border>
</Grid>
</Border>
<!--控件触发器-->
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<!--LinearGradientBrush,渐变线画笔-->
<LinearGradientBrush
StartPoint="0.4,0"
EndPoint="0.4,1">
<LinearGradientBrush.GradientStops>
<!--GradientStops渐变线停止, GradientStopCollection渐变线停止集合点-->
<GradientStopCollection>
<GradientStop
Color="#FFffeeac"
Offset="0" />
<GradientStop
Color="#ddf9e1"
Offset="0.4" />
<GradientStop
Color="#DDf2e1"
Offset="0.6" />
<GradientStop
Color="#FFfffbd9"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" TargetName="Bd" Value="SpringGreen"></Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<!--LinearGradientBrush,渐变线画笔-->
<LinearGradientBrush
StartPoint="0.4,0"
EndPoint="0.4,1">
<LinearGradientBrush.GradientStops>
<!--GradientStops渐变线停止, GradientStopCollection渐变线停止集合点-->
<GradientStopCollection>
<GradientStop
Color="#FFC2E0FF"
Offset="0" />
<GradientStop
Color="#FFC2E0dF"
Offset="0.4" />
<GradientStop
Color="#FFC2E0dF"
Offset="0.6" />
<GradientStop
Color="#FFfffbd9"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--字体样式-->
<Style x:Key="Title_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="34"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#FFFFFFFF"/>
</Style>
<Style x:Key="Copyright_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontFamily" Value="宋体"/>
<Setter Property="Foreground" Value="#FF939393"/>
</Style>
<Style x:Key="ChirdrenControlTitle_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#FFFFFFFF"/>
</Style>
<Style x:Key="ListBoxItemName_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="18"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#000000"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<Style x:Key="ListBoxItemContent_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#333333"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<!--ListBox元素边框样式-->
<Style x:Key="ListBoxItemNormalBackground_Border_Style" TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="BorderBrush" Value="#E1E1E1"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0"
EndPoint="0.5,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FFffffff"
Offset="0" />
<GradientStop Color="#FFE4E4E4"
Offset="0.96" />
<GradientStop Color="#FFe4e4e4"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#9e9e9e"
Direction="315"
ShadowDepth="3"
Opacity="1" />
</Setter.Value>
</Setter>
</Style>
<!--ListBox元素边框样式-->
<Style x:Key="ListBoxItemNormalBackground_Border_Style1" TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="BorderBrush" Value="#E1E1E1"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0"
EndPoint="0.5,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FFffffff"
Offset="0" />
<GradientStop Color="PowderBlue"
Offset="0.96" />
<GradientStop Color="PaleTurquoise"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#9e9e9e"
Direction="315"
ShadowDepth="3"
Opacity="1" />
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="0.2 *"/>
<RowDefinition />
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Center">
@ -50,8 +386,8 @@
<Label x:Name="lbCurrPressure" Width="40" VerticalContentAlignment="Center" FontSize="16"></Label>
</StackPanel>
</StackPanel>
<!--< ListBox Grid.Row="1" x:Name="DringRoomOuterListBox"></ListBox>-->
<!--ItemContainerStyle="{DynamicResource ApplicantList_ListBoxItem_Style}"-->
<ListBox Grid.Row="1" x:Name="DringRoomOuterListBox" Style="{DynamicResource ApplicantList_ListBox_Style}" Margin="20,0,0,0" ></ListBox>
<ListBox Grid.Row="2" x:Name="DringRoomListBox" Style="{DynamicResource ApplicantList_ListBox_Style}" Margin="20,0,0,0">
</ListBox>