| | |
| | | mc:Ignorable="d" |
| | | xmlns:pw="https://opensource.panuon.com/wpf" |
| | | xmlns:pu="https://opensource.panuon.com/wpf-ui" |
| | | xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI" |
| | | x:Name="uc" |
| | | Padding="5" |
| | | MouseDoubleClick="UserControl_MouseDoubleClick" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | <UserControl.Resources> |
| | |
| | | |
| | | <UserControl.ContextMenu> |
| | | <ContextMenu> |
| | | <MenuItem IsCheckable="True" IsChecked="{Binding CellIsDisabled,Mode=TwoWay}" Header="禁用"/> |
| | | <!--<MenuItem IsCheckable="True" IsChecked="{Binding CellIsDisabled,Mode=TwoWay}" Header="禁用"/>--> |
| | | <MenuItem IsCheckable="False" x:Name="clearSNRItem" Click="MenuItem_Click" Header="{DynamicResource Tr.ClearSNR}"/> |
| | | <MenuItem IsCheckable="False" x:Name="exportCSVItem" Click="MenuItem_Click" Header="{DynamicResource App.ExportCSV}"/> |
| | | </ContextMenu> |
| | | </UserControl.ContextMenu> |
| | | |
| | |
| | | <DataTrigger Binding="{Binding status}" Value="hadCode"> |
| | | <Setter Property="Background" Value="#FFF"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding status}" Value="abort"> |
| | | <Setter Property="Background" Value="Black"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </UserControl.Style> |
| | | <Grid> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition Height="18"/> |
| | | </Grid.RowDefinitions> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition/> |
| | | <ColumnDefinition/> |
| | | <ColumnDefinition Width="Auto"/> |
| | | </Grid.ColumnDefinitions> |
| | | <!--<TextBox Grid.Row="0" IsReadOnly="True" TextAlignment="Center" Margin="0,0,0,3" FontSize="15" |
| | | Background="Transparent" BorderThickness="0" Text="{Binding title}"/>--> |
| | | <Label Grid.Column="0" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Padding="0" Margin="0" |
| | | FontSize="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=UserControl}, |
| | | Converter={StaticResource FontSizeConverter}, ConverterParameter='15,103'}" |
| | | FontWeight="Bold" |
| | | Background="Transparent" BorderThickness="0" Content="{Binding title}"/> |
| | | <Image Grid.Column="1"> |
| | | <StackPanel Orientation="Horizontal" Background="LightGray" Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Right"> |
| | | <TextBlock Foreground="Red" Text="{DynamicResource Ts.ProbeAlarm}"> |
| | | <TextBlock.Style> |
| | | <Style TargetType="TextBlock"> |
| | | <Setter Property="Visibility" Value="Collapsed"/> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding probeAlarm}" Value="True"> |
| | | <Setter Property="Visibility" Value="Visible"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </TextBlock.Style> |
| | | </TextBlock> |
| | | <TextBlock Margin="0"> |
| | | <Run Text="{Binding ProbeCount}"/> |
| | | <Run Text="/"/> |
| | | <Run Text="{Binding ProbeWarn}"/> |
| | | </TextBlock> |
| | | </StackPanel> |
| | | <Label Grid.Row="0" Grid.Column="0" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Padding="0" Margin="5,5,0,0" |
| | | FontSize="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=UserControl}, |
| | | Converter={StaticResource FontSizeConverter}, ConverterParameter='8,103'}" |
| | | FontWeight="Bold" |
| | | Background="Transparent" BorderThickness="0" Content="{Binding title}"> |
| | | <Label.Style> |
| | | <Style TargetType="Label"> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding status}" Value="abort"> |
| | | <Setter Property="Foreground" Value="#FFF"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </Label.Style> |
| | | </Label> |
| | | <ui:ScrollLabel Grid.Row="1" Grid.Column="0" Margin="3,0,0,5" Padding="0" Value="{Binding sn}"/> |
| | | |
| | | <Image Grid.Row="0" Grid.Column="1" Width="30" HorizontalAlignment="Right" Height="30" Margin="0,5,5,0"> |
| | | <Image.Style> |
| | | <Style TargetType="Image"> |
| | | <Setter Property="HorizontalAlignment" Value="Center"/> |
| | | <Setter Property="VerticalAlignment" Value="Bottom"/> |
| | | <Setter Property="VerticalAlignment" Value="Top"/> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding status}" Value="ok"> |
| | | <Setter Property="Source" Value="Resource/ok2.png"/> |
| | |
| | | <DataTrigger Binding="{Binding status}" Value="hadCode"> |
| | | <Setter Property="Source" Value="Resource/barcode.png"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding status}" Value="abort"> |
| | | <Setter Property="Source" Value="Resource/abort.png"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </Image.Style> |