alielie
2025-11-24 9211ec11c112e18cd99e77f889a01110a70031ce
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
<pu:WindowX x:Class="HMI.ParameterManage.TestItemModal"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:local="clr-namespace:HMI.ParameterManage"
            xmlns:pw="https://opensource.panuon.com/wpf"
            xmlns:pu="https://opensource.panuon.com/wpf-ui"
            xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
            xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
            mc:Ignorable="d"
            Title="Form"
            SizeToContent="Height"
            Width="600"
            WindowStartupLocation="CenterOwner"
            BorderBrush="#3E3E45"
            BorderThickness="1"
            Foreground="Black"
            Style="{StaticResource ModalWindow}">
    <Grid Margin="10">
        <StackPanel x:Name="formPanel">
            <pu:FormGroup x:Name="FgName" Style="{StaticResource InputFormGroupStyle}" 
                          Header="{DynamicResource Pm.Ti.Name}" GroupName="MyFormGroup"
                          dp:FormGroupHelper.IsRequired="True"
                          dp:FormGroupHelper.ValidateMethod="ValidateName">
                <TextBox x:Name="TbName" Style="{StaticResource EditorTextBoxStyle}" />
            </pu:FormGroup>
 
            <pu:FormGroup x:Name="FgType" Style="{StaticResource InputFormGroupStyle}" 
                          Header="{DynamicResource Pm.Ti.Type}"
                          dp:FormGroupHelper.IsRequired="True" GroupName="MyFormGroup">
                <ComboBox x:Name="CbType" Style="{StaticResource FormComboxStyle}" SelectedValuePath="Content">
                    <ComboBoxItem>PassFail</ComboBoxItem>
                    <ComboBoxItem>Int</ComboBoxItem>
                    <ComboBoxItem>Double</ComboBoxItem>
                    <ComboBoxItem>String</ComboBoxItem>
                </ComboBox>
            </pu:FormGroup>
 
            <pu:FormGroup x:Name="FgEnable" Style="{StaticResource InputFormGroupStyle}" 
                  Header="{DynamicResource Pm.Ti.Shineng}" GroupName="MyFormGroup">
                <CheckBox x:Name="CoEnable" />
            </pu:FormGroup>
 
            <pu:FormGroup x:Name="FgLimitDown" Style="{StaticResource InputFormGroupStyle}" 
      Header="{DynamicResource Pm.Ti.LimitDown}" GroupName="MyFormGroup">
                <pu:NumberInput x:Name="NiLimitDown" Style="{StaticResource FormNumberInput}" />
            </pu:FormGroup>
 
            <pu:FormGroup x:Name="FgLimitUp" Style="{StaticResource InputFormGroupStyle}" 
Header="{DynamicResource Pm.Ti.LimitUp}" GroupName="MyFormGroup">
                <pu:NumberInput x:Name="NiLimitUp" Style="{StaticResource FormNumberInput}" />
            </pu:FormGroup>
 
            <pu:FormGroup x:Name="FgStrValue" Style="{StaticResource InputFormGroupStyle}" 
Header="{DynamicResource Pm.Ti.StrValue}" GroupName="MyFormGroup">
                <TextBox x:Name="TbStrValue" Style="{StaticResource EditorTextBoxStyle}" />
            </pu:FormGroup>
 
            <pu:FormGroup x:Name="FgOffset" Style="{StaticResource InputFormGroupStyle}" 
Header="{DynamicResource Pm.Ti.Offset}" GroupName="MyFormGroup">
                <pu:NumberInput x:Name="NiOffset" Style="{StaticResource FormNumberInput}" />
            </pu:FormGroup>
 
            <pu:FormGroup x:Name="FgSource" Style="{StaticResource InputFormGroupStyle}" 
Header="{DynamicResource Pm.Ti.Source}" GroupName="MyFormGroup">
                <ComboBox x:Name="CbSource" SelectedValuePath="Content" Style="{StaticResource FormComboxStyle}" />
            </pu:FormGroup>
        </StackPanel>
    </Grid>
</pu:WindowX>