Files
egtbeamwall/EgtBEAMWALL.ViewerOptimizer/ItemParamList/OnlyProdFeatureInPartInRawPartListV.xaml.vb
T
2024-04-08 16:22:52 +02:00

26 lines
1.1 KiB
VB.net

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
Private Sub FeatureList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If Not IsNothing(Row) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM
End If
End If
End Sub
End Class