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
<UserControl x:Class="XHandler.View.Liquids.NewLiquid"
             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.Liquids"
             xmlns:str="clr-namespace:XHandler.Properties"
             xmlns:ctrl="clr-namespace:XHandler.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             Style="{StaticResource UCStyle}"
             Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="450" Height="280">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border Grid.Row="0" Background="{DynamicResource blueBrush}" CornerRadius="10 10 0 0" BorderThickness="0">
                <Grid>
                    <TextBlock Text="{x:Static str:Resources.strNewLiquid}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="20 0" FontSize="20"
                               Foreground="White" FontWeight="Bold"/>
                    <Button Content="×" 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}" Click="Button_Click"/>
                </Grid>
            </Border>
            <Border Grid.Row="1" Background="White" CornerRadius="0 0 10 10" BorderThickness="0">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="90"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="100"/>
                        <!--<ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>-->
                    </Grid.ColumnDefinitions>
 
                    <TextBlock Text="{x:Static str:Resources.strLiquidName}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 0 0" FontSize="16"/>
                    <ctrl:PromptTextBox x:Name="textboxLabel" Grid.Row="0" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" 
                                        VerticalAlignment="Center" Margin="10 0 20 0" Background="{DynamicResource lightGrayBrush}" BorderThickness="0" BorderBrush="Red"
                                        Watermark="{x:Static str:Resources.strPleaseInput}" LostFocus="textboxLabel_LostFocus"/>
                    <TextBlock x:Name="tbTips" Grid.Row="0" Grid.Column="2" Height="30" FontSize="12" Foreground="Red" Text="" VerticalAlignment="Top"  HorizontalAlignment="Left"
                              />
                    
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strLiquidType}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 0 0" FontSize="16"/>
                    <ComboBox x:Name="cbLiquidType" Grid.Row="1" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}" Margin="10 0 20 0" VerticalAlignment="Center"
                              DisplayMemberPath="liquid_type_name" SelectedValuePath="liquid_type_id" IsEditable="False"/>
                    <Button x:Name="btnCustome" Grid.Row="1" Grid.Column="2" Content="{x:Static str:Resources.strCustom}" Style="{DynamicResource LinkButton}"
                            VerticalAlignment="Center" Click="btnCustome_Click"/>
 
                    <ctrl:PromptTextBox x:Name="textboxNewType" Grid.Row="1" Grid.Column="1" Watermark="{x:Static str:Resources.strPleaseInput}" FontSize="16" BorderBrush="Red"
                                        Height="30" VerticalContentAlignment="Center" Margin="10 0 20 0" Visibility="Collapsed" Background="{DynamicResource lightGrayBrush}"
                                        LostFocus="textboxNewType_LostFocus"/>
                    <ctrl:ImageButton x:Name="btnClear" Grid.Row="1" Grid.Column="2" NormalImage="pack://application:,,,./Assets/LiquidParam/关闭.png" ImageHeight="18" ImageWidth="18"
                                      Visibility="Collapsed" Click="btnClear_Click" Width="20" Height="20" HorizontalAlignment="Left"/>
 
                    <TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static str:Resources.strLiquidRange}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 0 0" FontSize="16"/>
                    <ComboBox x:Name="cbLiquidRange" Grid.Row="2" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}" Margin="10 0 20 0" VerticalAlignment="Center"
                              DisplayMemberPath="head_type" SelectedValuePath="device_arm_id" IsEditable="False"/>
 
                    <TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static str:Resources.strTipType}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 0 0" FontSize="16"/>
                    <ComboBox x:Name="cbTipType" Grid.Row="3" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}" Margin="10 0 20 0" VerticalAlignment="Center"
                              DisplayMemberPath="liquid_range_name" SelectedValuePath="liquid_range_id" IsEditable="False"/>
 
                    
                    <Button x:Name="btnOK" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Content="{x:Static str:Resources.btnOK}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="20 0" FontSize="16" Width="80" Height="40"
                            Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="{DynamicResource blueBrush}" Click="btnOK_Click"/>
 
                    <Button Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Content="{x:Static str:Resources.btnCancel}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 120 0" FontSize="16" Width="80" Height="40"
                            Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="LightGray" Click="Button_Click"/>
 
 
                </Grid>
            </Border>
        </Grid>
    </Grid>
</UserControl>