a4b5cd4834
- Cambiati nomi classi e file.
99 lines
2.6 KiB
VB.net
99 lines
2.6 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
|
|
Public Class MachiningOpListBoxItem
|
|
Inherits OperationListBoxItem
|
|
|
|
Private m_Status As Boolean
|
|
Public Property Status As Boolean
|
|
Get
|
|
Return m_Status
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_Status Then
|
|
If m_Type = MCH_OY.NONE Or m_Type = MCH_OY.DISP Then
|
|
m_Status = True
|
|
Else
|
|
m_Status = value
|
|
EgtSetOperationMode(Id, m_Status)
|
|
EgtDraw()
|
|
End If
|
|
End If
|
|
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_Info As String
|
|
Public Property Info As String
|
|
Get
|
|
Return m_Info
|
|
End Get
|
|
Set(value As String)
|
|
m_Info = 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
|
|
|
|
Sub New(nId As Integer, bStatus As Boolean, sName As String, nType As Integer, sTool As String, sMach As String)
|
|
m_Id = nId
|
|
Me.Status = bStatus
|
|
Me.Name = sName
|
|
m_Type = nType
|
|
Me.Image = ConvertTypeToImage(Type)
|
|
If Type = MCH_OY.DISP Then
|
|
Me.Info = String.Empty
|
|
Me.Tool = String.Empty
|
|
Else
|
|
Me.Info = "(" & If(Not String.IsNullOrEmpty(sTool), sTool, String.Empty) & ", " &
|
|
If(Not String.IsNullOrEmpty(sMach), sMach, String.Empty) & ")"
|
|
Me.Tool = If(Not String.IsNullOrEmpty(sTool), "(" & sTool & ")", String.Empty)
|
|
End If
|
|
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 MCH_OY.GENMACHINING
|
|
Return ""
|
|
Case MCH_OY.CHISELING
|
|
Return ""
|
|
Case Else
|
|
Return String.Empty
|
|
End Select
|
|
End Function
|
|
|
|
End Class |