schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<Window x:Class="XHandler.View.Device.DeviceMethodParametersAdd"
        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:XHandler.View"
        xmlns:str="clr-namespace:XHandler.Properties"
        xmlns:ctrls="clr-namespace:XHandler.Controls"
        mc:Ignorable="d" WindowStartupLocation = "CenterOwner"
        Width="450" Height="560" WindowStyle="None" AllowsTransparency="True" ResizeMode="NoResize" Background="#00FFFFFF"
        Loaded="Window_Loaded" PreviewKeyDown="Window_PreviewKeyDown">
 
    <Grid MouseDown="Grid_MouseDown">
        <Border Background="{DynamicResource blueBrush}" CornerRadius="10 10 10 10" BorderThickness="2" BorderBrush="{DynamicResource blueBrush}">
            <Grid Margin="1.5,0,1.5,1.5">
                <Grid.RowDefinitions>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="40"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" >
                    <Border Grid.Row="0" Background="{DynamicResource blueBrush}" CornerRadius="10 10 0 0" BorderThickness="0">
                        <Grid>
                            <!--title-->
                            <TextBlock Text="设备方法参数编辑" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="20 0" FontSize="20"
                                       Foreground="White" FontWeight="Bold"/>
                            <Button Content="×" x:Name="btnClose" HorizontalAlignment="Right" VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="10 0" FontSize="28" Width="40" Height="40"
                                    FontWeight="Bold" Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="{DynamicResource blueBrush}" Visibility="Visible" Click="btnClose_Click"/>
                        </Grid>
                    </Border>
                </Grid>
 
                <Grid Grid.Row="1" Background="White" x:Name="gdSetContent1" Height="520">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20"/>
                        <RowDefinition Height="45"/>
                        <RowDefinition Height="45"/>
                        <RowDefinition Height="45"/>
                        <RowDefinition Height="45"/>
                        <RowDefinition Height="45"/>
                        <RowDefinition Height="45"/>
                        <!--备注-->
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="45"/>
                        <RowDefinition Height="10"/>
                        <RowDefinition Height="60"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition Width="10"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
 
                    <!--数据类型-->
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="数据类型" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0"
                               FontSize="16"/>
                    <TextBlock Grid.Row="1" Grid.Column="1" Style="{DynamicResource MustTextStyle}" />
                    <ComboBox Grid.Row="1" Grid.Column="2" Name="cBoxDataType" Height="30" Width="180" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                              VerticalContentAlignment="Center" HorizontalAlignment="Left" DisplayMemberPath="dropdown_name" SelectedValuePath="dropdown_id" IsEditable="False" />
 
                    <!--类别-->
                    <TextBlock Grid.Row="2" Grid.Column="0" Text="类别" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0"
                               FontSize="16"/>
                    <TextBlock Grid.Row="2" Grid.Column="1" Style="{DynamicResource MustTextStyle}" />
                    <ComboBox Grid.Row="2" Grid.Column="2" Name="cBoxType" Height="30" Width="180" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                              VerticalContentAlignment="Center" HorizontalAlignment="Left" DisplayMemberPath="dropdown_name" SelectedValuePath="dropdown_id" IsEditable="False" />
 
                    <!--参数中文名称-->
                    <TextBlock Grid.Row="3" Grid.Column="0" Text="参数中文名称" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0"
                               FontSize="16"/>
                    <TextBlock Grid.Row="3" Grid.Column="1" Style="{DynamicResource MustTextStyle}" />
                    <TextBox Grid.Row="3" Grid.Column="2" Name="tBoxParameterChName" Height="30" Width="180" FontSize="16" VerticalContentAlignment="Center" HorizontalAlignment="Left"
                             Background="{DynamicResource lightGrayBrush}" BorderThickness="0"/>
 
                    <!--参数英文名称-->
                    <TextBlock Grid.Row="4" Grid.Column="0" Text="参数英文名称" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0"
                               FontSize="16"/>
                    <TextBlock Grid.Row="4" Grid.Column="1" Style="{DynamicResource MustTextStyle}" />
                    <TextBox Grid.Row="4" Grid.Column="2" Name="tBoxParameterEnName" Height="30" Width="180" FontSize="16" VerticalContentAlignment="Center" HorizontalAlignment="Left"
                             Background="{DynamicResource lightGrayBrush}" BorderThickness="0"/>
 
                    <!--参数值-->
                    <TextBlock Grid.Row="5" Grid.Column="0" Text="参数值" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0"
                               FontSize="16"/>
                    <!--<TextBlock Grid.Row="5" Grid.Column="1" Style="{DynamicResource MustTextStyle}" />-->
                    <TextBox Grid.Row="5" Grid.Column="2" Name="tBoxValue" Height="30" Width="180" FontSize="16" VerticalContentAlignment="Center" HorizontalAlignment="Left"
                             Background="{DynamicResource lightGrayBrush}" BorderThickness="0"/>
 
                    <!--排序-->
                    <TextBlock Grid.Row="6" Grid.Column="0" Text="排序" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0"
                               FontSize="16"/>
                    <TextBlock Grid.Row="6" Grid.Column="1" Style="{DynamicResource MustTextStyle}" />
                    <TextBox Grid.Row="6" Grid.Column="2" Name="tBoxSort" Height="30" Width="180" FontSize="16" VerticalContentAlignment="Center" HorizontalAlignment="Left"
                             Background="{DynamicResource lightGrayBrush}" BorderThickness="0" Text="0"/>
 
                    <!--备注-->
                    <TextBlock Grid.Row="7" Grid.Column="0" Text="备注" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0"
                               FontSize="16"/>
                    <TextBox Grid.Row="7" Grid.Column="2" x:Name="tBoxRemark" Height="80" Width="180" FontSize="16" VerticalContentAlignment="Top" HorizontalAlignment="Left"
                             TextWrapping="Wrap" Background="{DynamicResource lightGrayBrush}" BorderThickness="0" MaxLength="200" Margin="0,10,0,10"/>
 
                    <Rectangle Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="3" Height="1" Fill="Gray" VerticalAlignment="Bottom" Margin="15 0"/>
 
                    <Button Grid.Row="10" Grid.Column="2" x:Name="btnOk" Content="确定" Width="80" Height="40" VerticalContentAlignment="Center"
                            HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="16" Style="{DynamicResource BlueButtonStyle}" 
                            Background="{DynamicResource blueBrush}" Click="btnOk_Click" Margin="0,14,22,0"/>
                </Grid>
 
                <!--<Button Grid.Row="1" x:Name="btnCancel" Content="取消" Width="80" Height="40" VerticalContentAlignment="Center"
                    HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" Style="{DynamicResource BlueButtonStyle}" 
                    Background="{DynamicResource blueBrush}" Click="btnCancel_Click" Margin="450,500,0,0"/>-->
            </Grid>
        </Border>
    </Grid>
</Window>