<Window x:Class="XHandler.View.RunAgoTips"
|
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:XHandler.View"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
xmlns:ctrls="clr-namespace:XHandler.Controls"
|
mc:Ignorable="d" WindowStartupLocation = "CenterOwner"
|
Width="auto" Height="600" WindowStyle="None" AllowsTransparency="True" ResizeMode="NoResize" Background="#00FFFFFF"
|
Loaded="Window_Loaded" PreviewKeyDown="Window_PreviewKeyDown"
|
xmlns:hc="https://handyorg.github.io/handycontrol">
|
|
<Window.Resources>
|
<Style x:Key="DataGridCellSytleRed" TargetType="Label">
|
<Style.Triggers>
|
<DataTrigger Binding="{Binding DeviceStatus}" Value="true">
|
<Setter Property="Foreground" Value="Black"/>
|
<Setter Property="Content" Value="在线"/>
|
</DataTrigger>
|
<DataTrigger Binding="{Binding DeviceStatus}" Value="false">
|
<Setter Property="Foreground" Value="Red"/>
|
<Setter Property="Content" Value="离线"/>
|
</DataTrigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="dataGridColumnHeaderStyleSelf" TargetType="DataGridColumnHeader">
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
<Setter Property="MinWidth" Value="0" />
|
<Setter Property="MinHeight" Value="28" />
|
<Setter Property="Foreground" Value="#323433" />
|
<Setter Property="FontSize" Value="15" />
|
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Height" Value="40"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="DataGridColumnHeader">
|
<Border x:Name="BackgroundBorder" BorderThickness="0,0,0,0" BorderBrush="LightGray" Width="Auto" Background="{DynamicResource lightGrayBrush}">
|
<Grid >
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*" />
|
</Grid.ColumnDefinitions>
|
<ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
</Grid>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="dataGridRowStyleSelf" TargetType="DataGridRow">
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="Background" Value="White" />
|
<Setter Property="Height" Value="40"/>
|
<Setter Property="FontSize" Value="15" />
|
<Setter Property="Foreground" Value="Black" />
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="{DynamicResource lightBlueBrush}"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
|
</Window.Resources>
|
|
<Grid Width="600" Height="auto">
|
<Border Background="{DynamicResource blueBrush}" CornerRadius="10 10 10 10" BorderThickness="2" BorderBrush="{DynamicResource blueBrush}">
|
<Grid Margin="1.5,0,1.5,1.5">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="auto"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="600"/>
|
</Grid.ColumnDefinitions>
|
|
<Grid Grid.Row="0" MouseDown="Grid_MouseDown" >
|
<Border Grid.Row="0" Background="{DynamicResource blueBrush}" CornerRadius="10 10 0 0" BorderThickness="0">
|
<Grid>
|
<!--title-->
|
<TextBlock Text="实验提示" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="20 0" FontSize="20"
|
Foreground="White" FontWeight="Bold"/>
|
<Button Content="×" x:Name="btnClose" HorizontalAlignment="Right" VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="10 0" FontSize="28" Width="40" Height="40"
|
FontWeight="Bold" Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="{DynamicResource blueBrush}" Visibility="Visible" Click="btnClose_Click"/>
|
</Grid>
|
</Border>
|
</Grid>
|
|
<Grid Grid.Row="1" Background="White" x:Name="gdSetContent1" Height="560">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="auto"/>
|
<RowDefinition Height="10"/>
|
<RowDefinition Height="auto"/>
|
<RowDefinition Height="10"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="600"/>
|
</Grid.ColumnDefinitions>
|
|
<GroupBox Grid.Row="0" Grid.Column="0" Height="auto" Header="清除Tip" Style="{StaticResource GroupBoxTab}" FontSize="16">
|
<Border Background="{DynamicResource RegionBrush}" CornerRadius="0">
|
<!--<Button x:Name="btnClearData" Content="{x:Static str:Resources.btnClearRunData}" HorizontalAlignment="Center" VerticalAlignment="Top"
|
FontSize="16" Width="480" Height="40" Foreground="Blue" Background="#00FFFFFF" BorderThickness="0"
|
Click="btnClearData_Click"/>-->
|
|
|
<Grid Grid.Row="1" Background="White" >
|
<Grid.RowDefinitions>
|
<RowDefinition Height="50"/>
|
<RowDefinition Height="50"/>
|
<RowDefinition Height="50"/>
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="200"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
|
<!--枪头类型-->
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strTipsType1}" Foreground="Gray" VerticalAlignment="Center"
|
TextWrapping="Wrap" HorizontalAlignment="Right" Margin="0 0 0 0" FontSize="16" />
|
<ComboBox x:Name="comboboxLabwareType" Grid.Row="0" Grid.Column="1" Height="30" Width="300" BorderThickness="0"
|
Background="{DynamicResource lightGrayBrush}" DisplayMemberPath="labware_name" SelectedValuePath="labware_id"
|
SelectionChanged="comboboxLabwareType_SelectionChanged" IsEditable="False"/>
|
|
<!--已使用数量-->
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strRunTipsCountInfo}" Foreground="Gray" VerticalAlignment="Center"
|
TextWrapping="Wrap" HorizontalAlignment="Right" Margin="0 0 0 0" FontSize="16" />
|
<TextBlock Grid.Row="1" Grid.Column="1" x:Name="tbkUsedCount" Text="" Foreground="Black" VerticalAlignment="Center" TextWrapping="Wrap"
|
HorizontalAlignment="Center" Margin="0 0 0 0" FontSize="16" />
|
|
<!--当前类型重置-->
|
<Button x:Name="btnResetCurrentTipType" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
|
VerticalAlignment="Top" Margin="100 0 0 0" FontSize="16" Width="250" Height="40" Foreground="Blue" HorizontalAlignment="Left"
|
Background="#00FFFFFF" BorderThickness="0" Click="btnResetCurrentTipType_Click" >
|
<Button.Content>
|
<StackPanel Orientation="Horizontal">
|
<Image Stretch="Fill" Source="../Assets/refresh.png" Width="18" Height="18" HorizontalAlignment="Right" Margin="0,0,5,0"/>
|
<TextBlock Text="{x:Static str:Resources.strResetCurrentTipType}" />
|
</StackPanel>
|
</Button.Content>
|
</Button>
|
|
<!--全部重置-->
|
<Button x:Name="btnResetAllTipType" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" VerticalAlignment="Top" Margin="130 0 0 0"
|
FontSize="16" Width="150" Height="40" Foreground="Blue" HorizontalAlignment="Left"
|
Background="#00FFFFFF" BorderThickness="0" Click="btnResetAllTipType_Click">
|
<Button.Content>
|
<StackPanel Orientation="Horizontal">
|
<Image Stretch="Fill" Source="../Assets/refresh.png" Width="18" Height="18" HorizontalAlignment="Right" Margin="0,0,5,0"/>
|
<TextBlock Text="{x:Static str:Resources.strResetAllTipType}" />
|
</StackPanel>
|
</Button.Content>
|
</Button>
|
|
</Grid>
|
</Border>
|
</GroupBox>
|
|
<GroupBox Grid.Row="2" Grid.Column="0" Height="380" Header="设备状态" Style="{StaticResource GroupBoxTab}" FontSize="16">
|
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
|
|
<DataGrid x:Name="dgDeviceData" AutoGenerateColumns="False" VerticalAlignment="Top" HorizontalAlignment="Left"
|
HorizontalContentAlignment="Center" BorderThickness="1 0 0 0" Background="White"
|
CanUserSortColumns="False" Margin="5 5" CanUserResizeColumns="False" CanUserResizeRows="False"
|
CanUserReorderColumns="False" RowHeaderWidth="0" CanUserAddRows="False"
|
ScrollViewer.VerticalScrollBarVisibility="Auto" Height="370" ColumnHeaderStyle="{DynamicResource dataGridColumnHeaderStyleSelf}"
|
RowStyle="{StaticResource dataGridRowStyleSelf}" CellStyle="{StaticResource dataGridCellStyleDoubleClick}">
|
<DataGrid.Columns>
|
<!--<DataGridTextColumn Width="150" Header="设备名称">
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<Label Content="{Binding DeviceName}" Foreground="Black" BorderThickness="0" HorizontalContentAlignment="Center" HorizontalAlignment="Left"/>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTextColumn>-->
|
<DataGridTextColumn Width="150" IsReadOnly="True" Binding="{Binding DeviceName}" Header="设备名称"/>
|
|
<!--<DataGridTemplateColumn Width="160" Header="设备ID" >
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<Label Content="{Binding DeviceId}" Foreground="Black" BorderThickness="0" HorizontalContentAlignment="Center" HorizontalAlignment="Left"/>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>-->
|
<DataGridTextColumn Width="160" IsReadOnly="True" Binding="{Binding DeviceId}" Header="设备ID"/>
|
|
<!--<DataGridTemplateColumn Width="160" Header="虚拟连接" >
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<Label Content="{Binding VirtualConnectionState}" Foreground="Black" BorderThickness="0" HorizontalContentAlignment="Center" HorizontalAlignment="Left"/>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>-->
|
<DataGridTextColumn Width="160" IsReadOnly="True" Binding="{Binding VirtualConnectionState}" Header="虚拟连接"/>
|
|
<DataGridTemplateColumn Width="*" Header="状态" >
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<Label BorderThickness="0" Style="{DynamicResource DataGridCellSytleRed}"/>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<!--<DataGridTextColumn Width="*" IsReadOnly="True" Binding="{Binding DeviceStatus}" Header="状态" CellStyle="{DynamicResource DataGridCellSytleRed}"/>-->
|
|
</DataGrid.Columns>
|
</DataGrid>
|
</Border>
|
</GroupBox>
|
|
<Rectangle Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="6" Height="1" Fill="Gray" VerticalAlignment="Bottom" Margin="15 0"/>
|
</Grid>
|
|
<Button Grid.Row="1" x:Name="btnCancel" Content="取消" Width="80" Height="40" VerticalContentAlignment="Center"
|
HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" Style="{DynamicResource BlueButtonStyle}"
|
Background="{DynamicResource blueBrush}" Click="btnClose_Click" Margin="200,500,0,0"/>
|
|
<Button Grid.Row="1" x:Name="btnOk" Content="确定" Width="80" Height="40" VerticalContentAlignment="Center"
|
HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" Style="{DynamicResource BlueButtonStyle}"
|
Background="{DynamicResource blueBrush}" Click="btnOk_Click" Margin="400,500,0,0"/>
|
</Grid>
|
</Border>
|
</Grid>
|
</Window>
|