alielie
2025-11-25 006c98e5650b530e5220f279c1e803fefe69d40d
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
<UserControl x:Class="Plugin.CurrentSensorControl.BurnInOven"
             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.CurrentSensorControl"
             mc:Ignorable="d" 
             
             xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
            xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
            xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI"
            xmlns:mdi="clr-namespace:HMI.UI.MDI;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"
            d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Style x:Key="ovenTb" TargetType="TextBox" BasedOn="{StaticResource EditorTextBoxStyle}">
            <Setter Property="Height" Value="20"/>
            <Setter Property="MinWidth" Value="60"/>
            <Setter Property="FontSize" Value="14"/>
        </Style>
    </UserControl.Resources>
 
    <GroupBox Header="{Binding Header}" Background="#FFF" >
        <Grid dp:GridHelper.Space="5" dp:GridHelper.SpaceIgnore="ALL">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="5">
                <pu:FormGroup Header="状态">
                    <TextBox Style="{StaticResource ovenTb}" IsReadOnly="True" Text="{Binding ReqStatus}"/>
                </pu:FormGroup>
 
                <pu:Switch CheckedContent="照明开" x:Name="lightSw" 
                           CheckedBackground="Green"
                           Background="{StaticResource DangerColor}"
                           IsChecked="{Binding LightStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" 
                           Content="照明关"/>
 
                <Button Background="{StaticResource PrimaryColor}" Foreground="{StaticResource PrimaryColorContract}"
                        Click="Button_Click"
                        Tag="0"
                        Content="停止等待"/>
                <Button Background="{StaticResource DangerColor}" Foreground="{StaticResource DangerColorContrast}" 
                        Click="Button_Click"
                        Tag="1"
                        Content="加热启动"/>
                <Button Background="{StaticResource SuccessColor}" Foreground="{StaticResource SuccessColorContrast}" 
                        Click="Button_Click"
                        Tag="2"
                        Content="冷却启动"/>
            </StackPanel>
 
            <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="5">
                <pu:FormGroup Header="设定温度">
                    <TextBox Style="{StaticResource ovenTb}" IsReadOnly="True" Text="{Binding SetTemp}"/>
                </pu:FormGroup>
                <pu:FormGroup Header="安全温度">
                    <TextBox Style="{StaticResource ovenTb}" IsReadOnly="True" Text="{Binding SaveTemp}"/>
                </pu:FormGroup>
                <pu:FormGroup Header="温度下限">
                    <TextBox Style="{StaticResource ovenTb}" IsReadOnly="True" Text="{Binding TempDown}"/>
                </pu:FormGroup>
                <pu:FormGroup Header="温度上限">
                    <TextBox Style="{StaticResource ovenTb}" IsReadOnly="True" Text="{Binding TempUp}"/>
                </pu:FormGroup>
                <pu:FormGroup Header="平均温度">
                    <TextBox Style="{StaticResource ovenTb}" IsReadOnly="True" Text="{Binding AvgTemp}"/>
                </pu:FormGroup>
            </StackPanel>
 
            <UniformGrid Grid.Row="2" Grid.Column="0" x:Name="mainGrid"></UniformGrid>
        </Grid>
    </GroupBox>
</UserControl>