| | |
| | | FontSize="{Binding ActualHeight,RelativeSource={RelativeSource AncestorType=UserControl}, |
| | | Converter={StaticResource hfc}, ConverterParameter='12,816'}" |
| | | x:Name="control" |
| | | SizeChanged="control_SizeChanged" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | <UserControl.Resources> |
| | | <ResourceDictionary> |
| | |
| | | <Setter Property="VerticalContentAlignment" Value="Center"/> |
| | | <Setter Property="Padding" Value="5"/> |
| | | <Setter Property="FontSize" Value="{Binding ActualWidth,ElementName=control, |
| | | Converter={StaticResource fc}, ConverterParameter='20,1093,20'}"/> |
| | | Converter={StaticResource fc}, ConverterParameter='25,1093'}"/> |
| | | </Style> |
| | | <Style TargetType="TextBlock" x:Key="baseText"> |
| | | <Setter Property="HorizontalAlignment" Value="Left"/> |
| | | <Setter Property="VerticalAlignment" Value="Center"/> |
| | | <Setter Property="Padding" Value="0,0,2,0"/> |
| | | <Setter Property="FontSize" Value="{Binding ActualWidth,ElementName=control, |
| | | Converter={StaticResource fc}, ConverterParameter='20,1093,20'}"/> |
| | | Converter={StaticResource fc}, ConverterParameter='25,1093'}"/> |
| | | </Style> |
| | | <Brush x:Key="passedColor">#beed00</Brush> |
| | | </ResourceDictionary> |
| | |
| | | <RowDefinition Height="Auto"/> |
| | | </Grid.RowDefinitions> |
| | | |
| | | <Grid dp:GridHelper.InnerBorder="1" dp:GridHelper.Space="5" |
| | | dp:GridHelper.InnerBorderBrush="{StaticResource CommonBoarder}"> |
| | | <Grid dp:GridHelper.InnerBorder="1" dp:GridHelper.Space="2" x:Name="tableHeader" |
| | | dp:GridHelper.InnerBorderBrush="{DynamicResource CommonBoarder}"> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition/> |
| | | <RowDefinition/> |
| | | </Grid.RowDefinitions> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="Auto"/> |
| | | <ColumnDefinition/> |
| | | <ColumnDefinition /> |
| | | <ColumnDefinition Width="Auto"/> |
| | | </Grid.ColumnDefinitions> |
| | | <StackPanel Grid.RowSpan="3"> |
| | | <StackPanel.Style> |
| | | <Style TargetType="StackPanel"> |
| | | <Setter Property="Background" Value="DeepSkyBlue"/> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding Status}" Value="Passed"> |
| | | <Setter Property="Background" Value="{StaticResource passedColor}"/> |
| | |
| | | <Setter Property="Background" Value="Gold"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Status}" Value="Failed"> |
| | | <Setter Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Status}" Value="Failed"> |
| | | <Setter Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Status}" Value="Ready"> |
| | | <Setter Property="Background" Value="DeepSkyBlue"/> |
| | |
| | | <Label> |
| | | <Label.Style> |
| | | <Style TargetType="Label"> |
| | | <Setter Property="VerticalAlignment" Value="Center"/> |
| | | <Setter Property="Padding" Value="10,10,10,0"/> |
| | | <Setter Property="Margin" Value="0"/> |
| | | <Setter Property="FontFamily" Value="{StaticResource iconfont}"/> |
| | |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Status}" Value="Failed"> |
| | | <Setter Property="Content" Value=""/> |
| | | <Setter Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Status}" Value="Failed"> |
| | | <Setter Property="Content" Value=""/> |
| | | <Setter Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Status}" Value="Ready"> |
| | | <Setter Property="Content" Value=""/> |
| | |
| | | </Label.Style> |
| | | </Label> |
| | | |
| | | <Label Content="{Binding Status}" VerticalContentAlignment="Center" |
| | | Padding="0" |
| | | Margin="0" |
| | | <Label Content="{Binding Status}" VerticalAlignment="Center" VerticalContentAlignment="Center" |
| | | Padding="0" Margin="0" |
| | | HorizontalContentAlignment="Center" |
| | | Foreground="#FFF" |
| | | FontWeight="Bold" |
| | |
| | | |
| | | <!--<Label HorizontalContentAlignment="Left" Grid.Column="1" Content="{Binding Status}"/>--> |
| | | |
| | | <Label Style="{StaticResource baseLabel}" Background="#FFF" Grid.Row="1" Grid.Column="1"> |
| | | <Label Style="{StaticResource baseLabel}" Background="#FFF" Grid.Row="0" Grid.Column="1"> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <TextBlock Style="{StaticResource baseText}" Text="{DynamicResource Ts.Total}"/> |
| | | <TextBlock Style="{StaticResource baseText}" Margin="2,0,18,0" Text="{Binding TotalNum}"/> |
| | |
| | | </StackPanel> |
| | | </Label> |
| | | |
| | | <Label Style="{StaticResource baseLabel}" Background="#FFF" Grid.Row="2" Grid.Column="1"> |
| | | <Label Style="{StaticResource baseLabel}" Background="#FFF" Grid.Row="1" Grid.Column="1"> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <Label Style="{StaticResource baseLabel}" Content="{DynamicResource Ts.CurrentSnr}"/> |
| | | <Label Style="{StaticResource baseLabel}" Margin="2,0,18,0" Content="{Binding Barcode}"/> |
| | |
| | | <Label Style="{StaticResource baseLabel}" Margin="2,0,18,0" Content="{Binding ElapseTime}"/> |
| | | </StackPanel> |
| | | </Label> |
| | | <Border x:Name="screenContainer" BorderThickness="0" Grid.Column="2" Grid.RowSpan="2" MouseLeftButtonDown="screenContainer_MouseLeftButtonDown"> |
| | | |
| | | </Border> |
| | | </Grid> |
| | | |
| | | <Grid Grid.Row="2" x:Name="simplePanel" dp:GridHelper.Space="5" dp:GridHelper.SpaceIgnore="TOP"> |
| | | <Grid Grid.Row="2" x:Name="simplePanel" dp:GridHelper.Space="2" dp:GridHelper.SpaceIgnore="TOP"> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition/> |
| | | <RowDefinition Height="Auto"/> |
| | |
| | | <Setter Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Status}" Value="Failed"> |
| | | <Setter Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | <Setter Property="Content" Value="--FAIL--"/> |
| | | <Setter Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | |
| | | <Setter TargetName="text" Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Result}" Value="Failed"> |
| | | <Setter TargetName="border" Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <Setter TargetName="border" Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | <Setter TargetName="text" Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | | </DataTemplate.Triggers> |
| | |
| | | </ListView.View> |
| | | </ListView>--> |
| | | |
| | | <DataGrid Grid.Row="0" Style="{StaticResource DefaultDataGrid}" |
| | | Margin="5,0,5,5" |
| | | pu:DataGridHelper.ColumnHeaderFontWeight="Normal" |
| | | pu:DataGridHelper.ColumnHeaderFontSize="{Binding ActualWidth, |
| | | ElementName=control, |
| | | Converter={StaticResource fc}, ConverterParameter='11,1093,14'}" |
| | | FontSize="{Binding ActualWidth, |
| | | ElementName=control, |
| | | Converter={StaticResource fc}, ConverterParameter='11,1093,14'}" |
| | | pu:DataGridHelper.ColumnHeaderPadding="3" |
| | | |
| | | |
| | | <Canvas Grid.Row="0" x:Name="canvas" Background="Transparent"> |
| | | <DataGrid Canvas.Left="0" Canvas.Top="0" Height="{Binding ActualHeight,ElementName=canvas}" |
| | | Width="{Binding ActualWidth,ElementName=canvas}" |
| | | Style="{StaticResource DefaultDataGrid}" Margin="2,0,2,2" |
| | | FontSize="{DynamicResource tableFontSize}" |
| | | dp:DataGridHelper.ShowRowNumber="True" |
| | | VirtualizingPanel.IsContainerVirtualizable="True" |
| | | VirtualizingPanel.IsVirtualizing="True" |
| | |
| | | RowHeight="{StaticResource nanD}" |
| | | ColumnHeaderHeight="{Binding ActualWidth,ElementName=control, |
| | | Converter={StaticResource fc}, ConverterParameter='32,1093,30,45'}" |
| | | ItemsSource="{Binding Datasource}" |
| | | x:Name="table"> |
| | | <DataGrid.Resources> |
| | | <Style TargetType="DataGridCell" |
| | | BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridCellStyle}}"> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | <Setter Property="Padding" Value="2"/> |
| | | <Setter Property="BorderThickness" Value="0"/> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | </Style> |
| | | HorizontalScrollBarVisibility="Disabled" |
| | | ItemsSource="{Binding Datasource}" x:Name="table"> |
| | | |
| | | <Style TargetType="DataGridColumnHeader" |
| | | BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridColumnHeaderStyle}}"> |
| | | <Setter Property="Padding" Value="5"/> |
| | | <Setter Property="BorderThickness" Value="0"/> |
| | | </Style> |
| | | </DataGrid.Resources> |
| | | |
| | | <DataGrid.Columns> |
| | | <DataGridTextColumn Header="#" |
| | | ElementStyle="{StaticResource TableTextBlock}" |
| | | Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}" |
| | | Width="0.4*"/> |
| | | <DataGridTextColumn Width="2.5*" Binding="{Binding Name}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Name}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="0.8*" Binding="{Binding Unit}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Unit}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="2*" Binding="{Binding Value}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Value}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="1.5*" Binding="{Binding LimitDown}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.LimitDown}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="1.5*" Binding="{Binding LimitUp}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.LimitUp}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="0.6*" Binding="{Binding ConsumeTime}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.ConsumeTime}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTemplateColumn Width="1*"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Result}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Grid x:Name="border" Margin="0"> |
| | | <TextBlock x:Name="text" Margin="-1" Padding="0" VerticalAlignment="Center" Text="{Binding Result}"/> |
| | | </Grid> |
| | | <DataTemplate.Triggers> |
| | | <DataTrigger Binding="{Binding Result}" Value="Passed"> |
| | | <Setter TargetName="border" Property="Background" Value="{StaticResource passedColor}"/> |
| | | <Setter TargetName="text" Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Result}" Value="Failed"> |
| | | <Setter TargetName="border" Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <Setter TargetName="text" Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | | </DataTemplate.Triggers> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | <DataGrid.Columns> |
| | | <DataGridTextColumn Header="#" |
| | | ElementStyle="{StaticResource TableTextBlock}" |
| | | Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}" |
| | | Width="0.4*"/> |
| | | <DataGridTextColumn Width="2.5*" Binding="{Binding Name}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Name}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="0.8*" Binding="{Binding Unit}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Unit}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="2*" Binding="{Binding Value}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Value}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="1.5*" Binding="{Binding LimitDown}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.LimitDown}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="1.5*" Binding="{Binding LimitUp}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.LimitUp}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="0.6*" Binding="{Binding ConsumeTime}" |
| | | ElementStyle="{StaticResource TableTextBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.ConsumeTime}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTemplateColumn Width="1*"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource Test.Result}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Grid x:Name="border" Margin="0"> |
| | | <TextBlock x:Name="text" Margin="-1" Padding="0" VerticalAlignment="Center" Text="{Binding Result}"/> |
| | | </Grid> |
| | | <DataTemplate.Triggers> |
| | | <DataTrigger Binding="{Binding Result}" Value="Passed"> |
| | | <Setter TargetName="border" Property="Background" Value="{StaticResource passedColor}"/> |
| | | <Setter TargetName="text" Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Result}" Value="Failed"> |
| | | <Setter TargetName="border" Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | <Setter TargetName="text" Property="Foreground" Value="#000"/> |
| | | </DataTrigger> |
| | | </DataTemplate.Triggers> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | </Canvas> |
| | | |
| | | <Grid Grid.Row="1" Height="20" Margin="0"> |
| | | <ProgressBar Grid.Row="3" x:Name="testProcess" Value="{Binding ProcessValue}"/> |
| | |
| | | |
| | | <Grid Background="#f1eded" Grid.Row="2" Height="25"> |
| | | <DockPanel> |
| | | <Label Padding="0" FontSize="12" VerticalContentAlignment="Center" Content="{Binding CurrentStep}"/> |
| | | <Label Margin="10,0,0,0" Padding="0" FontSize="16" VerticalContentAlignment="Center" Content="{Binding SocketName}"/> |
| | | <Label Margin="20,0,0,0" Padding="0" FontSize="14" VerticalContentAlignment="Center" Content="{Binding CurrentStep}"/> |
| | | |
| | | <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" Margin="0,0,5,0"> |
| | | <!--<Button FontSize="12" x:Name="scannerSetting" |
| | | Margin="0,0,10,0" Click="Button_Click" Content="扫码枪设置"> |
| | | Margin="0,0,10,0" Click="Button_Click" Content="{DynamicResource App.ScannerSetting}"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource LinkButton}"> |
| | | <Style.Triggers> |
| | |
| | | <ColumnDefinition Width="Auto"/> |
| | | <ColumnDefinition /> |
| | | </Grid.ColumnDefinitions> |
| | | <Border Padding="10,5,0,5" Grid.ColumnSpan="2" Background="{StaticResource WarningColor}" |
| | | <Border Padding="10,5,0,5" Grid.ColumnSpan="2" Background="{DynamicResource WarningColor}" |
| | | CornerRadius="5,5,0,0"> |
| | | <Label Padding="0" Margin="0" Foreground="#FFF" Content="{DynamicResource App.Warn}"/> |
| | | </Border> |
| | |
| | | <Button Style="{StaticResource ModalButton}" |
| | | x:Name="continuePauseBtn" |
| | | Click="Button_Click" |
| | | Background="{StaticResource WarningColor}" |
| | | Background="{DynamicResource WarningColor}" |
| | | Tag="OK" Content="{DynamicResource App.Continue}"/> |
| | | </StackPanel> |
| | | </Grid> |
| | |
| | | <ColumnDefinition Width="Auto"/> |
| | | <ColumnDefinition /> |
| | | </Grid.ColumnDefinitions> |
| | | <Border Padding="10,5,0,5" Grid.ColumnSpan="2" Background="{StaticResource PrimaryColor}" |
| | | <Border Padding="10,5,0,5" Grid.ColumnSpan="2" Background="{DynamicResource PrimaryColor}" |
| | | CornerRadius="5,5,0,0"> |
| | | <Label Padding="0" Margin="0" Foreground="#FFF" Content="请扫码"/> |
| | | </Border> |