-aggiunto selezione checkbox FeatureInPartInRawPartListVM
-istemata visibilità spèecial panel
This commit is contained in:
@@ -198,6 +198,9 @@
|
||||
<DependentUpon>FeatureListManagerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FeatureListManager\FeatureListManagerVM.vb" />
|
||||
<Compile Include="ItemParamList\OnlyProdFeatureInPartInRawPartListV.xaml.vb">
|
||||
<DependentUpon>OnlyProdFeatureInPartInRawPartListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachinePanel\MachinePanelVM.vb" />
|
||||
<Compile Include="MacroFeatureWnd\NewMacroFeatureWnd.xaml.vb">
|
||||
<DependentUpon>NewMacroFeatureWnd.xaml</DependentUpon>
|
||||
@@ -487,6 +490,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ItemParamList\OnlyProdFeatureInPartInRawPartListV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OnlyProdProject\OnlyProdProjectV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -143,13 +143,27 @@
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--DO - Abilitazione-->
|
||||
<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
<!--<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="28">
|
||||
<DataGridCheckBoxColumn.Header>
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</DataGridCheckBoxColumn.Header>
|
||||
</DataGridCheckBoxColumn>
|
||||
</DataGridCheckBoxColumn>-->
|
||||
<DataGridTemplateColumn x:Key="colDO">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}" SortMemberPath="dW">
|
||||
<DataGridTextColumn.Header>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<RowDefinition Height="30"/>
|
||||
</Grid.RowDefinitions>-->
|
||||
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.FeatureVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelFeatureVM,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
|
||||
CanUserAddRows="False"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Data
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class FeatureInPartInRawPartListVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_colFeatureInPartInRawPart_Do As EgtDataGridColumn
|
||||
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgtDataGridColumn
|
||||
@@ -28,6 +31,33 @@ Public Class FeatureInPartInRawPartListVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property bDOALL As Boolean?
|
||||
Get
|
||||
If Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList.Count = 0 Then Return False
|
||||
Dim bTemp As Boolean = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList(0).bDO
|
||||
For FeatureIndex = 1 To Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList.Count - 1
|
||||
If Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList(FeatureIndex).bDO <> bTemp Then Return Nothing
|
||||
Next
|
||||
Return bTemp
|
||||
End Get
|
||||
Set(value As Boolean?)
|
||||
If Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList.Count = 0 Then
|
||||
NotifyPropertyChanged(NameOf(bDOALL))
|
||||
Return
|
||||
End If
|
||||
' imposto modalita' update multiplo
|
||||
BTLFeatureVM.bDO_MultipleUpdate = True
|
||||
For FeatureIndex = 0 To Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList.Count - 1
|
||||
If FeatureIndex = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList.Count - 1 Then
|
||||
' reset modalita' update multiplo
|
||||
BTLFeatureVM.bDO_MultipleUpdate = False
|
||||
End If
|
||||
Dim Feature As BTLFeatureVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList(FeatureIndex)
|
||||
Feature.bDO = value
|
||||
Next
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Description_Msg As String
|
||||
@@ -58,6 +88,8 @@ Public Class FeatureInPartInRawPartListVM
|
||||
' recupero riferimento a colonna Do
|
||||
m_colFeatureInPartInRawPart_Do = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_DO)
|
||||
m_colFeatureInPartInRawPart_Priority = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_PRIORITY)
|
||||
' Aggiorno check DOALL
|
||||
NotifyPropertyChanged(NameOf(bDOALL))
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateColumns(nMachType As MachineType)
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<UserControl x:Class="OnlyProdFeatureInPartInRawPartListV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
|
||||
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.FeatureVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureInPartInRawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelFeatureVM,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureInPartInRawPartListV}}}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,5"
|
||||
BindingColumns="{Binding FeatureInPartInRawPartColumns}"
|
||||
BeginningEdit="FeatureInPartInRawPartList_BeginningEdit"
|
||||
Style="{StaticResource DataGrid_CustomHighLight}">
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureInPartInRawPartListV}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
<DataGrid.Resources>
|
||||
<!--DO - Abilitazione-->
|
||||
<!--<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO,UpdateSourceTrigger=PropertyChanged}">
|
||||
<DataGridCheckBoxColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.DO_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridCheckBoxColumn.HeaderTemplate>
|
||||
</DataGridCheckBoxColumn>-->
|
||||
<DataGridTemplateColumn x:Key="colDO">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding DataContext.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureInPartInRawPartListV}}}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Validità feature-->
|
||||
<DataGridTemplateColumn x:Key="colCALC">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_Background}"/>
|
||||
<Grid Grid.Column="1"
|
||||
HorizontalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Ellipse Width="5"
|
||||
Height="5"
|
||||
Fill="Red"
|
||||
Visibility="{Binding CALC_ROT_Visibility}"
|
||||
HorizontalAlignment="Center"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
TextAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
FontSize="12"
|
||||
Margin="0,-6,0,-2"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colPRIORITY" Binding="{Binding sPriority}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Priority_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Resources>
|
||||
|
||||
</EgtBEAMWALLCORE:EgtDataGrid>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,16 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class OnlyProdFeatureInPartInRawPartListV
|
||||
|
||||
' funzione che impedisce di editare le righe che sono gia' in produzione
|
||||
Private Sub FeatureInPartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
||||
If IsNothing(e.Row) Then Return
|
||||
Dim RowVM As BTLFeatureVM = DirectCast(e.Row.DataContext, BTLFeatureVM)
|
||||
' se in produzione impedisco modifica dei parametri
|
||||
If DirectCast(RowVM.BTLFeatureM.ParentPart, PartM).nProductionState > ItemState.ND Then
|
||||
'For Each cell In Row.Item
|
||||
e.Cancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -19,19 +19,20 @@
|
||||
Style="{StaticResource DataGrid_CustomHighLight}">
|
||||
<DataGrid.Resources>
|
||||
<!--DO - Abilitazione-->
|
||||
<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="28">
|
||||
<!--<DataGridCheckBoxColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.DO_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"/>
|
||||
</DataGridCheckBoxColumn.Header>-->
|
||||
<DataGridCheckBoxColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn x:Key="colDO">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<!--<TextBlock Text="{Binding DataContext.DO_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>-->
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureListV}}}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</DataGridCheckBoxColumn.HeaderTemplate>
|
||||
</DataGridCheckBoxColumn>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Validità feature-->
|
||||
<DataGridTemplateColumn x:Key="colCALC">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.Core.ConstGen
|
||||
|
||||
Public Class OnlyProdQParameterListV
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<EgtBEAMWALL:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<EgtBEAMWALL:CalcPanelV DataContext="{StaticResource CALCPanelVM}"/>
|
||||
<EgtBEAMWALL:SpecialPanelV DataContext="{StaticResource SpecialPanelVM}"
|
||||
Visibility="{Binding DataContext.SpecialPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
|
||||
Visibility="{Binding DataContext.SpecialPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
|
||||
<EgtBEAMWALL:FreeContourManagerV DataContext="{StaticResource FreeContourManagerVM}"
|
||||
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
|
||||
</WrapPanel>
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
<ColumnDefinition Width="{Binding GridDims[9].GridLen, Mode=TwoWay}"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtBEAMWALL:FeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}"
|
||||
Tag="{Binding Tag.MachGroupPanelVM.SelectedMachGroup.SelPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProdWndV}}}"/>
|
||||
<EgtBEAMWALL:OnlyProdFeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}"
|
||||
Tag="{Binding Tag.MachGroupPanelVM.SelectedMachGroup.SelPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProdWndV}}}"/>
|
||||
|
||||
<GridSplitter Grid.Column="1"
|
||||
Height="3"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
|
||||
<EgtBEAMWALL:QParameterListV Grid.Column="2"
|
||||
DataContext="{StaticResource DuploQParameterListVM}"
|
||||
Tag="{Binding Tag.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProdWndV}}}"/>
|
||||
<EgtBEAMWALL:OnlyProdQParameterListV Grid.Column="2"
|
||||
DataContext="{StaticResource DuploQParameterListVM}"
|
||||
Tag="{Binding Tag.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProdWndV}}}"/>
|
||||
</Grid>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Tag.MachGroupPanelVM.SelectedMachGroup.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProdWndV}}}"
|
||||
|
||||
Reference in New Issue
Block a user