d2605949d2
- Migliorie varie.
98 lines
2.5 KiB
VB.net
98 lines
2.5 KiB
VB.net
Imports System.ComponentModel
|
|
Imports EgtUILib
|
|
|
|
Public Class OperationListBoxItem
|
|
Implements INotifyPropertyChanged
|
|
|
|
Private m_Id As Integer
|
|
Public Property Id As Integer
|
|
Get
|
|
Return m_Id
|
|
End Get
|
|
Set(value As Integer)
|
|
m_Id = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Name As String
|
|
Public Property Name As String
|
|
Get
|
|
Return m_Name
|
|
End Get
|
|
Set(value As String)
|
|
m_Name = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Image As String
|
|
Public Property Image As String
|
|
Get
|
|
Return m_Image
|
|
End Get
|
|
Set(value As String)
|
|
m_Image = value
|
|
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
|
|
|
|
'Public Property Invert As Boolean
|
|
' Get
|
|
' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
' Dim bInvert As Boolean = False
|
|
' EgtMdbGetCurrMachiningParam(MCH_MP.INVERT, bInvert)
|
|
' Return bInvert
|
|
' End Get
|
|
' Set(value As Boolean)
|
|
' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
' EgtMdbSetCurrMachiningParam(MCH_MP.INVERT, value)
|
|
' End Set
|
|
'End Property
|
|
|
|
|
|
Sub New(Id As Integer, Name As String, Type As Integer, Tool As String)
|
|
Me.Id = Id
|
|
Me.Name = Name
|
|
Me.Image = ConvertTypeToImage(Type)
|
|
Me.Tool = If(Not String.IsNullOrEmpty(Tool), "(" & Tool & ")", String.Empty)
|
|
End Sub
|
|
|
|
Private Function ConvertTypeToImage(Type As Integer) As String
|
|
Select Case Type
|
|
Case MCH_OY.DISP
|
|
Return ""
|
|
Case MCH_OY.DRILLING
|
|
Return ""
|
|
Case MCH_OY.SAWING
|
|
Return ""
|
|
Case MCH_OY.MILLING
|
|
Return ""
|
|
Case MCH_OY.POCKETING
|
|
Return ""
|
|
Case MCH_OY.MORTISING
|
|
Return ""
|
|
Case MCH_OY.SAWROUGHING
|
|
Return ""
|
|
Case MCH_OY.SAWFINISHING
|
|
Return ""
|
|
Case Else
|
|
Return String.Empty
|
|
End Select
|
|
End Function
|
|
|
|
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
|
|
|
Public Sub NotifyPropertyChanged(propName As String)
|
|
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
|
End Sub
|
|
|
|
End Class
|