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

373 lines
22 KiB
Plaintext

2 years ago
<UserControl x:Class="XGL.Views.DryingRoomUC"
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:XGL.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded">
2 years ago
<UserControl.Resources>
<Style x:Key="ApplicantList_ListBox_Style" TargetType="{x:Type ListBox}">
<Setter Property="Background" Value="#00000000"/>
<Setter Property="BorderBrush" Value="#00000000"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<!--<Setter Property="ItemContainerStyle" Value="{DynamicResource ApplicantList_ListBoxItem_Style}" />-->
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<!--<WrapPanel Orientation="Horizontal" IsItemsHost="True" />-->
<UniformGrid Columns="6"/>
<!--设置横向Horizontal 纵向Vertical显示-->
</ItemsPanelTemplate>
</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"
2 years ago
Width="250"
Height="150"
Margin="2,0,0,0"
Style="{DynamicResource ListBoxItemNormalBackground_Border_Style}">
<Grid >
2 years ago
<TextBlock Text="{Binding workorder_code}"
Margin="110,12,0,0"
HorizontalAlignment="left"
VerticalAlignment="top"
TextAlignment="left"
Style="{DynamicResource ListBoxItemName_TextBlock_Style}"/>
2 years ago
<TextBlock Text="{Binding material_code}"
Margin="111,32,0,0" FontSize="16"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
<WrapPanel Orientation="Horizontal">
<TextBlock Margin="111,50,0,0" Text="批次单号:" FontSize="14"/>
2 years ago
<TextBlock Text="{Binding rfid_no}"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"
Margin="0,50,0,0"/>
</WrapPanel>
<WrapPanel>
<TextBlock Margin="111,68,0,0" Text="批次日期:" FontSize="14"></TextBlock>
2 years ago
<TextBlock Text="{Binding update_time}"
Margin="0,68,0,0"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
</WrapPanel>
<WrapPanel>
<TextBlock Margin="111,86,0,0" Text="病区名称:" FontSize="14"></TextBlock>
2 years ago
<TextBlock Text="{Binding rfid_no}"
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"/>-->
2 years ago
<!--<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding rfid_no}" FontSize="18"
Foreground="{Binding rfid_no,Converter={StaticResource ForeGroundBatchType}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Image Source="..\Img\1.png"></Image>
2 years ago
</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>
2 years ago
<!--字体样式-->
<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>
2 years ago
<!--ComboBox下拉按钮-->
<Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border x:Name="Back" Background="#F7FDF7" BorderThickness="1" BorderBrush="Transparent">
<Path Name="PathFill" Fill="Blue" Width="8" Height="6" StrokeThickness="0" Data="M5,0 L10,10 L0,10 z" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="180"/>
<TranslateTransform/>
</TransformGroup>
</Path.RenderTransform>
</Path>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="PathFill" Property="Fill" Value="White"></Setter>
<Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter>
<Setter TargetName="Back" Property="BorderBrush" Value="#3697A4"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox" x:Key="ComboBoxStyle">
<Setter Property="ItemContainerStyle">
<Setter.Value>
<!--ComBoxItem #59CA4F #81D779-->
<Style TargetType="ComboBoxItem">
<Setter Property="MinHeight" Value="22"></Setter>
<Setter Property="MinWidth" Value="60"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border Name="Back" Background="Transparent" CornerRadius="5,5,5,5"
RenderTransformOrigin="0.5,0.5" BorderThickness="0,0,0,0" BorderBrush="Blue" >
<ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid Background="#F7FDF7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*" MaxWidth="30"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="PART_EditableTextBox" Grid.Column="0" IsReadOnly="{TemplateBinding IsReadOnly}" FontSize="18" VerticalContentAlignment="Center" Text="{TemplateBinding Text}"></TextBox>
<Border Grid.Column="0" BorderThickness="1,1,0,1" BorderBrush="LightGray" CornerRadius="1,0,0,1">
</Border>
<Border Grid.Column="1" BorderThickness="0,1,1,1" BorderBrush="LightGray" CornerRadius="0,1,1,0">
<ToggleButton Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
</Border>
<Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
<Border CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
<Border.Effect>
<DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="0.5"/>
</Border.Effect>
<ScrollViewer Margin="4,6,4,6" Style="{DynamicResource ScrollViewerStyle}" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
<!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="White"/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
2 years ago
</UserControl.Resources>
2 years ago
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.2*"/>
<RowDefinition />
2 years ago
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
2 years ago
<Label Content="请选择烘房:" VerticalContentAlignment="Center" FontSize="16" Margin="20,0,0,0"/>
2 years ago
<ComboBox x:Name="comboDryRoomInfo" Width="200" Style="{StaticResource ComboBoxStyle}" VerticalContentAlignment="Center" SelectionChanged="comboDryRoomInfo_SelectionChanged"></ComboBox>
2 years ago
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10,0,0,0">
<Label Content="当前温度:" VerticalContentAlignment="Center" FontSize="16"/>
2 years ago
<Label x:Name="lbCurrTemperature" Width="60" VerticalContentAlignment="Center" FontSize="24"
Foreground="#1A68CA"></Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="当前湿度:" VerticalContentAlignment="Center" FontSize="16"/>
<Label x:Name="lbCurrHumilly" Width="60" VerticalContentAlignment="Center" FontSize="24"
Foreground="#1A68CA"></Label>
2 years ago
</StackPanel>
<StackPanel Orientation="Horizontal">
2 years ago
<Button
x:Name="btnRefrsh"
Width="100"
Height="40"
Margin="60,0,0,0"
Background="#2F82E7"
Click="btnRefrsh_Click"
Content="刷新"
FontSize="20"
Foreground="White"
IsCancel="True" />
2 years ago
</StackPanel>
</StackPanel>
<!--ItemContainerStyle="{DynamicResource ApplicantList_ListBoxItem_Style}"-->
<ListBox Grid.Row="1" x:Name="DringRoomOuterListBox" Style="{DynamicResource ApplicantList_ListBox_Style}" Margin="20,0,0,0"></ListBox>
2 years ago
<ListBox Grid.Row="2" x:Name="DringRoomListBox" Style="{DynamicResource ApplicantList_ListBox_Style}" Margin="20,0,0,0">
2 years ago
</ListBox>
2 years ago
</Grid>
</UserControl>