2686880dfe
- corretta gestione MRU per '_' - in lista lavorazioni accodato nome lavorazione in libreria.
866 lines
31 KiB
VB.net
866 lines
31 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
|
|
Public Class OperationListBoxItem
|
|
Implements INotifyPropertyChanged
|
|
|
|
Private m_Type As Integer
|
|
Public ReadOnly Property Type As Integer
|
|
Get
|
|
Return m_Type
|
|
End Get
|
|
End Property
|
|
|
|
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_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
|
|
|
|
Public Property Invert As Boolean
|
|
Get
|
|
Dim bInvert As Boolean = False
|
|
EgtGetMachiningParam(MCH_MP.INVERT, bInvert)
|
|
Return bInvert
|
|
End Get
|
|
Set(value As Boolean)
|
|
EgtSetMachiningParam(MCH_MP.INVERT, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Depth As String
|
|
Get
|
|
Dim sDepth As String = String.Empty
|
|
EgtGetMachiningParam(MCH_MP.DEPTH_STR, sDepth)
|
|
Return sDepth
|
|
End Get
|
|
Set(value As String)
|
|
EgtSetMachiningParam(MCH_MP.DEPTH_STR, value)
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox WorkSide
|
|
Private m_HeadSideList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_HS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)), New IdNameStruct(MCH_SAW_HS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
|
|
Public ReadOnly Property HeadSideList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Return m_HeadSideList
|
|
End Get
|
|
End Property
|
|
' Proprietà che indica il WorkSide (MCH_SAW_WS)
|
|
Public Property SelectedHeadSide As Integer
|
|
Get
|
|
Dim nHeadSide As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.HEADSIDE, nHeadSide)
|
|
Return IdNameStruct.SearchToId(nHeadSide, HeadSideList)
|
|
End Get
|
|
Set(value As Integer)
|
|
EgtSetMachiningParam(MCH_MP.HEADSIDE, IdNameStruct.SearchFromId(value, HeadSideList))
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox WorkSide
|
|
Private m_WorkSideList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_WS.CENTER, EgtMsg(MSG_MACHININGSDBPAGE + 120)), New IdNameStruct(MCH_SAW_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)), New IdNameStruct(MCH_SAW_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
|
|
Public ReadOnly Property WorkSideList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Return m_WorkSideList
|
|
End Get
|
|
End Property
|
|
' Proprietà che indica il WorkSide (MCH_SAW_WS)
|
|
Public Property SelectedWorkSide As Integer
|
|
Get
|
|
Dim nWorkSide As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.WORKSIDE, nWorkSide)
|
|
Return IdNameStruct.SearchToId(nWorkSide, WorkSideList)
|
|
End Get
|
|
Set(value As Integer)
|
|
EgtSetMachiningParam(MCH_MP.WORKSIDE, IdNameStruct.SearchFromId(value, WorkSideList))
|
|
End Set
|
|
End Property
|
|
|
|
Public Property UserNotes As String
|
|
Get
|
|
Dim sUserNotes As String = String.Empty
|
|
Dim x = EgtGetMachiningParam(MCH_MP.USERNOTES, sUserNotes)
|
|
Return sUserNotes
|
|
End Get
|
|
Set(value As String)
|
|
EgtSetMachiningParam(MCH_MP.USERNOTES, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property StartPos As String
|
|
Get
|
|
Dim dStartPos As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTPOS, dStartPos)
|
|
Return LenToString(dStartPos, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dStartPos As Double = 0
|
|
StringToLen(value, dStartPos)
|
|
EgtSetMachiningParam(MCH_MP.STARTPOS, dStartPos)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ReturnPos As String
|
|
Get
|
|
Dim dReturnPos As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.RETURNPOS, dReturnPos)
|
|
Return LenToString(dReturnPos, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dReturnPos As Double = 0
|
|
StringToLen(value, dReturnPos)
|
|
EgtSetMachiningParam(MCH_MP.RETURNPOS, dReturnPos)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OverLap As String
|
|
Get
|
|
Dim dOverLap As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.OVERLAP, dOverLap)
|
|
Return LenToString(dOverLap, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dOverLap As Double = 0
|
|
StringToLen(value, dOverLap)
|
|
EgtSetMachiningParam(MCH_MP.OVERLAP, dOverLap)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ThrouAddLen As String
|
|
Get
|
|
Dim dThrouAddLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.THROUADDLEN, dThrouAddLen)
|
|
Return LenToString(dThrouAddLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dThrouAddLen As Double = 0
|
|
StringToLen(value, dThrouAddLen)
|
|
EgtSetMachiningParam(MCH_MP.THROUADDLEN, dThrouAddLen)
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox StepType
|
|
Private m_StepTypeList As ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property StepTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Select Case m_Type
|
|
Case MCH_MY.SAWING
|
|
m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)), New IdNameStruct(MCH_SAW_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143)), New IdNameStruct(MCH_SAW_ST.TOANDFROM, EgtMsg(MSG_MACHININGSDBPAGE + 145))})
|
|
Case MCH_MY.MILLING
|
|
m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_MIL_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)), New IdNameStruct(MCH_MIL_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143)), New IdNameStruct(MCH_MIL_ST.SPIRAL, EgtMsg(MSG_MACHININGSDBPAGE + 144))})
|
|
Case MCH_MY.SAWROUGHING, MCH_MY.SAWFINISHING
|
|
m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWROU_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)), New IdNameStruct(MCH_SAWROU_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143))})
|
|
Case Else
|
|
m_StepTypeList = Nothing
|
|
End Select
|
|
Return m_StepTypeList
|
|
End Get
|
|
End Property
|
|
Private m_StepTypeGetError As Boolean = False
|
|
' Proprietà che indica il StepType
|
|
Public Property SelectedStepType As Integer
|
|
Get
|
|
If Not IsNothing(m_StepTypeList) Then
|
|
Dim nStepType As Integer = 0
|
|
If EgtGetMachiningParam(MCH_MP.STEPTYPE, nStepType) Then
|
|
m_StepTypeGetError = True
|
|
Else
|
|
m_StepTypeGetError = False
|
|
End If
|
|
Return IdNameStruct.SearchToId(nStepType, m_StepTypeList)
|
|
Else
|
|
Return 0
|
|
End If
|
|
End Get
|
|
Set(value As Integer)
|
|
If Not IsNothing(m_StepTypeList) Then
|
|
If m_StepTypeGetError Then
|
|
EgtSetMachiningParam(MCH_MP.STEPTYPE, IdNameStruct.SearchFromId(value, m_StepTypeList))
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property StepPar As String
|
|
Get
|
|
Dim dStepPar As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STEP_, dStepPar)
|
|
Return LenToString(dStepPar, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dStepPar As Double = 0
|
|
StringToLen(value, dStepPar)
|
|
EgtSetMachiningParam(MCH_MP.STEP_, dStepPar)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property StartSlowLen As String
|
|
Get
|
|
Dim dStartSlowLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTSLOWLEN, dStartSlowLen)
|
|
Return LenToString(dStartSlowLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dStartSlowLen As Double = 0
|
|
StringToLen(value, dStartSlowLen)
|
|
EgtSetMachiningParam(MCH_MP.STARTSLOWLEN, dStartSlowLen)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property EndSlowLen As String
|
|
Get
|
|
Dim dEndSlowLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.ENDSLOWLEN, dEndSlowLen)
|
|
Return LenToString(dEndSlowLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dEndSlowLen As Double = 0
|
|
StringToLen(value, dEndSlowLen)
|
|
EgtSetMachiningParam(MCH_MP.ENDSLOWLEN, dEndSlowLen)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SideAngle As String
|
|
Get
|
|
Dim dSideAngle As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.SIDEANGLE, dSideAngle)
|
|
Return LenToString(dSideAngle, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dSideAngle As Double = 0
|
|
StringToLen(value, dSideAngle)
|
|
EgtSetMachiningParam(MCH_MP.SIDEANGLE, dSideAngle)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OffsetSr As String
|
|
Get
|
|
Dim dOffsetSr As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.OFFSR, dOffsetSr)
|
|
Return LenToString(dOffsetSr, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dOffsetSr As Double = 0
|
|
StringToLen(value, dOffsetSr)
|
|
EgtSetMachiningParam(MCH_MP.OFFSR, dOffsetSr)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OffsetSl As String
|
|
Get
|
|
Dim dOffsetSl As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.OFFSL, dOffsetSl)
|
|
Return LenToString(dOffsetSl, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dOffsetSl As Double = 0
|
|
StringToLen(value, dOffsetSl)
|
|
EgtSetMachiningParam(MCH_MP.OFFSL, dOffsetSl)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LeaveTab As Boolean
|
|
Get
|
|
Dim bLeaveTab As Boolean = False
|
|
EgtGetMachiningParam(MCH_MP.LEAVETAB, bLeaveTab)
|
|
Return bLeaveTab
|
|
End Get
|
|
Set(value As Boolean)
|
|
EgtSetMachiningParam(MCH_MP.LEAVETAB, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TabLen As String
|
|
Get
|
|
Dim dTabLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABLEN, dTabLen)
|
|
Return LenToString(dTabLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dTabLen As Double = 0
|
|
StringToLen(value, dTabLen)
|
|
EgtSetMachiningParam(MCH_MP.TABLEN, dTabLen)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TabHeight As String
|
|
Get
|
|
Dim dTabHeight As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABHEIGHT, dTabHeight)
|
|
Return LenToString(dTabHeight, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dTabHeight As Double = 0
|
|
StringToLen(value, dTabHeight)
|
|
EgtSetMachiningParam(MCH_MP.TABHEIGHT, dTabHeight)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TabAngle As String
|
|
Get
|
|
Dim dTabAngle As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABANGLE, dTabAngle)
|
|
Return LenToString(dTabAngle, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dTabAngle As Double = 0
|
|
StringToLen(value, dTabAngle)
|
|
EgtSetMachiningParam(MCH_MP.TABANGLE, dTabAngle)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TabDist As String
|
|
Get
|
|
Dim dTabDist As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABDIST, dTabDist)
|
|
Return LenToString(dTabDist, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dTabDist As Double = 0
|
|
StringToLen(value, dTabDist)
|
|
EgtSetMachiningParam(MCH_MP.TABDIST, dTabDist)
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox LeadInType
|
|
Private m_LeadInTypeList As ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property LeadInTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Select Case m_Type
|
|
Case MCH_MY.SAWING
|
|
m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_LI.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)), New IdNameStruct(MCH_SAW_LI.STRICT, EgtMsg(MSG_MACHININGSDBPAGE + 125)), New IdNameStruct(MCH_SAW_LI.OUT, EgtMsg(MSG_MACHININGSDBPAGE + 126)), New IdNameStruct(MCH_SAW_LI.EXT_CENT, EgtMsg(MSG_MACHININGSDBPAGE + 127)), New IdNameStruct(MCH_SAW_LI.EXT_OUT, EgtMsg(MSG_MACHININGSDBPAGE + 128))})
|
|
Case MCH_MY.MILLING
|
|
m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)), New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)), New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131)), New IdNameStruct(MCH_MIL_LI.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132)), New IdNameStruct(MCH_MIL_LI.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)), New IdNameStruct(MCH_MIL_LI.HELIX, EgtMsg(MSG_MACHININGSDBPAGE + 133))})
|
|
Case Else
|
|
m_LeadInTypeList = Nothing
|
|
End Select
|
|
Return m_LeadInTypeList
|
|
End Get
|
|
End Property
|
|
Private m_LeadInTypeGetError As Boolean = False
|
|
' Proprietà che indica il LeadInType
|
|
Public Property SelectedLeadInType As Integer
|
|
Get
|
|
If Not IsNothing(m_LeadInTypeList) Then
|
|
Dim nLeadInType As Integer = 0
|
|
If EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLeadInType) Then
|
|
m_LeadInTypeGetError = True
|
|
Else
|
|
m_LeadInTypeGetError = False
|
|
End If
|
|
Return IdNameStruct.SearchToId(nLeadInType, m_LeadInTypeList)
|
|
Else
|
|
Return 0
|
|
End If
|
|
End Get
|
|
Set(value As Integer)
|
|
If Not IsNothing(m_LeadInTypeList) Then
|
|
If m_LeadInTypeGetError Then
|
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, IdNameStruct.SearchFromId(value, m_LeadInTypeList))
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property StartAddLen As String
|
|
Get
|
|
Dim dStartAddLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
|
Return LenToString(dStartAddLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dStartAddLen As Double = 0
|
|
StringToLen(value, dStartAddLen)
|
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LiTang As String
|
|
Get
|
|
Dim dLiTang As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LITANG, dLiTang)
|
|
Return LenToString(dLiTang, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLiTang As Double = 0
|
|
StringToLen(value, dLiTang)
|
|
EgtSetMachiningParam(MCH_MP.LITANG, dLiTang)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LiPerp As String
|
|
Get
|
|
Dim dLiPerp As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LIPERP, dLiPerp)
|
|
Return LenToString(dLiPerp, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLiPerp As Double = 0
|
|
StringToLen(value, dLiPerp)
|
|
EgtSetMachiningParam(MCH_MP.LIPERP, dLiPerp)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LiElev As String
|
|
Get
|
|
Dim dLiElev As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LIELEV, dLiElev)
|
|
Return LenToString(dLiElev, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLiElev As Double = 0
|
|
StringToLen(value, dLiElev)
|
|
EgtSetMachiningParam(MCH_MP.LIELEV, dLiElev)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LiCompLen As String
|
|
Get
|
|
Dim dLiCompLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LICOMPLEN, dLiCompLen)
|
|
Return LenToString(dLiCompLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLiCompLen As Double = 0
|
|
StringToLen(value, dLiCompLen)
|
|
EgtSetMachiningParam(MCH_MP.LICOMPLEN, dLiCompLen)
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox LeadOutType
|
|
Private m_LeadOutTypeList As ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property LeadOutTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Select Case m_Type
|
|
Case MCH_MY.SAWING
|
|
m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_LO.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)), New IdNameStruct(MCH_SAW_LO.STRICT, EgtMsg(MSG_MACHININGSDBPAGE + 125)), New IdNameStruct(MCH_SAW_LO.EXT, EgtMsg(MSG_MACHININGSDBPAGE + 123))})
|
|
Case MCH_MY.MILLING
|
|
m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)), New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(MSG_MACHININGSDBPAGE + 130)), New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(MSG_MACHININGSDBPAGE + 131)), New IdNameStruct(MCH_MIL_LO.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132)), New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(MSG_MACHININGSDBPAGE + 137))})
|
|
Case Else
|
|
m_LeadOutTypeList = Nothing
|
|
End Select
|
|
Return m_LeadOutTypeList
|
|
End Get
|
|
End Property
|
|
Private m_LeadOutTypeGetError As Boolean = False
|
|
' Proprietà che indica il LeadOutType
|
|
Public Property SelectedLeadOutType As Integer
|
|
Get
|
|
If Not IsNothing(m_LeadOutTypeList) Then
|
|
Dim nLeadOutType As Integer = 0
|
|
If EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLeadOutType) Then
|
|
m_LeadOutTypeGetError = True
|
|
Else
|
|
m_LeadOutTypeGetError = False
|
|
End If
|
|
Return IdNameStruct.SearchToId(nLeadOutType, m_LeadOutTypeList)
|
|
Else
|
|
Return 0
|
|
End If
|
|
End Get
|
|
Set(value As Integer)
|
|
If Not IsNothing(m_LeadOutTypeList) Then
|
|
If m_LeadOutTypeGetError Then
|
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, IdNameStruct.SearchFromId(value, m_LeadOutTypeList))
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property EndAddLen As String
|
|
Get
|
|
Dim dEndAddLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
|
Return LenToString(dEndAddLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dEndAddLen As Double = 0
|
|
StringToLen(value, dEndAddLen)
|
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LoTang As String
|
|
Get
|
|
Dim dLoTang As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOTANG, dLoTang)
|
|
Return LenToString(dLoTang, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLoTang As Double = 0
|
|
StringToLen(value, dLoTang)
|
|
EgtSetMachiningParam(MCH_MP.LOTANG, dLoTang)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LoPerp As String
|
|
Get
|
|
Dim dLoPerp As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOPERP, dLoPerp)
|
|
Return LenToString(dLoPerp, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLoPerp As Double = 0
|
|
StringToLen(value, dLoPerp)
|
|
EgtSetMachiningParam(MCH_MP.LOPERP, dLoPerp)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LoElev As String
|
|
Get
|
|
Dim dLoElev As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOELEV, dLoElev)
|
|
Return LenToString(dLoElev, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLoElev As Double = 0
|
|
StringToLen(value, dLoElev)
|
|
EgtSetMachiningParam(MCH_MP.LOELEV, dLoElev)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LoCompLen As String
|
|
Get
|
|
Dim dLoCompLen As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOCOMPLEN, dLoCompLen)
|
|
Return LenToString(dLoCompLen, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dLoCompLen As Double = 0
|
|
StringToLen(value, dLoCompLen)
|
|
EgtSetMachiningParam(MCH_MP.LOCOMPLEN, dLoCompLen)
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox ExtLinkType
|
|
Private m_ExtLinkTypeList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_EL.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)), New IdNameStruct(MCH_SAW_EL.EXT_PREV, EgtMsg(MSG_MACHININGSDBPAGE + 134)), New IdNameStruct(MCH_SAW_EL.EXT_NEXT, EgtMsg(MSG_MACHININGSDBPAGE + 135)), New IdNameStruct(MCH_SAW_EL.EXT_BOTH, EgtMsg(MSG_MACHININGSDBPAGE + 136))})
|
|
Public ReadOnly Property ExtLinkTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Return m_ExtLinkTypeList
|
|
End Get
|
|
End Property
|
|
Private m_ExtLinkTypeGetError As Boolean = False
|
|
' Proprietà che indica il ExtLinkType (MCH_SAW_EL)
|
|
Public Property SelectedExtLinkType As Integer
|
|
Get
|
|
If Not IsNothing(m_ExtLinkTypeList) Then
|
|
Dim nExtLinkType As Integer = 0
|
|
If EgtGetMachiningParam(MCH_MP.EXTLINKTYPE, nExtLinkType) Then
|
|
m_ExtLinkTypeGetError = True
|
|
Else
|
|
m_ExtLinkTypeGetError = False
|
|
End If
|
|
Return IdNameStruct.SearchToId(nExtLinkType, m_ExtLinkTypeList)
|
|
Else
|
|
Return 0
|
|
End If
|
|
End Get
|
|
Set(value As Integer)
|
|
If Not IsNothing(m_ExtLinkTypeList) Then
|
|
If m_ExtLinkTypeGetError Then
|
|
EgtSetMachiningParam(MCH_MP.EXTLINKTYPE, IdNameStruct.SearchFromId(value, m_ExtLinkTypeList))
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox CurveUse
|
|
Private m_CurveUseList As New ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property CurveUseList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWINGONARCS, 0, IniFile.m_sCurrMachIniFilePath) <> 0 Then
|
|
m_CurveUseList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_CU.SKIP, EgtMsg(MSG_MACHININGSDBPAGE + 138)), New IdNameStruct(MCH_SAW_CU.APPROX, EgtMsg(MSG_MACHININGSDBPAGE + 139)), New IdNameStruct(MCH_SAW_CU.CONVEX, EgtMsg(MSG_MACHININGSDBPAGE + 140)), New IdNameStruct(MCH_SAW_CU.KEEP, EgtMsg(MSG_MACHININGSDBPAGE + 141))})
|
|
Else
|
|
m_CurveUseList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_CU.SKIP, EgtMsg(MSG_MACHININGSDBPAGE + 138)), New IdNameStruct(MCH_SAW_CU.APPROX, EgtMsg(MSG_MACHININGSDBPAGE + 139)), New IdNameStruct(MCH_SAW_CU.CONVEX, EgtMsg(MSG_MACHININGSDBPAGE + 140))})
|
|
End If
|
|
Return m_CurveUseList
|
|
End Get
|
|
End Property
|
|
Private m_CurveUseGetError As Boolean = False
|
|
' Proprietà che indica il ExtLinkType (MCH_SAW_EL)
|
|
Public Property SelectedCurveUse As Integer
|
|
Get
|
|
If Not IsNothing(m_CurveUseList) Then
|
|
Dim nCurveUse As Integer = 0
|
|
If EgtGetMachiningParam(MCH_MP.CURVEUSE, nCurveUse) Then
|
|
m_CurveUseGetError = True
|
|
Else
|
|
m_CurveUseGetError = False
|
|
End If
|
|
Return IdNameStruct.SearchToId(nCurveUse, m_CurveUseList)
|
|
Else
|
|
Return 0
|
|
End If
|
|
End Get
|
|
Set(value As Integer)
|
|
If Not IsNothing(m_CurveUseList) Then
|
|
If m_CurveUseGetError Then
|
|
EgtSetMachiningParam(MCH_MP.CURVEUSE, IdNameStruct.SearchFromId(value, m_CurveUseList))
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Approx As String
|
|
Get
|
|
Dim dApprox As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.APPROX, dApprox)
|
|
Return LenToString(dApprox, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dApprox As Double = 0
|
|
StringToLen(value, dApprox)
|
|
EgtSetMachiningParam(MCH_MP.APPROX, dApprox)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property StepExtArc As String
|
|
Get
|
|
Dim dStepExtArc As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STEPEXTARC, dStepExtArc)
|
|
Return LenToString(dStepExtArc, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dStepExtArc As Double = 0
|
|
StringToLen(value, dStepExtArc)
|
|
EgtSetMachiningParam(MCH_MP.STEPEXTARC, dStepExtArc)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property StepIntArc As String
|
|
Get
|
|
Dim dStepIntArc As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STEPINTARC, dStepIntArc)
|
|
Return LenToString(dStepIntArc, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dStepIntArc As Double = 0
|
|
StringToLen(value, dStepIntArc)
|
|
EgtSetMachiningParam(MCH_MP.STEPINTARC, dStepIntArc)
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property Speed As String
|
|
Get
|
|
Dim dSpeed As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.SPEED, dSpeed)
|
|
Return LenToString(dSpeed, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dSpeed As Double = 0
|
|
StringToLen(value, dSpeed)
|
|
EgtSetMachiningParam(MCH_MP.SPEED, dSpeed)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Feed As String
|
|
Get
|
|
Dim dFeed As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.FEED, dFeed)
|
|
Return LenToString(dFeed, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dFeed As Double = 0
|
|
StringToLen(value, dFeed)
|
|
EgtSetMachiningParam(MCH_MP.FEED, dFeed)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TipFeed As String
|
|
Get
|
|
Dim dTipFeed As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TIPFEED, dTipFeed)
|
|
Return LenToString(dTipFeed, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dTipFeed As Double = 0
|
|
StringToLen(value, dTipFeed)
|
|
EgtSetMachiningParam(MCH_MP.TIPFEED, dTipFeed)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property StartFeed As String
|
|
Get
|
|
Dim dStartFeed As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTFEED, dStartFeed)
|
|
Return LenToString(dStartFeed, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dStartFeed As Double = 0
|
|
StringToLen(value, dStartFeed)
|
|
EgtSetMachiningParam(MCH_MP.STARTFEED, dStartFeed)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property EndFeed As String
|
|
Get
|
|
Dim dEndFeed As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.ENDFEED, dEndFeed)
|
|
Return LenToString(dEndFeed, 4)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dEndFeed As Double = 0
|
|
StringToLen(value, dEndFeed)
|
|
EgtSetMachiningParam(MCH_MP.ENDFEED, dEndFeed)
|
|
End Set
|
|
End Property
|
|
|
|
Sub New(Id As Integer, Name As String, Type As Integer, Tool As String, Mach As String)
|
|
Me.Id = Id
|
|
Me.Name = Name
|
|
Me.m_Type = Type
|
|
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(Tool), Tool, String.Empty) & ", " &
|
|
If(Not String.IsNullOrEmpty(Mach), Mach, String.Empty) & ")"
|
|
Me.Tool = If(Not String.IsNullOrEmpty(Tool), "(" & Tool & ")", 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 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
|
|
|
|
''' <summary>
|
|
''' Class that represent a Converter that use machining type and param type, to set the visibility state of the param type.
|
|
''' </summary>
|
|
Public Class OperationParamVisibilityConverter
|
|
Implements IValueConverter
|
|
|
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
|
|
Select Case CInt(value)
|
|
Case MCH_OY.NONE
|
|
Return Visibility.Hidden
|
|
Case MCH_OY.DISP
|
|
Return SharedFieldsClass.OperationDisposition(CInt(parameter))
|
|
Case MCH_OY.DRILLING
|
|
Return SharedFieldsClass.Drilling(CInt(parameter))
|
|
Case MCH_OY.SAWING
|
|
Return SharedFieldsClass.Sawing(CInt(parameter))
|
|
Case MCH_OY.MILLING
|
|
Return SharedFieldsClass.Milling(CInt(parameter))
|
|
Case MCH_OY.POCKETING
|
|
Return SharedFieldsClass.Pocketing(CInt(parameter))
|
|
Case MCH_OY.MORTISING
|
|
Return SharedFieldsClass.Mortising(CInt(parameter))
|
|
Case MCH_OY.SAWROUGHING
|
|
Return SharedFieldsClass.Sawroughing(CInt(parameter))
|
|
Case MCH_OY.SAWFINISHING
|
|
Return SharedFieldsClass.Sawfinishing(CInt(parameter))
|
|
Case Else
|
|
Return Visibility.Hidden
|
|
End Select
|
|
End Function
|
|
|
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
|
|
Throw New NotImplementedException
|
|
End Function
|
|
|
|
End Class
|
|
|
|
''' <summary>
|
|
''' Class that represent a Converter that convert mm in inch if necessary for the param depth.
|
|
''' </summary>
|
|
Public Class DepthUnitConverter
|
|
Implements IValueConverter
|
|
|
|
Friend Const INCHTOMM As String = "*25.4"
|
|
Friend Const INCHSYMBOL As String = """"
|
|
|
|
|
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
|
|
If Not IsNothing(value) Then
|
|
If Not IniFile.m_bMmUnits Then
|
|
value = CStr(value).Replace(INCHTOMM, INCHSYMBOL)
|
|
End If
|
|
End If
|
|
Return value
|
|
End Function
|
|
|
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
|
|
If Not IsNothing(value) Then
|
|
If Not IniFile.m_bMmUnits Then
|
|
value = CStr(value).Replace(INCHSYMBOL, INCHTOMM)
|
|
End If
|
|
End If
|
|
Return value
|
|
End Function
|
|
|
|
End Class |