<UserControl x:Class="XHandler.View.TestDesign"
|
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:ctrls="clr-namespace:XHandler.Controls"
|
xmlns:cls ="clr-namespace:XHandler.Class.DataEx"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
mc:Ignorable="d"
|
d:DesignHeight="960" d:DesignWidth="1280" Loaded="UserControl_Loaded" PreviewKeyDown="UserControl_PreviewKeyDown">
|
|
<UserControl.Resources>
|
<!--#region 指令集 style-->
|
<Style x:Key="ListBoxStyle1" TargetType="{x:Type ListBox}">
|
<Setter Property="Background" Value="White"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
<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="VerticalAlignment" Value="Stretch"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ListBox}">
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="1" SnapsToDevicePixels="true">
|
<ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</ScrollViewer>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="ItemsPanel">
|
<Setter.Value>
|
<ItemsPanelTemplate>
|
<StackPanel/>
|
</ItemsPanelTemplate>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="ItemContainerStyle">
|
<Setter.Value>
|
<Style TargetType="ListBoxItem">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="ListBoxItem">
|
<Border x:Name="Border" Margin="0" Height="auto" BorderThickness="0" Padding="1" Background="{TemplateBinding Background}">
|
<Expander Header="{Binding GroupName}" Style="{DynamicResource MethodGroupExpanderStyle}" IsExpanded="True">
|
|
<!--Width="400"-->
|
<ListView ItemsSource="{Binding Children}" ItemsPanel="{DynamicResource NormalItemsPanel}"
|
ItemContainerStyle="{DynamicResource ListViewItemStyle}" ItemTemplate="{DynamicResource ListViewItemDataTemplate}"
|
Width="{Binding Converter={StaticResource percentageConverter}, ElementName=listboxCmd, Path=ActualWidth, ConverterParameter=0.95}"
|
BorderThickness="0" PreviewMouseLeftButtonDown="ListView_PreviewMouseLeftButtonDown" PreviewMouseMove="ListView_PreviewMouseMove"
|
QueryContinueDrag="DoQueryContinueDrag" Background="Transparent" />
|
</Expander>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<!--#endregion-->
|
|
<!--#endregion-->
|
|
<!--#region ListView样式-->
|
<Style x:Key="ListViewItemStyle" TargetType="{x:Type ListViewItem}">
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
<!--<Setter Property="IsEnabled" Value="False"/>-->
|
<Setter Property="Control.Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="ListViewItem">
|
<Grid>
|
<!--<Border x:Name="bg" Background="Transparent" CornerRadius="5" BorderThickness="0" Margin="3"/>-->
|
<ContentPresenter Margin="5,5,5,5"
|
Content="{TemplateBinding ContentControl.Content}"
|
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
|
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
|
HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
|
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
|
/>
|
<Border x:Name="bg" Background="Transparent" CornerRadius="5" BorderThickness="0" Margin="5"/>
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
<!--<Trigger Property="Selector.IsSelected" Value="True">
|
<Setter Property="Panel.Background" TargetName="bg" Value="#40000000"/>
|
</Trigger>-->
|
<Trigger Property="UIElement.IsEnabled" Value="False">
|
<Setter Property="TextElement.Foreground">
|
<Setter.Value>
|
<DynamicResource ResourceKey="{x:Static SystemColors.GrayTextBrushKey}" />
|
</Setter.Value>
|
</Setter>
|
</Trigger>
|
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
<Setter Property="Panel.Background" TargetName="bg" Value="#10000000"/>
|
</Trigger>
|
<Trigger Property="IsEnabled" Value="False">
|
<Setter Property="Panel.Background" TargetName="bg" Value="LightGray"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<!--命令集: 单个指令-->
|
<DataTemplate x:Key="ListViewItemDataTemplate">
|
<Grid>
|
<!--<Border Width="122" Height="90" CornerRadius="5" Background="{Binding method_group_id,Converter={StaticResource cmdBackgroundConverter}}" />-->
|
<!--<Border Width="122" Height="90" CornerRadius="5" Background="LightGray" Visibility="{Binding method_support,Converter={StaticResource intToVisibleConvert}}" />-->
|
<!--122-->
|
<Border Width="119" Height="90" CornerRadius="5">
|
<Border.Background>
|
<MultiBinding Converter="{StaticResource cmdBackgroundMultiConverter}">
|
<Binding Path="method_group_id"/>
|
<Binding Path="method_support"/>
|
</MultiBinding>
|
</Border.Background>
|
</Border>
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="30"/>
|
</Grid.RowDefinitions>
|
<!--<Image Grid.Row="0" Name="idImage" Source="{Binding method_ico, Converter={StaticResource cmdIconConvert}}" Stretch="Uniform" Height="32"/>-->
|
<Image Grid.Row="0" Name="idImage" Stretch="Uniform" Height="32">
|
<Image.Source>
|
<MultiBinding Converter="{StaticResource cmdIconMultiConvert}">
|
<Binding Path="method_ico"/>
|
<Binding Path="method_support"/>
|
<Binding Path="method_group_id"/>
|
</MultiBinding>
|
</Image.Source>
|
</Image>
|
|
<TextBlock Grid.Row="1" x:Name="idText" Text="{Binding method_name}" Margin="5,0" FontSize="16" Foreground="Black" TextWrapping="Wrap"
|
VerticalAlignment="Top" HorizontalAlignment="Center" />
|
</Grid>
|
|
</Grid>
|
</DataTemplate>
|
<!--#endregion-->
|
|
<!--#region WorkFlow style-->
|
<PathGeometry x:Key="TreeArrow" Figures="M0,0 L0,6 L6,0 z"/>
|
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
<Setter Property="Focusable" Value="False"/>
|
<Setter Property="Width" Value="16"/>
|
<Setter Property="Height" Value="16"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<Border Background="Transparent" Height="16" Padding="5,5,5,5" Width="16">
|
<Path x:Name="ExpandPath" Data="{StaticResource TreeArrow}" Fill="Transparent" Stroke="#FF989898">
|
<Path.RenderTransform>
|
<RotateTransform Angle="135" CenterY="3" CenterX="3"/>
|
</Path.RenderTransform>
|
</Path>
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Stroke" TargetName="ExpandPath" Value="#FF1BBBFA"/>
|
<Setter Property="Fill" TargetName="ExpandPath" Value="Transparent"/>
|
</Trigger>
|
<Trigger Property="IsChecked" Value="True">
|
<Setter Property="RenderTransform" TargetName="ExpandPath">
|
<Setter.Value>
|
<RotateTransform Angle="180" CenterY="3" CenterX="3"/>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="Fill" TargetName="ExpandPath" Value="#FF595959"/>
|
<Setter Property="Stroke" TargetName="ExpandPath" Value="#FF262626"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="workflowTreeViewStyle" TargetType="{x:Type TreeView}">
|
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
|
<Setter Property="VirtualizingStackPanel.IsVirtualizing" Value="True"></Setter>
|
<Setter Property="VirtualizingStackPanel.VirtualizationMode" Value="Recycling" />
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
<Setter Property="ItemContainerStyle" Value="{DynamicResource workflowTreeViewItem}"></Setter>
|
<Setter Property="Padding" Value="0"/>
|
<Setter Property="ItemsPanel">
|
<Setter.Value>
|
<ItemsPanelTemplate>
|
<VirtualizingStackPanel IsItemsHost="True" Margin="0"/>
|
</ItemsPanelTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="workflowTreeViewItem" TargetType="{x:Type TreeViewItem}">
|
<Setter Property="IsExpanded" Value="True"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Margin" Value="8"/>
|
<Setter Property="FontSize" Value="14"/>
|
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
|
<Setter Property="BorderBrush" Value="AliceBlue"/>
|
<Setter Property="IsSelected" Value="{Binding isSelected, Mode=OneWay}"/>
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition MinWidth="1" Width="Auto"/>
|
<ColumnDefinition Width="5"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto"/>
|
<RowDefinition/>
|
</Grid.RowDefinitions>
|
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Visible"/>
|
<Rectangle x:Name="Hd" Grid.Column="1" Fill="{DynamicResource blueBrush}" Opacity="0"/>
|
<Border x:Name="Bd" Grid.Column="2" BorderThickness="0 0 0 2" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
<Border.BorderBrush>
|
<VisualBrush>
|
<VisualBrush.Visual>
|
<Rectangle StrokeDashArray="4 4" Stroke="LightGray" StrokeThickness="1"
|
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
|
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
|
</VisualBrush.Visual>
|
</VisualBrush>
|
</Border.BorderBrush>
|
|
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</Border>
|
<ItemsPresenter x:Name="ItemsHost" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" />
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsExpanded" Value="false">
|
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
</Trigger>
|
<Trigger Property="HasItems" Value="false">
|
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
</Trigger>
|
<Trigger Property="IsSelected" Value="true">
|
<Setter Property="Background" TargetName="Bd" Value="#259FFF"/>
|
<Setter Property="Foreground" Value="White"/>
|
</Trigger>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsSelected" Value="true"/>
|
<Condition Property="IsSelectionActive" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
|
<Setter Property="Foreground" Value="White"/>
|
</MultiTrigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
|
<Style.Triggers>
|
<Trigger Property="VirtualizingStackPanel.IsVirtualizing" Value="true">
|
<Setter Property="ItemsPanel">
|
<Setter.Value>
|
<ItemsPanelTemplate>
|
<VirtualizingStackPanel/>
|
</ItemsPanelTemplate>
|
</Setter.Value>
|
</Setter>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="TreeViewItemStyle1" TargetType="{x:Type TreeViewItem}">
|
<Setter Property="IsSelected" Value="{Binding isSelected, Mode=OneWay}"/>
|
<Setter Property="IsExpanded" Value="True"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
<Setter Property="Padding" Value="1,0,0,0"/>
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition MinWidth="1" Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto"/>
|
<RowDefinition/>
|
</Grid.RowDefinitions>
|
<!--<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed"/>-->
|
<ToggleButton x:Name="Expander" Grid.Row="0" Grid.Column="0" Style="{StaticResource ExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Rectangle x:Name="Hd" Grid.Column="1" Fill="{DynamicResource blueBrush}" Opacity="0" Width="5"/>
|
<Border x:Name="Bd" Grid.Column="2" BorderThickness="0 0 0 2" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
<Border.BorderBrush>
|
<VisualBrush>
|
<VisualBrush.Visual>
|
<Rectangle StrokeDashArray="4 4" Stroke="LightGray" StrokeThickness="1"
|
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
|
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
|
</VisualBrush.Visual>
|
</VisualBrush>
|
</Border.BorderBrush>
|
|
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</Border>
|
<ItemsPresenter x:Name="ItemsHost" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" />
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsExpanded" Value="false">
|
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
</Trigger>
|
<Trigger Property="HasItems" Value="false">
|
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
</Trigger>
|
<Trigger Property="IsSelected" Value="true">
|
<Setter Property="Opacity" TargetName="Hd" Value="1"/>
|
<Setter Property="Background" TargetName="Bd" Value="#FFDBECFF"/>
|
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
</Trigger>
|
<!--<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" TargetName="Bd" Value="#FFDBECFF"/>
|
</Trigger>-->
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsSelected" Value="true"/>
|
<Condition Property="IsSelectionActive" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
|
</MultiTrigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Style.Triggers>
|
<Trigger Property="VirtualizingPanel.IsVirtualizing" Value="true">
|
<Setter Property="ItemsPanel">
|
<Setter.Value>
|
<ItemsPanelTemplate>
|
<VirtualizingStackPanel/>
|
</ItemsPanelTemplate>
|
</Setter.Value>
|
</Setter>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<HierarchicalDataTemplate x:Key="treeviewTemplate" DataType="{x:Type cls:MethodExEx}" ItemsSource="{Binding Children}">
|
<Border Width="auto" Height="56" Margin="{Binding Level, Converter={StaticResource leverToThicknessConvert}}">
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="50"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<TextBlock Grid.Column="0" FontSize="14" Text="{Binding strIndex}" VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold"
|
Foreground="{Binding isEnabled, Converter={StaticResource enableToBrush}}" Margin="10 0"/>
|
<Image Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Stretch="Uniform" Height="32">
|
<Image.Source>
|
<MultiBinding Converter="{StaticResource workflowIconMultiConvert}">
|
<Binding Path="method_ico"/>
|
<Binding Path="isEnabled"/>
|
<Binding Path="method_group_id"/>
|
</MultiBinding>
|
</Image.Source>
|
</Image>
|
|
<TextBlock Grid.Column="2" FontSize="16" Text="{Binding method_name}" VerticalAlignment="Center"
|
Foreground="{Binding isEnabled, Converter={StaticResource enableToBrush}}"/>
|
|
<TextBlock Grid.Column="3" FontSize="14" Margin="20,0,0,0" HorizontalAlignment="Left" Text="{Binding method_Tipcontent}" VerticalAlignment="Center"
|
Foreground="{Binding isEnabled, Converter={StaticResource enableToBrush}}" TextWrapping="WrapWithOverflow"/>
|
|
<!--<Rectangle Grid.Column="0" Grid.ColumnSpan="4" Stroke="LightGray" Height="1" StrokeThickness="2" StrokeDashArray="3 3" VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>-->
|
</Grid>
|
</Border>
|
</HierarchicalDataTemplate>
|
|
<!--#endregion-->
|
|
<DataTemplate x:Key="ConsumableListViewItemDataTemplate1">
|
<Border Width="110" Height="100" >
|
<Grid Margin="2">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="30"/>
|
</Grid.RowDefinitions>
|
<!--<Image Grid.Row="0" Name="idImage" Source="{Binding method_ico, Converter={StaticResource cmdIconConvert}}" Stretch="Uniform" Height="32"/>-->
|
<ctrls:ControlLabware Grid.Row="0" LabwareWidth="90" LabwareHeight="50"
|
LeftSideColor="{Binding labware_color_lside,Converter={StaticResource colorConvert}}"
|
FrontColor="{Binding labware_color_front,Converter={StaticResource colorConvert}}"
|
TopColor="{Binding labware_color_top,Converter={StaticResource colorConvert}}"
|
BorderColor="{Binding labware_color_line,Converter={StaticResource colorConvert}}"
|
labwareWellInfoList="{Binding labwareWellInfoList}"
|
LabwareRealLength="{Binding labware_length}" LabwareRealWidth="{Binding labware_width}"
|
Rows="{Binding number_row}" Columns="{Binding number_column}" WellColor="White" IsFill="true"
|
LabwareType="{Binding labware_type_id}" LabwareName="{Binding labware_name}"/>
|
|
<TextBlock Grid.Row="1" x:Name="idText" Text="{Binding labware_name}" FontSize="14" Foreground="Black" TextTrimming="WordEllipsis"
|
VerticalAlignment="Center" HorizontalAlignment="Center" ToolTip="{Binding labware_name}"/>
|
</Grid>
|
</Border>
|
</DataTemplate>
|
|
<!--#region workflow menu-->
|
<ContextMenu x:Key="workflowMenu" Width="140">
|
<MenuItem x:Name="workflowMenuCopy" Header="{x:Static str:Resources.strCopy}" Click="workflowMenuCopy_Click"/>
|
<MenuItem x:Name="workflowMenuPaste" Header="{x:Static str:Resources.strPaste}" IsEnabled="False" Click="workflowMenuPaste_Click"/>
|
<MenuItem x:Name="workflowMenuDisable" Header="{x:Static str:Resources.strDisable}" Click="workflowMenuDisable_Click"/>
|
<MenuItem x:Name="workflowMenuDelete" Header="{x:Static str:Resources.strDeleteWithKey}" Click="workflowMenuDelete_Click"/>
|
<MenuItem x:Name="workflowMenuRun" Header="{x:Static str:Resources.strRunThis}" Click="workflowMenuRun_Click"/>
|
<MenuItem x:Name="workflowMenuStepRun" Header="{x:Static str:Resources.strStepRun}" Click="workflowMenuStepRun_Click"/>
|
</ContextMenu>
|
<!--#endregion-->
|
|
<!--#region Table menu-->
|
<ContextMenu x:Key="tableMenu" x:Name="tableMenu" Width="150">
|
<MenuItem x:Name="tableMenuLabel" Header="{x:Static str:Resources.strLabel}" Click="tableMenuLabel_Click"/>
|
<!--通过右击属性设置barcode-->
|
<!--<MenuItem x:Name="tableMenuBarCode" Header="{x:Static str:Resources.strLabwareBarcode}" Click="tableMenuBarCode_Click"/>-->
|
<MenuItem x:Name="tableMenuDeleteLabware" Header="{x:Static str:Resources.strDelete}" Click="tableMenuDeleteLabware_Click"/>
|
<MenuItem x:Name="tableMenuCopyLabware" Header="{x:Static str:Resources.strCopy}" Click="tableMenuCopyLabware_Click"/>
|
<MenuItem x:Name="tableMenuPasteLabware" Header="{x:Static str:Resources.strPaste}" Click="tableMenuPasteLabware_Click" IsEnabled="False"/>
|
<MenuItem x:Name="tableMenuProperty" Header="{x:Static str:Resources.strProperty}" Click="tableMenuProperty_Click"/>
|
</ContextMenu>
|
<!--#endregion-->
|
</UserControl.Resources>
|
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="3*" MinWidth="250" MaxWidth="450"/>
|
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3.5*"/>
|
</Grid.ColumnDefinitions>
|
|
<!--#region 命令集 -->
|
<Grid Grid.Column="0" x:Name="gridCmdSet">
|
<Border Background="White" CornerRadius="0,10,10,0" Margin="0,0,10,0">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="50"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<TextBlock Grid.Row="0" Text="{x:Static str:Resources.strCommandSet}" VerticalAlignment="Center" Margin="20 0 0 0"
|
FontSize="20" FontWeight="Black"/>
|
|
<ctrls:SearchTextBox x:Name="searchMethod" Grid.Row="1" Background="#FFF7F8FA" Watermark="{x:Static str:Resources.strInputSearch}" VerticalAlignment="Center" Height="50" Margin="20,0"
|
FontSize="20" VerticalContentAlignment="Center" PreviewKeyDown="searchMethod_PreviewKeyDown"
|
clearEvent="searchMethod_clearEvent" Width="{Binding Converter={StaticResource percentageConverter}, ElementName=listboxCmd, Path=ActualWidth, ConverterParameter=0.95}"/>
|
|
<ListBox Grid.Row="2" x:Name="listboxCmd" Margin="20 20 0 20" Style="{DynamicResource ListBoxStyle1}"
|
PreviewMouseWheel="listboxCmd_PreviewMouseWheel" ScrollViewer.CanContentScroll="False"/>
|
</Grid>
|
</Border>
|
</Grid>
|
<!--#endregion-->
|
|
<!--#region 实验方法 -->
|
<Grid Grid.Column="1">
|
<Border Background="White" CornerRadius="10" Margin="0,0,10,0">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<TextBlock Grid.Row="0" Text="{x:Static str:Resources.strWorkflow}" VerticalAlignment="Center" Margin="20 0 0 0"
|
FontSize="20" FontWeight="Black"/>
|
<TextBlock Grid.Row="0" x:Name="tbSelectCount" Text="" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 15 5" Visibility="Collapsed"/>
|
|
<TreeView x:Name="treeviewWorkflow" Grid.Row="1" Margin="10 0 10 0" Background="White"
|
ItemContainerStyle="{DynamicResource TreeViewItemStyle1}" ItemTemplate="{DynamicResource treeviewTemplate}"
|
BorderThickness="0" AllowDrop="True"
|
Drop="treeviewWorkflow_Drop" ContextMenu="{DynamicResource workflowMenu}"
|
PreviewMouseMove="treeviewWorkflow_PreviewMouseMove"
|
PreviewMouseDown="treeviewWorkflow_PreviewMouseDown"
|
QueryContinueDrag="DoQueryContinueDrag"
|
PreviewDragOver="treeviewWorkflow_PreviewDragOver"
|
SelectedItemChanged="treeviewWorkflow_SelectedItemChanged"
|
PreviewMouseRightButtonDown="treeviewWorkflow_PreviewMouseRightButtonDown"
|
ctrls:TreeViewExtensions.EnableMultiSelect="true" ctrls:TreeViewExtensions.SelectedItems="{Binding SelectedItemList}"
|
>
|
</TreeView>
|
</Grid>
|
</Border>
|
</Grid>
|
<!--#endregion-->
|
|
<!--#region 耗材选择 -->
|
<Grid Grid.Column="2" x:Name="grid2">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="auto"/>
|
<RowDefinition Height="*" x:Name="gridRowConsumable"/>
|
<RowDefinition Height="auto" x:Name="gridRowDef"/>
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0">
|
<Border x:Name="borderConsumable" Background="White" CornerRadius="10" Margin="0,0,0,10" >
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<!--耗材选择-->
|
<TextBlock Grid.Row="0" Text="{x:Static str:Resources.strConsumableSelect}" VerticalAlignment="Center" Margin="20 0 0 0"
|
FontSize="20" FontWeight="Black"/>
|
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Name="pnlLabware">
|
<TextBlock Text="{x:Static str:Resources.strType}" FontSize="16" Margin="20 0 0 0" VerticalAlignment="Center"/>
|
<ComboBox x:Name="cbLabwareType" Height="30" BorderThickness="0" Background="#FFF7F8FA"
|
DisplayMemberPath="labwaretype_name" SelectedValuePath="labwaretype_id" IsEditable="False"
|
SelectionChanged="cbLabwareType_SelectionChanged" Margin="5 0 0 0" MaxWidth="150"
|
Width="{Binding Converter={StaticResource percentageConverter}, ElementName=pnlLabware, Path=ActualWidth, ConverterParameter=0.25}"/>
|
|
<ctrls:SearchTextBox x:Name="searchLabware" Grid.Row="1" Background="#FFF7F8FA" Watermark="{x:Static str:Resources.strInputSearch}"
|
VerticalAlignment="Center" Margin="10 0 0 0" FontSize="14" VerticalContentAlignment="Center" Height="30"
|
Width="{Binding Converter={StaticResource percentageConverter}, ElementName=pnlLabware, Path=ActualWidth, ConverterParameter=0.53}"
|
PreviewKeyDown="searchLabware_PreviewKeyDown"
|
clearEvent="searchLabware_clearEvent"/>
|
</StackPanel>
|
|
<!--耗材一览-->
|
<ListView x:Name="listviewConsumable" Grid.Row="2" Margin="10 0 10 10"
|
ItemsPanel="{DynamicResource NormalItemsPanel}" Background="#FFF7F8FA"
|
ItemContainerStyle="{DynamicResource ConsumableListViewItemStyle}" ItemTemplate="{DynamicResource ConsumableListViewItemDataTemplate1}"
|
BorderThickness="0" ScrollViewer.VerticalScrollBarVisibility="Auto"
|
PreviewMouseDown="listviewConsumable_PreviewMouseDown" PreviewMouseMove="listviewConsumable_PreviewMouseMove"
|
QueryContinueDrag="DoQueryContinueDrag" Height="200"/>
|
</Grid>
|
</Border>
|
</Grid>
|
|
<Grid Grid.Row="1">
|
<Border x:Name="borderTableOuter" Background="White" CornerRadius="10" BorderThickness="0" HorizontalAlignment="Stretch">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Text="{x:Static str:Resources.strTableLayout}" VerticalAlignment="Center" Margin="20 0 0 0"
|
FontSize="20" FontWeight="Black"/>
|
<Button Grid.Row="0" x:Name="btnResetTable" Content="重置台面" Style="{DynamicResource LinkButton}" FontSize="18"
|
VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0 10 20 0" Click="btnResetTable_Click"
|
Foreground="{DynamicResource blueBrush}"/>
|
|
<!--Background="#FFF7F8FA"-->
|
<Border x:Name="borderTable" Grid.Row="1" CornerRadius="0" VerticalAlignment="Top" Background="#FFF7F8FA">
|
<Grid>
|
<!--台面布置格子-->
|
<!--<Grid x:Name="gridTable" Margin="5 10" Width="{Binding Converter={StaticResource percentageConverter}, ElementName=borderTable, Path=ActualWidth, ConverterParameter=0.9}"
|
MinHeight="200"/>-->
|
<Grid x:Name="gridTable" Margin="20 10" MinHeight="300" Loaded="gridTable_Loaded"/>
|
<Image x:Name="imgdish" Margin="0 10 20 0" HorizontalAlignment="Right" VerticalAlignment="Top" Source="/Assets/dish.png" Stretch="Fill" />
|
<Image x:Name="imgdish1" Margin="0 10 20 0" HorizontalAlignment="Right" VerticalAlignment="Top" Source="/Assets/dish1.png" Stretch="Fill" Visibility="Collapsed"/>
|
</Grid>
|
</Border>
|
</Grid>
|
</Border>
|
</Grid>
|
|
<Grid Grid.Row="2" >
|
<Border x:Name="borderProperty" Background="White" CornerRadius="10" Visibility="Collapsed" Margin="0 10 0 0">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*" />
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Text="{x:Static str:Resources.strCmdProperty}" VerticalAlignment="Center" Margin="20 0 0 0"
|
FontSize="20" FontWeight="Black"/>
|
|
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
|
<Grid x:Name="gridProperty" Margin="10 10" Width="700"/>
|
</ScrollViewer>
|
|
</Grid>
|
</Border>
|
</Grid>
|
</Grid>
|
<!--#endregion-->
|
</Grid>
|
</UserControl>
|