Files
EgtCAM5/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeViewExpander.vb
T
Emmanuele Sassi 45cbfa745f EgtCAM5 :
- Miglioramenti Db utensili.
2016-08-06 20:05:40 +00:00

103 lines
2.7 KiB
VB.net

Imports EgtUILib
''' <summary>
''' 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
''' </summary>
Public Class MachiningTreeViewExpanderItem
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
''' <summary>
''' Property that determines if the Machining is selected or not
''' </summary>
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
#End Region ' Machining Property
#Region "Constructors"
Sub New(Name As String, Type As MCH_MY)
MyBase.New(Name)
Me.m_Type = Type
End Sub
#End Region ' Constructors
End Class
''' <summary>
''' Class that represent a FamilyMachining in the treeview.
''' It's an element in the treeview that represent a folder, but also a machining family
''' </summary>
Public Class FamilyMachiningTreeViewExpanderItem
Inherits ParentItem
Private m_MachiningType As MCH_MY
''' <summary>
''' Property that determines the machining type of the family
''' </summary>
Public Property MachiningType As MCH_MY
Get
Return m_MachiningType
End Get
Set(value As MCH_MY)
m_MachiningType = value
End Set
End Property
''' <summary>
''' Property that determines if the Machining is selected or not
''' </summary>
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
''' <summary>
''' Constructor that receive the name of the FamilyMachiningTreeViewItem, the MachiningType, and set
''' the picture(Folder.png)
''' </summary>
Sub New(Name As String, MachiningType As MCH_MY)
MyBase.New(Name)
Me.MachiningType = MachiningType
Me.PictureString = "/Resources/TreeView/Folder.png"
End Sub
End Class