schangxiang@126.com
2025-11-04 ca398287db3f5ea01f03aac4a85edb13b28100a6
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
<UserControl x:Class="XHandler.View.ConsumableManagement"
             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:cons="clr-namespace:XHandler.View.Consumables"
             xmlns:ctrls="clr-namespace:XHandler.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <ContextMenu x:Key="consumableMenu" Width="200">
            <MenuItem Name="menuCopy" Header="{x:Static str:Resources.strCopy}" Click="menuCopy_Click"/>
            <MenuItem Name="menuPaste" Header="{x:Static str:Resources.strPaste}" IsEnabled="False" Click="menuPaste_Click"/>
            <!--<MenuItem Name="menuEdit" Header="{x:Static str:Resources.strEdit}" Click="menuEdit_Click"/>-->
            <MenuItem Name="menuDelete" Header="{x:Static str:Resources.strDelete}" Click="menuDelete_Click"/>
        </ContextMenu>
    </UserControl.Resources>
    
    <Grid>
        <Border Background="White" CornerRadius="0,10,10,0" Margin="0,0,10,0" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="3*"/>
                    <ColumnDefinition Width="7*"/>
                </Grid.ColumnDefinitions>
                <Border Grid.Row="0" Background="{DynamicResource lightGrayBrush}" CornerRadius="5" BorderThickness="0" Margin="0">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="4*"/>
                            <ColumnDefinition Width="6*"/>
                        </Grid.ColumnDefinitions>
 
                        <ComboBox x:Name="cbLabwareType" Grid.Row="0" Grid.Column="0" Height="30" Width="105" BorderThickness="0" Background="{DynamicResource middleGrayBrush}" 
                                  HorizontalAlignment="Left" Margin="10 0 0 0" DisplayMemberPath="labwaretype_name" SelectedValuePath="labwaretype_id" SelectionChanged="cbLabwareType_SelectionChanged" IsEditable="False"/>
 
                        <!--Watermark="{x:Static str:Resources.strInputSearch}"-->
                        <ctrls:SearchTextBox x:Name="searchLabware" Grid.Row="0" Grid.Column="1" Background="{DynamicResource middleGrayBrush}" Watermark="请输入"
                                             VerticalAlignment="Center" Margin="10 0 0 0" FontSize="16" VerticalContentAlignment="Center" Height="30" MinWidth="155"
                                             PreviewKeyDown="searchLabware_PreviewKeyDown" HorizontalAlignment="Left" clearEvent="searchLabware_clearEvent"/>
 
                        <ListView x:Name="lvConsumable" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"  Margin="10"
                                  ItemsPanel="{DynamicResource NormalItemsPanel}" Background="White"
                                  ItemContainerStyle="{DynamicResource ConsumableListViewItemStyle}" ItemTemplate="{DynamicResource ConsumableListViewItemDataTemplate}"
                                  BorderThickness="0" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="lvConsumable_SelectionChanged"
                                  ContextMenu="{DynamicResource consumableMenu}" PreviewMouseRightButtonDown="lvConsumable_PreviewMouseRightButtonDown"/>
 
                    </Grid>
                </Border>
                <ScrollViewer Grid.Column="1">
                    <Grid >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="60"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <cons:BaseInfo x:Name="baseInfo" Grid.Row="0" Height="300"/>
                        <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0">
                            <!--基础设置-->
                            <RadioButton x:Name="rbBaseSetting" Width="120" Height="40" Style="{DynamicResource TxTRadioButtonSytle}" Content="{x:Static str:Resources.strBaseSetting}"
                                     FontSize="20" FontWeight="Black" Background="White" Margin="0 0 40 0" HorizontalAlignment="Center"
                                     VerticalContentAlignment="Center" Checked="RadioButton_Checked"/>
                            <!--其他设置-->
                            <RadioButton x:Name="rbOtherSetting" Width="120" Height="40" Style="{DynamicResource TxTRadioButtonSytle}" Content="{x:Static str:Resources.strOtherSetting}"
                                     FontSize="20" FontWeight="Black" Background="White" Margin="0 0 20 0" HorizontalAlignment="Center"
                                     VerticalContentAlignment="Center" Checked="RadioButton_Checked"/>
                        </StackPanel>
   
                        <Grid Grid.Row="2" x:Name="gridBaseSetting"/>
                        <cons:OtherSetting x:Name="otherSetting"  Grid.Row="2" Visibility="Collapsed"/>
                        <cons:CentrifugalOtherSetting x:Name="centrifugalOtherSetting"  Grid.Row="2" Visibility="Collapsed"/>
                    </Grid>
                </ScrollViewer>
            </Grid>
                
        </Border>
    </Grid>
</UserControl>