| | |
| | | Loaded="UserControl_Loaded" |
| | | Background="{StaticResource WorkspaceBackground}" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | <UserControl.Resources> |
| | | <!--<ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonDataGrid.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | </ResourceDictionary>--> |
| | | <CollectionViewSource x:Key="GroupFilter" Source="{Binding Parameters}"> |
| | | <CollectionViewSource.GroupDescriptions> |
| | | <PropertyGroupDescription PropertyName="ShowGroup" /> |
| | | </CollectionViewSource.GroupDescriptions> |
| | | </CollectionViewSource> |
| | | </UserControl.Resources> |
| | | <Grid> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="3*"/> |
| | |
| | | <Button Style="{StaticResource DelBtn}" x:Name="delBatchBtn" Click="Button_Click"/> |
| | | </StackPanel> |
| | | <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TitleFontSize}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="产品列表"/> |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="{DynamicResource Pm.Product.Title}"/> |
| | | </DockPanel> |
| | | |
| | | |
| | |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Name}" Header="产品名称" /> |
| | | <DataGridTemplateColumn Header="操作" Width="100" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Name}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Product.Name}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTemplateColumn Width="100" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Opt}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="10"> |
| | | <Button x:Name="editProductBtn" Style="{StaticResource RowLink}" DataContext="{Binding }" |
| | | Click="Button_Click">编辑</Button> |
| | | <Button x:Name="delProductBtn" Style="{StaticResource DangerLinkButton}" |
| | | <Button x:Name="editProductBtn" Style="{StaticResource EditLink}" DataContext="{Binding }" |
| | | Click="Button_Click"/> |
| | | <Button x:Name="delProductBtn" Style="{StaticResource DeleteLink}" |
| | | DataContext="{Binding }" |
| | | Click="Button_Click">删除</Button> |
| | | Click="Button_Click"/> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | |
| | | <Button Style="{StaticResource DelBtn}" x:Name="deleteBatchParameterBtn" Click="Button_Click"/> |
| | | </StackPanel> |
| | | <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TitleFontSize}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="产品参数"/> |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="{DynamicResource Pm.Parameter.Title}"/> |
| | | </DockPanel> |
| | | |
| | | |
| | | <DataGrid Grid.Row="1" x:Name="parameterTable" Style="{StaticResource DefaultDataGrid}" SelectionMode="Single" |
| | | SelectedItem="{Binding SelectedParameter}" |
| | | ItemsSource="{Binding Parameters}"> |
| | | <DataGrid Grid.Row="1" x:Name="parameterTable" Style="{StaticResource DefaultDataGrid}" |
| | | SelectionMode="Single" |
| | | ItemsSource="{Binding Source={StaticResource GroupFilter}}" |
| | | SelectedItem="{Binding SelectedParameter}"> |
| | | <DataGrid.GroupStyle> |
| | | <GroupStyle> |
| | | <GroupStyle.ContainerStyle> |
| | | <Style TargetType="{x:Type GroupItem}"> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="{x:Type GroupItem}"> |
| | | <Expander BorderThickness="0" Background="DarkCyan" |
| | | IsExpanded="True"> |
| | | <Expander.Header> |
| | | <TextBlock Text="{Binding Name}" FontSize="15" |
| | | Margin="8" |
| | | Foreground="#FFF"/> |
| | | </Expander.Header> |
| | | <Border Background="#FFF"> |
| | | <ItemsPresenter /> |
| | | </Border> |
| | | </Expander> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | </GroupStyle.ContainerStyle> |
| | | </GroupStyle> |
| | | </DataGrid.GroupStyle> |
| | | |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Header="" Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | |
| | | <DataGridTextColumn Header="#" Binding="{Binding Converter={StaticResource rowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | CanUserResize="False"/> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Name}" Header="名称" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Value}" Header="值" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Unit}" Header="单位" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Description}" Header="描述" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding PGroup}" Header="分组" /> |
| | | <DataGridTemplateColumn Header="操作" Width="100" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTextColumn Width="150" Binding="{Binding Name}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Name}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="60" Binding="{Binding Type}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Type}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Value}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Value}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="80" Binding="{Binding Unit}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Unit}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="120" Binding="{Binding Description}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Desc}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="120" Binding="{Binding PGroup}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Group}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTemplateColumn Width="100" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Opt}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <Button x:Name="editParameterBtn" Style="{StaticResource RowLink}" Margin="0,0,10,0" |
| | | <Button x:Name="editParameterBtn" Style="{StaticResource EditLink}" Margin="0,0,10,0" |
| | | DataContext="{Binding }" |
| | | Click="Button_Click">编辑</Button> |
| | | <Button x:Name="delParameterBtn" Style="{StaticResource DangerLinkButton}" |
| | | Click="Button_Click"/> |
| | | <Button x:Name="delParameterBtn" Style="{StaticResource DeleteLink}" |
| | | DataContext="{Binding }" |
| | | Click="Button_Click">删除</Button> |
| | | Click="Button_Click"/> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |