Imports EgtUILib
'''
''' Class that represent a Machining in the treeview.
''' It's an element in the treeview that represent the child of familymachiningtreeviewitem, but also the class that read and write in the machining's database
'''
Public Class ElementLayerTreeViewItem
Inherits ChildItem
#Region "Machining Property"
Private m_Type As MCH_MY
Public ReadOnly Property Type As Integer
Get
Return m_Type
End Get
End Property
'''
''' Property that determines if the Machining is selected or not
'''
Public Overrides Property IsSelected As Boolean
Get
Return m_isSelected
End Get
Set(value As Boolean)
If (value <> m_isSelected) Then
m_isSelected = value
' If Machining is selected, set it as current and notify all machining's property
' to refresh them values with those of the new selected machining
If value Then
EgtMdbSetCurrMachining(Me.Name)
Else
End If
End If
End Set
End Property
Private m_Tool As String
Public Property Tool As String
Get
Return m_Tool
End Get
Set(value As String)
m_Tool = value
End Set
End Property
#End Region ' Machining Property
#Region "Constructors"
Sub New(Name As String, Tool As String)
MyBase.New(Name)
Me.Tool = If(Not String.IsNullOrEmpty(Tool), "(" & Tool & ")", String.Empty)
End Sub
#End Region ' Constructors
End Class
'''
''' Class that represent a FamilyMachining in the treeview.
''' It's an element in the treeview that represent a folder, but also a machining family
'''
Public Class FamilyElementLayerTreeViewItem
Inherits ParentItem
Private m_MachiningType As MCH_MY
'''
''' Property that determines the machining type of the family
'''
Public Property MachiningType As MCH_MY
Get
Return m_MachiningType
End Get
Set(value As MCH_MY)
m_MachiningType = value
End Set
End Property
'''
''' Property that determines if the Machining is selected or not
'''
Public Overrides Property IsSelected As Boolean
Get
Return m_isSelected
End Get
Set(value As Boolean)
If (value <> m_isSelected) Then
m_isSelected = value
End If
End Set
End Property
Public ReadOnly Property sName As String
Get
Return "Prova"
End Get
End Property
'''
''' Constructor that receive the name of the FamilyMachiningTreeViewItem, the MachiningType, and set
''' the picture(Folder.png)
'''
Sub New(Name As String)
MyBase.New(Name)
Me.PictureString = "/Resources/TreeView/Folder.png"
End Sub
End Class
Public Class Element
End Class
Public Class Layer
End Class