chr
7 天以前 43a0207d207390abdeeb3ab9155eebf03edd7b1a
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
<UserControl x:Class="PdmSwPlugin.PropertySetting.PropertySettingControl"
             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"
             mc:Ignorable="d" 
             x:Name="self"
             Initialized="PropertySettingControl_Initialized"
             d:DesignHeight="900" d:DesignWidth="800" Background="#FFF">
 
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/PdmSwPlugin.Common;component/Style/ToolBar.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
 
    <StackPanel>
        <ToolBarTray Background="#FFF" ToolBarTray.IsLocked="True" >
            <ToolBar Style="{StaticResource CommonToolBar}" ToolBar.OverflowMode="Never" Band="1" BandIndex="1" Height="30" Background="#FFF">
                <Button ToolTip="刷新" Content="&#xe631;" Click="Refresh_Click" FontSize="16"/>
 
                <Button ToolTip="保存" Content="&#xe60d;" FontFamily="{StaticResource iconfont}" FontSize="16"
                        Click="SaveButton_Click"/>
                <Button ToolTip="另存" Content="&#xe60b;" FontFamily="{StaticResource iconfont}" FontSize="16"
                        Click="SaveAsButton_Click"/>
                <!--<Button ToolTip="另存">
                    <Image Source="Image/save.png"/>
                </Button>-->
                <Button ToolTip="加载可选项" Content="&#xe752;" Click="LoadComboBox_Click" FontSize="16"/>
            </ToolBar>
        </ToolBarTray>
        <AdornerDecorator x:Name="mainAdorner">
            <StackPanel>
                <StackPanel x:Name="mainPanel">
                    <Label Content="{Binding ActiveDocPath}"/>
                    <GroupBox Header="属性参数">
                        <StackPanel>
                            <StackPanel x:Name="materialCodePanel">
                                <Label Grid.Row="0" Grid.Column="0" Content="物料编码"/>
                                <TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" x:Name="materialCode" />
                            </StackPanel>
 
                            <StackPanel x:Name="materialModelPanel">
                                <Label Grid.Row="1" Grid.Column="0" Content="物料型号"/>
                                <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" x:Name="materialModel" />
                            </StackPanel>
 
                            <StackPanel x:Name="materialNamePanel">
                                <Label Grid.Row="2" Grid.Column="0" Content="物料名称"/>
                                <TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" x:Name="materialName" />
                            </StackPanel>
 
                            <StackPanel x:Name="materialTypePanel">
                                <Label Grid.Row="3" Grid.Column="0" Content="加工件类型"/>
                                <ComboBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" x:Name="materialType"
                                  ItemsSource="{Binding MaterialTypeItemSource,Mode=TwoWay}"
                                  SelectedItem="{Binding MaterialType,Mode=TwoWay}"/>
                            </StackPanel>
 
                            <StackPanel x:Name="stuffPanel">
                                <Label Grid.Row="4" Grid.Column="0" Content="物料材料"/>
                                <ComboBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" x:Name="stuff" 
                                  ItemsSource="{Binding StuffItemSource,Mode=TwoWay}"
                                  SelectedItem="{Binding StuffType,Mode=TwoWay}"/>
                            </StackPanel>
 
                            <StackPanel x:Name="surfacePanel">
                                <Label Grid.Row="5" Grid.Column="0" Content="表面处理"/>
                                <ComboBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" x:Name="surface" 
                                  ItemsSource="{Binding SurfaceItemSource,Mode=TwoWay}"
                                  SelectedItem="{Binding SurfaceType,Mode=TwoWay}"/>
                            </StackPanel>
 
                            <StackPanel x:Name="heatPanel">
                                <Label Grid.Row="6" Grid.Column="0" Content="热处理"/>
                                <ComboBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" x:Name="heat" 
                                  ItemsSource="{Binding HeatItemSource,Mode=TwoWay}"
                                  SelectedItem="{Binding HeatType,Mode=TwoWay}"/>
                            </StackPanel>
 
                            <StackPanel x:Name="versionPanel">
                                <Label Grid.Row="7" Grid.Column="0" Content="版本"/>
                                <TextBox Grid.Row="7" Grid.Column="1" x:Name="version" IsReadOnly="True" />
                            </StackPanel>
 
                            <StackPanel x:Name="pricePanel">
                                <Label Grid.Row="7" Grid.Column="2" Content="价格"/>
                                <TextBox Grid.Row="7" Grid.Column="3" x:Name="price" IsReadOnly="True" />
                            </StackPanel>
                        </StackPanel>
                    </GroupBox>
                    <ContentControl x:Name="contentControl"></ContentControl>
                </StackPanel>
                <StackPanel x:Name="dataGridPanel">
                    <DataGrid x:Name="dataGrid">
                        <DataGrid.Columns>
                            <DataGridTextColumn Width="5*" IsReadOnly="True" Header="属性" Binding="{Binding name}"/>
                            <DataGridTextColumn Width="5*" IsReadOnly="True" Header="值" Binding="{Binding value}"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </StackPanel>
            </StackPanel>
        </AdornerDecorator>
    </StackPanel>
</UserControl>