- modifiche
This commit is contained in:
@@ -960,7 +960,7 @@
|
||||
<Version>2.7.10.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="EgwWPFBaseLib">
|
||||
<Version>2.7.11-beta.1</Version>
|
||||
<Version>2.7.11-beta.4</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="EntityFramework">
|
||||
<Version>6.4.4</Version>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<OPTIMIZER:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<OPTIMIZER:FractionHeightConverter x:Key="FractionHeightConverter"/>
|
||||
<OPTIMIZER:ExpanderWidthConverter x:Key="ExpanderWidthConverter"/>
|
||||
<OPTIMIZER:DataGridTotalWidthConverter x:Key="DataGridTotalWidthConverter"/>
|
||||
<sys:Double x:Key="FeatureWrapPanelHeight">0.6</sys:Double>
|
||||
</UserControl.Resources>
|
||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.BTLPartVMList,
|
||||
@@ -23,6 +24,8 @@
|
||||
IsEnabled="{Binding PartList_IsEnabled}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
VerticalGridLinesBrush="Transparent"
|
||||
HorizontalGridLinesBrush="Transparent"
|
||||
AreRowDetailsFrozen="True"
|
||||
EnableRowVirtualization="True"
|
||||
EnableColumnVirtualization="True"
|
||||
@@ -35,6 +38,7 @@
|
||||
VirtualizingPanel.CacheLengthUnit="Pixel"
|
||||
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
Style="{StaticResource DataGrid_OnlyProd}">
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.DeletePart_Command,
|
||||
@@ -48,10 +52,10 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True" HorizontalAlignment="Left"
|
||||
Width="{Binding ActualWidth, Converter={StaticResource ExpanderWidthConverter}, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}}}">
|
||||
<Expander IsExpanded="True" HorizontalAlignment="Left">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Stretch">
|
||||
<TextBlock Text="{Binding Path=Name}"
|
||||
Margin="0,0,5,0" FontSize="14"/>
|
||||
<TextBlock Text="{Binding Path=Name, Converter={StaticResource ProjIdToBtlFileName}}"
|
||||
@@ -104,14 +108,71 @@
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<!--<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="DetailsVisibility" Value="{Binding bOpenFeatureList, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||
<EventSetter Event="PreviewMouseDown" Handler="PartList_PreviewMouseDown"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
--><!--Celle della riga--><!--
|
||||
<DataGridCellsPresenter Grid.Row="0"/>
|
||||
|
||||
--><!--Dettagli della riga--><!--
|
||||
<DataGridDetailsPresenter Grid.Row="1"
|
||||
Visibility="{TemplateBinding DetailsVisibility}"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsRowEnabled}" Value="False">
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>-->
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
||||
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
||||
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
|
||||
<Setter Property="ValidationErrorTemplate">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<TextBlock Foreground="Red" Margin="2,0,0,0" Text="!" VerticalAlignment="Center"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
||||
<Border x:Name="DGR_Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
|
||||
<SelectiveScrollingGrid>
|
||||
<SelectiveScrollingGrid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</SelectiveScrollingGrid.ColumnDefinitions>
|
||||
<SelectiveScrollingGrid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</SelectiveScrollingGrid.RowDefinitions>
|
||||
<DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
<DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" Visibility="{TemplateBinding DetailsVisibility}"/>
|
||||
<DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</SelectiveScrollingGrid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsNewItem" Value="True">
|
||||
<Setter Property="Margin" Value="{Binding NewItemMargin, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.Resources>
|
||||
@@ -390,6 +451,12 @@
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.MaxWidth>
|
||||
<MultiBinding Converter="{StaticResource DataGridTotalWidthConverter}">
|
||||
<Binding RelativeSource="{RelativeSource AncestorType=DataGrid}" Path="ActualWidth" />
|
||||
<Binding RelativeSource="{RelativeSource AncestorType=DataGrid}"/>
|
||||
</MultiBinding>
|
||||
</Grid.MaxWidth>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -410,15 +477,15 @@
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"
|
||||
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}},
|
||||
Converter={StaticResource FractionHeightConverter},
|
||||
ConverterParameter={StaticResource FeatureWrapPanelHeight}}"
|
||||
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
|
||||
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}},
|
||||
Converter={StaticResource FractionHeightConverter},
|
||||
ConverterParameter={StaticResource FeatureWrapPanelHeight}}"
|
||||
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,0,50,0">
|
||||
<Grid Margin="0,0,10,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
@@ -432,14 +499,14 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding nPRID}"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_Background}"/>
|
||||
Background="{Binding Calc_Background}"/>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -448,54 +515,60 @@
|
||||
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
|
||||
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_Ellipse}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_TextBlock}"/>
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<CheckBox Grid.Column="2"
|
||||
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,5,0"/>
|
||||
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,5,0"/>
|
||||
<TextBlock Grid.Column="3"
|
||||
Text="["
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
Text="["
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="4"
|
||||
Text="{Binding nSelGRP}"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
Text="{Binding nSelGRP}"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="5"
|
||||
Text="-"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
Text="-"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="6"
|
||||
Text="{Binding nPRC, StringFormat={}{0:000}}"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
Text="{Binding nPRC, StringFormat={}{0:000}}"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="7"
|
||||
Text="] "
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
Text="] "
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="8"
|
||||
Text="{Binding sName}" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
Text="{Binding sName}" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||
<Button Grid.Column="9"
|
||||
Command="{Binding EditFeature_Command}"
|
||||
Click="SelectButton_Click"
|
||||
Style="{StaticResource EditFeature_Button}">
|
||||
Command="{Binding EditFeature_Command}"
|
||||
Click="SelectButton_Click"
|
||||
Style="{StaticResource EditFeature_Button}">
|
||||
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,2,0,0"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}">
|
||||
<TextBlock Text="STATUS:" Foreground="{StaticResource BeamWall_Corduroy}" HorizontalAlignment="Left" Margin="0,0,10,0"/>
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal"
|
||||
Margin="0,2,0,0">
|
||||
<TextBlock Text="STATUS:"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="0,0,10,0"/>
|
||||
<TextBlock Text="{Binding Tag.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
HorizontalAlignment="Left" Foreground="{StaticResource BeamWall_Corduroy}"
|
||||
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"/>
|
||||
HorizontalAlignment="Left"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"
|
||||
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"/>
|
||||
|
||||
<TextBlock Text="{Binding Tag.SelBTLPart.SelBTLFeatureVM.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
HorizontalAlignment="Left" Foreground="{StaticResource BeamWall_Corduroy}" />
|
||||
HorizontalAlignment="Left"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -300,3 +300,24 @@ Class ExpanderWidthConverter
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class DataGridTotalWidthConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
If TypeOf values(0) Is Double AndAlso TypeOf values(1) Is DataGrid Then
|
||||
Dim dataGrid As DataGrid = DirectCast(values(1), DataGrid)
|
||||
Dim total As Double = 0
|
||||
For Each col In dataGrid.Columns
|
||||
total += col.ActualWidth
|
||||
Next
|
||||
Return total
|
||||
End If
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user