Files
egtbeamwall/EgtBEAMWALL.ViewerOptimizer/ItemParamList/OnlyProdQParameterListProdV.xaml.vb
Demetrio Cassarino 7005a2dfb6 -modifica grafica datagrid, da rivdere
-modifica grafica floating panel top
2024-04-24 17:31:44 +02:00

28 lines
1.3 KiB
VB.net

Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Core.ConstGen
Public Class OnlyProdQParameterListProdV
Private Sub QParameterList_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 Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam
End If
End If
End Sub
' funzione che impedisce di editare le righe che sono gia' in produzione
Private Sub QParameterList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
If IsNothing(e.Row) Then Return
If Map.refMainMenuVM.SelPage <> Pages.MACHINING Then Return
Dim RowVM As BTLParamVM = DirectCast(e.Row.DataContext, BTLParamVM)
' se in produzione impedisco modifica dei parametri
If DirectCast(RowVM.BTLParamM.ParentFeature.ParentPart, PartM).nProductionState > ItemState.ND Then
'For Each cell In Row.Item
e.Cancel = True
End If
End Sub
End Class