50d301e8cc
- Migliorata gestione nuovo pezzo - Correzioni e migliorie
25 lines
949 B
VB.net
25 lines
949 B
VB.net
Public Class ManagePartPanelV
|
|
|
|
Protected Sub Item_ContextMenuOpening(sender As Object, e As ContextMenuEventArgs)
|
|
Dim PartItem As ManagePart_Part
|
|
Dim LayerItem As ManagePart_Layer
|
|
Dim EntityItem As PartManager_GeomEntity
|
|
Select Case e.OriginalSource.DataContext.GetType()
|
|
Case GetType(ManagePart_Part)
|
|
PartItem = DirectCast(e.OriginalSource.DataContext, ManagePart_Part)
|
|
If PartItem.MenuList.Count = 0 Then
|
|
e.Handled = True
|
|
End If
|
|
Case GetType(ManagePart_Layer)
|
|
LayerItem = DirectCast(e.OriginalSource.DataContext, ManagePart_Layer)
|
|
e.Handled = True
|
|
Case GetType(PartManager_GeomEntity)
|
|
EntityItem = DirectCast(e.OriginalSource.DataContext, PartManager_GeomEntity)
|
|
If EntityItem.MenuList.Count = 0 Then
|
|
e.Handled = True
|
|
End If
|
|
End Select
|
|
End Sub
|
|
|
|
End Class
|