alielie
2025-11-21 3a471ae651b228231bebb3a2d438baa1d4ac0261
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<UserControl x:Class="Plugin.JarUI.JarCell"
             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:Plugin.JarUI"
             mc:Ignorable="d"
             xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
            xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
            xmlns:pw="https://opensource.panuon.com/wpf"
            xmlns:pu="https://opensource.panuon.com/wpf-ui"
            xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
             Padding="10"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Brush x:Key="passedColor">#beed00</Brush>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
 
        <pu:FormGroup Orientation="Vertical" HeaderHeight="Auto" HeaderPadding="0">
            <pu:FormGroup.Header>
                <TextBlock Foreground="#000" Text="{Binding SnText}"/>
            </pu:FormGroup.Header>
            <TextBox x:Name="TbSn" Style="{StaticResource EditorTextBoxStyle}" />
        </pu:FormGroup>
 
        <pu:FormGroup Grid.Row="1" Orientation="Vertical" HeaderHeight="Auto" HeaderPadding="0">
            <pu:FormGroup.Header>
                <TextBlock Foreground="#000" Text="{DynamicResource App.Status}"/>
            </pu:FormGroup.Header>
            <Label Margin="0" Padding="0,10" 
       HorizontalContentAlignment="Center" 
       VerticalContentAlignment="Center">
                <Label.Style>
                    <Style TargetType="Label">
                        <Setter Property="Content" Value="{Binding Status}"/>
                        <Setter Property="FontSize" Value="30"/>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Status}" Value="Ready">
                                <Setter Property="Background" Value="DeepSkyBlue"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="Passed">
                                <Setter Property="Background" Value="{StaticResource passedColor}"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="Failed">
                                <Setter Property="Background" Value="{StaticResource DangerColor}"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="Testing">
                                <Setter Property="Background" Value="Gold"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Label.Style>
            </Label>
        </pu:FormGroup>
 
        <pu:FormGroup Grid.Row="2" Orientation="Vertical" HeaderHeight="Auto" HeaderPadding="0">
            <pu:FormGroup.Header>
                <TextBlock Foreground="#000" Text="{DynamicResource App.Info}"/>
            </pu:FormGroup.Header>
            <Label Margin="0" Padding="0,10" 
HorizontalContentAlignment="Center" 
VerticalContentAlignment="Center">
                <Label.Style>
                    <Style TargetType="Label">
                        <Setter Property="Content" Value="{Binding Info}"/>
                        <Setter Property="FontSize" Value="30"/>
                        <Setter Property="Background" Value="#e8e8e8"/>
                    </Style>
                </Label.Style>
            </Label>
        </pu:FormGroup>
 
    </Grid>
</UserControl>