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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<UserControl x:Class="XHandler.View.MethodProperty.GripTransportProperty"
             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.MethodProperty"
             xmlns:localM="clr-namespace:XHandler.View.MethodProperty"
             xmlns:str="clr-namespace:XHandler.Properties"
             xmlns:ctrls="clr-namespace:XHandler.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="950" d:DesignWidth="800"
             Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="80"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strCommandTag}" FontSize="16"
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strCommandName}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static str:Resources.strArm}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static str:Resources.strConsumableFrom}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="4" Grid.Column="0" Text="{x:Static str:Resources.strGripperAt}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="5" Grid.Column="0" Text="{x:Static str:Resources.strPickPos}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="6" Grid.Column="0" Text="{x:Static str:Resources.strGripperAt}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="7" Grid.Column="0" Text="{x:Static str:Resources.strPlacePos}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
        <TextBlock Grid.Row="8" Grid.Column="0" Text="{x:Static str:Resources.strOtherSetting}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0" FontWeight="Bold"/>
 
        <TextBox Grid.Row="0" Grid.Column="1" x:Name="tbxCommandLabel" Height="30" FontSize="16" VerticalContentAlignment="Center" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                 Text="{Binding label, Mode=TwoWay}" IsEnabled="False"/>
        <!--<TextBox Grid.Row="1" Grid.Column="1" x:Name="tbxCommandName" Height="30" FontSize="16" VerticalContentAlignment="Center" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                 Text="{Binding name}" TextChanged="tbxCommandName_TextChanged"/>-->
        <TextBox x:Name="tbxCommandName" Grid.Row="1" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
                     BorderThickness="0" TextChanged="tbxCommandName_TextChanged">
            <TextBox.Text>
                <Binding Path="name" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                    <Binding.ValidationRules>
                        <localM:MethodPropertyValidationRule  ValidateType="1,6@[200]"/>
                    </Binding.ValidationRules>
                </Binding>
            </TextBox.Text>
        </TextBox>
        <TextBlock Grid.Row="1" Grid.Column="2" x:Name="cnError" Text="{Binding  ElementName=tbxCommandName,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5 5 5 0"/>
 
        <ComboBox x:Name="cbArm"  Grid.Row="2" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                  DisplayMemberPath="device_arm_name" SelectedValuePath="device_arm_id" SelectionChanged="cbArm_SelectionChanged" IsEditable="False"/>
        
        <!--耗材从-->
        <ComboBox x:Name="cbSourceLattice" Grid.Row="3" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}" 
                  DisplayMemberPath="position_name" SelectedValuePath="position_id" SelectionChanged="cbSourceLattice_SelectionChanged" IsEditable="False"/>
        <TextBlock Grid.Row="3" Grid.Column="2" Text="{x:Static str:Resources.strTransportTo}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Center" />
        
        <!--耗材到-->
        <ComboBox x:Name="cbDestinationLattice" Grid.Row="3" Grid.Column="3" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                  DisplayMemberPath="position_name" SelectedValuePath="position_id" SelectionChanged="cbDestinationLattice_SelectionChanged" IsEditable="False"/>
        
        <ComboBox x:Name="cbGripModel" Grid.Row="4" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                  DisplayMemberPath="model_name" SelectedValuePath="model_id" SelectionChanged="cbGripModel_SelectionChanged" IsEditable="False"/>
        <TextBlock Grid.Row="4" Grid.Column="2" Text="{x:Static str:Resources.strGripBoard}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Center" />
        <ComboBox x:Name="cbGripPickObject" Grid.Row="4" Grid.Column="3" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                  DisplayMemberPath="labware_name" SelectedValuePath="labware_id" Width="120" HorizontalAlignment="Left" 
                  SelectionChanged="cbGripPickObject_SelectionChanged" IsEditable="False"/>
        
        <TextBlock Grid.Row="4" Grid.Column="3" Text="{x:Static str:Resources.strGripPickObject}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="130,0,0,0"/>
        <ComboBox x:Name="cbGripModelPos" Grid.Row="4" Grid.Column="3" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                  DisplayMemberPath="model_name" SelectedValuePath="model_id" Width="80" HorizontalAlignment="Left" Margin="170,0,0,0" SelectionChanged="cbGripModelPos_SelectionChanged" IsEditable="False"/>
        <Grid x:Name="gdPickSet" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="210"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Orientation="Horizontal">
                <RadioButton x:Name="radioBtnBoard" Content="{x:Static str:Resources.strPickBorad}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnBoard_Checked"/>
                <RadioButton x:Name="radioBtnRow"  Content="{x:Static str:Resources.strPickRow}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnRow_Checked"/>
                <RadioButton x:Name="radioBtnColumn" Content="{x:Static str:Resources.strPickColumn}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnColumn_Checked"/>
                <RadioButton x:Name="radioBtnWell" Content="{x:Static str:Resources.strPickWell}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnWell_Checked"/>
            </StackPanel>
            <ctrls:WellPlate x:Name="PickwellPlate" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0 5"
                             Selection="{Binding wellarray, Mode=TwoWay}" MouseLeftButtonDown="PickwellPlate_MouseLeftButtonDown"/>
        </Grid>
        
        <ComboBox x:Name="cbGripModelSet" Grid.Row="6" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                  DisplayMemberPath="model_name" SelectedValuePath="model_id" SelectionChanged="cbGripModelSet_SelectionChanged" IsEditable="False"/>
        <TextBlock Grid.Row="6" Grid.Column="2" Text="放" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Center" />
        <ComboBox x:Name="cbGripPlaceObject" Grid.Row="6" Grid.Column="3" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
                  DisplayMemberPath="labware_name" SelectedValuePath="labware_id" Width="120" HorizontalAlignment="Left" 
                  SelectionChanged="cbGripPlaceObject_SelectionChanged" IsEditable="False"/>
        <TextBlock Grid.Row="6" Grid.Column="3" Text="上" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="130,0,0,0"/>
 
        <Grid x:Name="gdPlaceSet" Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="210"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Orientation="Horizontal">
                <RadioButton x:Name="radioBtnPlaceBoard" Content="{x:Static str:Resources.strPlaceBorad}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnPlaceBoard_Checked"/>
                <RadioButton x:Name="radioBtnPlaceRow"  Content="{x:Static str:Resources.strPlaceRow}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnPlaceRow_Checked"/>
                <RadioButton x:Name="radioBtnPlaceColumn" Content="{x:Static str:Resources.strPlaceColumn}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnPlaceColumn_Checked"/>
                <RadioButton x:Name="radioBtnPlaceWell" Content="{x:Static str:Resources.strPlaceWell}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnPlaceWell_Checked"/>
            </StackPanel>
            <ctrls:WellPlate x:Name="PlacewellPlate" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0 5"
                             Selection="{Binding wellarray, Mode=TwoWay}" MouseLeftButtonDown="PlacewellPlate_MouseLeftButtonDown"/>
        </Grid>
 
        <RadioButton x:Name="rbAll" Grid.Row="8" Grid.Column="1" Content="{x:Static str:Resources.strTransportAll}" FontSize="16" GroupName="group"
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 15 0" Checked="rbAll_Checked"/>
        <RadioButton x:Name="rbExceptOne" Grid.Row="9" Grid.Column="1" Content="{x:Static str:Resources.strTransportExceptLast}" FontSize="16" GroupName="group"
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 15 0" Checked="rbExceptOne_Checked"/>
        <StackPanel Grid.Row="10" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Horizontal">
            <RadioButton x:Name="rbCount" Content="{x:Static str:Resources.strOnlyTransportTop}" FontSize="16" GroupName="group"
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0" Checked="rbCount_Checked"/>
            <!--<TextBox x:Name="tbxlevel" Height="30" Width="120" FontSize="16" VerticalContentAlignment="Center" HorizontalAlignment="Right"
                  BorderThickness="0" Background="{DynamicResource lightGrayBrush}" Margin="20 0" Text="{Binding transportCount, Mode=TwoWay}" TextChanged="tbxlevel_TextChanged"/>-->
            <TextBox x:Name="tbxlevel" Height="30" Width="120" FontSize="16" VerticalContentAlignment="Center" HorizontalAlignment="Right" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" TextChanged="tbxlevel_TextChanged">
                <TextBox.Text>
                    <Binding Path="transportCount" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <localM:MethodPropertyValidationRule  ValidateType="1,6@[200]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>            
 
            <TextBlock Text="{x:Static str:Resources.strLevelConsumable}" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0"/>
 
            <TextBlock Grid.Row="1" Grid.Column="3" x:Name="xlError" Text="{Binding  ElementName=tbxlevel,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 5 5 0"/>
        </StackPanel>
    </Grid>
</UserControl>