Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 908e407147 |
@@ -960,7 +960,7 @@
|
|||||||
<Version>2.7.10.1</Version>
|
<Version>2.7.10.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="EgwWPFBaseLib">
|
<PackageReference Include="EgwWPFBaseLib">
|
||||||
<Version>2.7.11-beta.1</Version>
|
<Version>2.7.11-beta.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="EntityFramework">
|
<PackageReference Include="EntityFramework">
|
||||||
<Version>6.4.4</Version>
|
<Version>6.4.4</Version>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<OPTIMIZER:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
<OPTIMIZER:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
<OPTIMIZER:FractionHeightConverter x:Key="FractionHeightConverter"/>
|
<OPTIMIZER:FractionHeightConverter x:Key="FractionHeightConverter"/>
|
||||||
<OPTIMIZER:ExpanderWidthConverter x:Key="ExpanderWidthConverter"/>
|
<OPTIMIZER:ExpanderWidthConverter x:Key="ExpanderWidthConverter"/>
|
||||||
|
<OPTIMIZER:DataGridTotalWidthConverter x:Key="DataGridTotalWidthConverter"/>
|
||||||
<sys:Double x:Key="FeatureWrapPanelHeight">0.6</sys:Double>
|
<sys:Double x:Key="FeatureWrapPanelHeight">0.6</sys:Double>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.BTLPartVMList,
|
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.BTLPartVMList,
|
||||||
@@ -23,6 +24,8 @@
|
|||||||
IsEnabled="{Binding PartList_IsEnabled}"
|
IsEnabled="{Binding PartList_IsEnabled}"
|
||||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||||
AlternationCount="2"
|
AlternationCount="2"
|
||||||
|
VerticalGridLinesBrush="Transparent"
|
||||||
|
HorizontalGridLinesBrush="Transparent"
|
||||||
AreRowDetailsFrozen="True"
|
AreRowDetailsFrozen="True"
|
||||||
EnableRowVirtualization="True"
|
EnableRowVirtualization="True"
|
||||||
EnableColumnVirtualization="True"
|
EnableColumnVirtualization="True"
|
||||||
@@ -35,6 +38,7 @@
|
|||||||
VirtualizingPanel.CacheLengthUnit="Pixel"
|
VirtualizingPanel.CacheLengthUnit="Pixel"
|
||||||
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
|
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
|
||||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||||
|
HorizontalScrollBarVisibility="Auto"
|
||||||
Style="{StaticResource DataGrid_OnlyProd}">
|
Style="{StaticResource DataGrid_OnlyProd}">
|
||||||
<DataGrid.InputBindings>
|
<DataGrid.InputBindings>
|
||||||
<KeyBinding Key="Delete" Command="{Binding Tag.DeletePart_Command,
|
<KeyBinding Key="Delete" Command="{Binding Tag.DeletePart_Command,
|
||||||
@@ -48,10 +52,10 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||||
<Expander IsExpanded="True" HorizontalAlignment="Left"
|
<Expander IsExpanded="True" HorizontalAlignment="Left">
|
||||||
Width="{Binding ActualWidth, Converter={StaticResource ExpanderWidthConverter}, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}}}">
|
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Stretch">
|
||||||
<TextBlock Text="{Binding Path=Name}"
|
<TextBlock Text="{Binding Path=Name}"
|
||||||
Margin="0,0,5,0" FontSize="14"/>
|
Margin="0,0,5,0" FontSize="14"/>
|
||||||
<TextBlock Text="{Binding Path=Name, Converter={StaticResource ProjIdToBtlFileName}}"
|
<TextBlock Text="{Binding Path=Name, Converter={StaticResource ProjIdToBtlFileName}}"
|
||||||
@@ -104,14 +108,71 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGrid.CellStyle>
|
</DataGrid.CellStyle>
|
||||||
<DataGrid.RowStyle>
|
<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}}"/>
|
<Setter Property="DetailsVisibility" Value="{Binding bOpenFeatureList, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<EventSetter Event="PreviewMouseDown" Handler="PartList_PreviewMouseDown"/>
|
<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>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding IsRowEnabled}" Value="False">
|
<DataTrigger Binding="{Binding IsRowEnabled}" Value="False">
|
||||||
<Setter Property="IsEnabled" Value="False"/>
|
<Setter Property="IsEnabled" Value="False"/>
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
</Style.Triggers>
|
</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>
|
</Style>
|
||||||
</DataGrid.RowStyle>
|
</DataGrid.RowStyle>
|
||||||
<DataGrid.Resources>
|
<DataGrid.Resources>
|
||||||
@@ -390,6 +451,12 @@
|
|||||||
<DataGrid.RowDetailsTemplate>
|
<DataGrid.RowDetailsTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid.MaxWidth>
|
||||||
|
<MultiBinding Converter="{StaticResource DataGridTotalWidthConverter}">
|
||||||
|
<Binding RelativeSource="{RelativeSource AncestorType=DataGrid}" Path="ActualWidth" />
|
||||||
|
<Binding RelativeSource="{RelativeSource AncestorType=DataGrid}"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Grid.MaxWidth>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -410,15 +477,15 @@
|
|||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<WrapPanel Orientation="Vertical"
|
<WrapPanel Orientation="Vertical"
|
||||||
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}},
|
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}},
|
||||||
Converter={StaticResource FractionHeightConverter},
|
Converter={StaticResource FractionHeightConverter},
|
||||||
ConverterParameter={StaticResource FeatureWrapPanelHeight}}"
|
ConverterParameter={StaticResource FeatureWrapPanelHeight}}"
|
||||||
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
|
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Margin="0,0,50,0">
|
<Grid Margin="0,0,10,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="50"/>
|
<ColumnDefinition Width="50"/>
|
||||||
<ColumnDefinition Width="40"/>
|
<ColumnDefinition Width="40"/>
|
||||||
@@ -432,14 +499,14 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding nPRID}"
|
<TextBlock Text="{Binding nPRID}"
|
||||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="10"/>
|
<ColumnDefinition Width="10"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||||
Background="{Binding Calc_Background}"/>
|
Background="{Binding Calc_Background}"/>
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
@@ -448,54 +515,60 @@
|
|||||||
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
|
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
|
||||||
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_Ellipse}"/>
|
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_Ellipse}"/>
|
||||||
<TextBlock Grid.Row="1"
|
<TextBlock Grid.Row="1"
|
||||||
Text="{Binding CALC_ERR_Letter}"
|
Text="{Binding CALC_ERR_Letter}"
|
||||||
Foreground="{Binding CALC_ERR_Foreground}"
|
Foreground="{Binding CALC_ERR_Foreground}"
|
||||||
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_TextBlock}"/>
|
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_TextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<CheckBox Grid.Column="2"
|
<CheckBox Grid.Column="2"
|
||||||
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Margin="0,0,5,0"/>
|
Margin="0,0,5,0"/>
|
||||||
<TextBlock Grid.Column="3"
|
<TextBlock Grid.Column="3"
|
||||||
Text="["
|
Text="["
|
||||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||||
<TextBlock Grid.Column="4"
|
<TextBlock Grid.Column="4"
|
||||||
Text="{Binding nSelGRP}"
|
Text="{Binding nSelGRP}"
|
||||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||||
<TextBlock Grid.Column="5"
|
<TextBlock Grid.Column="5"
|
||||||
Text="-"
|
Text="-"
|
||||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||||
<TextBlock Grid.Column="6"
|
<TextBlock Grid.Column="6"
|
||||||
Text="{Binding nPRC, StringFormat={}{0:000}}"
|
Text="{Binding nPRC, StringFormat={}{0:000}}"
|
||||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||||
<TextBlock Grid.Column="7"
|
<TextBlock Grid.Column="7"
|
||||||
Text="] "
|
Text="] "
|
||||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||||
<TextBlock Grid.Column="8"
|
<TextBlock Grid.Column="8"
|
||||||
Text="{Binding sName}" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center"
|
Text="{Binding sName}" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Style="{StaticResource OnlyProd_TextBlock}"/>
|
Style="{StaticResource OnlyProd_TextBlock}"/>
|
||||||
<Button Grid.Column="9"
|
<Button Grid.Column="9"
|
||||||
Command="{Binding EditFeature_Command}"
|
Command="{Binding EditFeature_Command}"
|
||||||
Click="SelectButton_Click"
|
Click="SelectButton_Click"
|
||||||
Style="{StaticResource EditFeature_Button}">
|
Style="{StaticResource EditFeature_Button}">
|
||||||
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
|
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,2,0,0"
|
<StackPanel Grid.Row="1"
|
||||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}">
|
Grid.Column="1"
|
||||||
<TextBlock Text="STATUS:" Foreground="{StaticResource BeamWall_Corduroy}" HorizontalAlignment="Left" Margin="0,0,10,0"/>
|
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}}}"
|
<TextBlock Text="{Binding Tag.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||||
HorizontalAlignment="Left" Foreground="{StaticResource BeamWall_Corduroy}"
|
HorizontalAlignment="Left"
|
||||||
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"/>
|
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}}}"
|
<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>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
@@ -300,3 +300,24 @@ Class ExpanderWidthConverter
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
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