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

29 lines
1.2 KiB
VB.net

Imports EgtBEAMWALL.Core
Public Class OnlyProdRawPartListV
' funzione che permette di selezionare un RawPart anche quando gia' selezionato
Private Sub RawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
Dim RowVM As MyMachGroupVM = DirectCast(Row.DataContext, MyMachGroupVM)
' se gia' selezionato rifaccio selezione perche' potrbbe essere selezionato un BTLPart
If Not IsNothing(Row) AndAlso Row.IsSelected Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
End If
End If
End Sub
' funzione che impedisce di editare le righe che sono gia' in produzione
Private Sub RawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
If IsNothing(e.Row) Then Return
Dim RowVM As MyMachGroupVM = DirectCast(e.Row.DataContext, MyMachGroupVM)
' se in produzione impedisco modifica dei parametri
If RowVM.nProduction_State > ItemState.ND Then
'For Each cell In Row.Item
e.Cancel = True
End If
End Sub
End Class