EgtCAM5 :
- Cambiati nomi classi e file.
This commit is contained in:
+111
@@ -0,0 +1,111 @@
|
||||
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
|
||||
|
||||
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, Type As MCH_MY, Tool As String)
|
||||
MyBase.New(Name)
|
||||
Me.m_Type = Type
|
||||
Me.Tool = If(Not String.IsNullOrEmpty(Tool), "(" & Tool & ")", String.Empty)
|
||||
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
|
||||
Reference in New Issue
Block a user