6e22857086
- Correzioni e migliorie varie
30 lines
1.2 KiB
VB.net
30 lines
1.2 KiB
VB.net
Imports EgtUILib
|
|
Imports EgtBEAMWALL.Core
|
|
|
|
Public Class PartInRawPartListV
|
|
|
|
' funzione che permette di selezionare un pezzo anche quando gia' selezionato
|
|
Private Sub PartInRawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
|
If TypeOf sender Is DataGridRow Then
|
|
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
|
If Not IsNothing(Row) Then
|
|
Dim MyMachGroup As Core.MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
|
|
If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = MyMachGroup
|
|
MyMachGroup.SelPart = MyMachGroup.SelPart
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
' funzione che impedisce di editare le righe che sono gia' in produzione
|
|
Private Sub PartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
|
If IsNothing(e.Row) Then Return
|
|
Dim RowVM As PartVM = DirectCast(e.Row.DataContext, PartVM)
|
|
' 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
|