6dd2abf95d
- Altri nomi modificati. - Eliminato namespace.
2567 lines
102 KiB
VB.net
2567 lines
102 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
|
|
Public Class MachiningParameterExpanderVM
|
|
Implements INotifyPropertyChanged
|
|
|
|
Private m_bUpdating As Boolean = True
|
|
|
|
Private m_Tool As String
|
|
Public ReadOnly Property Tool As String
|
|
Get
|
|
Return m_Tool
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedInvert As Boolean = False
|
|
Private m_Invert As Boolean
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Invert
|
|
''' </summary>
|
|
Public Property Invert As Boolean
|
|
Get
|
|
Return m_Invert
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_Invert Then
|
|
m_Invert = value
|
|
Dim OrigInvert As Boolean = False
|
|
EgtGetMachiningParam(MCH_MP.INVERT, OrigInvert)
|
|
m_IsModifiedInvert = If(value <> OrigInvert, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLeaveTab As Boolean = False
|
|
Private m_LeaveTab As Boolean
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Leave Tab
|
|
''' </summary>
|
|
Public Property LeaveTab As Boolean
|
|
Get
|
|
Return m_LeaveTab
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_LeaveTab Then
|
|
m_LeaveTab = value
|
|
Dim OrigLeaveTab As Boolean = False
|
|
EgtGetMachiningParam(MCH_MP.LEAVETAB, OrigLeaveTab)
|
|
m_IsModifiedLeaveTab = If(value <> OrigLeaveTab, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedToolInvert As Boolean = False
|
|
Private m_ToolInvert As Boolean = False
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Invert
|
|
''' </summary>
|
|
Public Property ToolInvert As Boolean
|
|
Get
|
|
Return m_ToolInvert
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_ToolInvert Then
|
|
m_ToolInvert = value
|
|
Dim OrigToolInvert As Boolean = False
|
|
EgtGetMachiningParam(MCH_MP.TOOLINVERT, OrigToolInvert)
|
|
m_IsModifiedToolInvert = If(value <> OrigToolInvert, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Type As Integer
|
|
''' <summary>
|
|
''' Property that read from the Machining's database the Type
|
|
''' </summary>
|
|
Public ReadOnly Property Type As Integer
|
|
Get
|
|
Return m_Type
|
|
End Get
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox WorkSide
|
|
Private m_WorkSideList As ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property WorkSideList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Select Case m_Type
|
|
Case MCH_MY.MORTISING
|
|
m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_MORTISE_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
|
|
New IdNameStruct(MCH_MORTISE_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
|
|
Case MCH_MY.CHISELING
|
|
m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_CHISEL_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
|
|
New IdNameStruct(MCH_CHISEL_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
|
|
Case Else
|
|
m_WorkSideList = 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))})
|
|
End Select
|
|
Return m_WorkSideList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedSelectedWorkSide As Boolean = False
|
|
Private m_SelectedWorkSide As Integer
|
|
' Proprietà che indica il WorkSide (MCH_SAW_WS)
|
|
Public Property SelectedWorkSide As Integer
|
|
Get
|
|
If IsNothing(WorkSideList) Then Return Nothing
|
|
Return m_SelectedWorkSide
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedWorkSide Then
|
|
If Not IsNothing(WorkSideList) Then
|
|
m_SelectedWorkSide = value
|
|
Dim OrigWorkSide As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.WORKSIDE, OrigWorkSide)
|
|
OrigWorkSide = IdNameStruct.IndFromId(OrigWorkSide, WorkSideList)
|
|
m_IsModifiedSelectedWorkSide = (value <> OrigWorkSide)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox HeadSide
|
|
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
|
|
|
|
Private m_IsModifiedSelectedHeadSide As Boolean = False
|
|
Private m_SelectedHeadSide As Integer
|
|
' Proprietà che indica il HeadSide (MCH_SAW_HS)
|
|
Public Property SelectedHeadSide As Integer
|
|
Get
|
|
If IsNothing(HeadSideList) Then Return Nothing
|
|
Return m_SelectedHeadSide
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedHeadSide Then
|
|
If Not IsNothing(HeadSideList) Then
|
|
m_SelectedHeadSide = value
|
|
Dim OrigHeadSide As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.HEADSIDE, OrigHeadSide)
|
|
OrigHeadSide = IdNameStruct.IndFromId(OrigHeadSide, HeadSideList)
|
|
m_IsModifiedSelectedHeadSide = If(value <> OrigHeadSide, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
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 MCH_MY.POCKETING
|
|
m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
|
|
New IdNameStruct(MCH_POCK_LI.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132)),
|
|
New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
|
|
New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_MACHININGSDBPAGE + 133))})
|
|
Case Else
|
|
m_LeadInTypeList = Nothing
|
|
End Select
|
|
Return m_LeadInTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedSelectedLeadInType As Boolean = False
|
|
Private m_SelectedLeadInType As Integer
|
|
' Proprietà che indica il LeadInType
|
|
Public Property SelectedLeadInType As Integer
|
|
Get
|
|
If IsNothing(LeadInTypeList) Then Return Nothing
|
|
Return IdNameStruct.IdFromInd(m_SelectedLeadInType, LeadInTypeList)
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedLeadInType Then
|
|
If Not IsNothing(LeadInTypeList) Then
|
|
m_SelectedLeadInType = IdNameStruct.IndFromId(value, LeadInTypeList)
|
|
Dim OrigLeadInType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.LEADINTYPE, OrigLeadInType)
|
|
m_IsModifiedSelectedLeadInType = If(value <> OrigLeadInType, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
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_IsModifiedSelectedExtLinkType As Boolean = False
|
|
Private m_SelectedExtLinkType As Integer
|
|
' Proprietà che indica il ExtLinkType (MCH_SAW_EL)
|
|
Public Property SelectedExtLinkType As Integer
|
|
Get
|
|
If IsNothing(ExtLinkTypeList) Then Return Nothing
|
|
Return IdNameStruct.IdFromInd(m_SelectedExtLinkType, ExtLinkTypeList)
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedExtLinkType Then
|
|
If Not IsNothing(ExtLinkTypeList) Then
|
|
m_SelectedExtLinkType = IdNameStruct.IndFromId(value, ExtLinkTypeList)
|
|
Dim OrigExtLinkType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.EXTLINKTYPE, OrigExtLinkType)
|
|
m_IsModifiedSelectedExtLinkType = If(value <> OrigExtLinkType, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
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_CENT, EgtMsg(MSG_MACHININGSDBPAGE + 127)),
|
|
New IdNameStruct(MCH_SAW_LO.OUT, EgtMsg(MSG_MACHININGSDBPAGE + 126)),
|
|
New IdNameStruct(MCH_SAW_LO.EXT_OUT, EgtMsg(MSG_MACHININGSDBPAGE + 128))})
|
|
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 MCH_MY.POCKETING
|
|
m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_POCK_LO.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 129)),
|
|
New IdNameStruct(MCH_POCK_LO.GLIDE, EgtMsg(MSG_MACHININGSDBPAGE + 132))})
|
|
Case Else
|
|
m_LeadOutTypeList = Nothing
|
|
End Select
|
|
Return m_LeadOutTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedSelectedLeadOutType As Boolean = False
|
|
Private m_SelectedLeadOutType As Integer
|
|
' Proprietà che indica il LeadOutType
|
|
Public Property SelectedLeadOutType As Integer
|
|
Get
|
|
If IsNothing(LeadOutTypeList) Then Return Nothing
|
|
Return IdNameStruct.IdFromInd(m_SelectedLeadOutType, LeadOutTypeList)
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedLeadOutType Then
|
|
If Not IsNothing(LeadOutTypeList) Then
|
|
m_SelectedLeadOutType = IdNameStruct.IndFromId(value, LeadOutTypeList)
|
|
Dim OrigLeadOutType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, OrigLeadOutType)
|
|
m_IsModifiedSelectedLeadOutType = If(value <> OrigLeadOutType, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox CurveUse
|
|
Private m_CurveUseList As 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_IsModifiedSelectedCurveUse As Boolean = False
|
|
Private m_SelectedCurveUse As Integer
|
|
' Proprietà che indica il CurveUse (MCH_SAW_CU)
|
|
Public Property SelectedCurveUse As Integer
|
|
Get
|
|
If IsNothing(CurveUseList) Then Return Nothing
|
|
Return IdNameStruct.IdFromInd(m_SelectedCurveUse, CurveUseList)
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedCurveUse Then
|
|
If Not IsNothing(CurveUseList) Then
|
|
m_SelectedCurveUse = IdNameStruct.IndFromId(value, CurveUseList)
|
|
Dim OrigCurveUse As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.CURVEUSE, OrigCurveUse)
|
|
m_IsModifiedSelectedCurveUse = If(value <> OrigCurveUse, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
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.MORTISING
|
|
m_StepTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_MORTISE_ST.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
|
|
New IdNameStruct(MCH_MORTISE_ST.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143))})
|
|
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_IsModifiedSelectedStepType As Boolean = False
|
|
Private m_SelectedStepType As Integer
|
|
' Proprietà che indica lo StepType
|
|
Public Property SelectedStepType As Integer
|
|
Get
|
|
If IsNothing(StepTypeList) Then Return Nothing
|
|
Return IdNameStruct.IdFromInd(m_SelectedStepType, StepTypeList)
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedStepType Then
|
|
If Not IsNothing(StepTypeList) Then
|
|
m_SelectedStepType = value
|
|
Dim OrigStepType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.STEPTYPE, OrigStepType)
|
|
OrigStepType = IdNameStruct.IndFromId(OrigStepType, StepTypeList)
|
|
m_IsModifiedSelectedStepType = (value <> OrigStepType)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox SubType
|
|
Private m_SubTypeList As ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property SubTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Select Case m_Type
|
|
Case MCH_MY.POCKETING
|
|
m_SubTypeList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_POCK_SUB.ZIGZAG, EgtMsg(MSG_MACHININGSDBPAGE + 142)),
|
|
New IdNameStruct(MCH_POCK_SUB.ONEWAY, EgtMsg(MSG_MACHININGSDBPAGE + 143)),
|
|
New IdNameStruct(MCH_POCK_SUB.SPIRALIN, EgtMsg(MSG_MACHININGSDBPAGE + 148)),
|
|
New IdNameStruct(MCH_POCK_SUB.SPIRALOUT, EgtMsg(MSG_MACHININGSDBPAGE + 149))})
|
|
Case MCH_MY.SAWFINISHING
|
|
m_SubTypeList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_SAWFIN_SUB.ALONG, EgtMsg(MSG_MACHININGSDBPAGE + 146)),
|
|
New IdNameStruct(MCH_SAWFIN_SUB.ACROSS, EgtMsg(MSG_MACHININGSDBPAGE + 147))})
|
|
Case MCH_MY.GENMACHINING
|
|
Dim Index = 1
|
|
Dim sGenScript As String = String.Empty
|
|
m_SubTypeList = New ObservableCollection(Of IdNameStruct)
|
|
While EgtUILib.GetPrivateProfileString(S_GENMACHINING, K_GENSCRIPT & Index, "", sGenScript, IniFile.m_sCurrMachIniFilePath) > 0
|
|
m_SubTypeList.Add(New IdNameStruct(Index, sGenScript))
|
|
Index += 1
|
|
End While
|
|
If m_SubTypeList.Count = 0 Then
|
|
m_SubTypeList.Add(New IdNameStruct(0, ""))
|
|
End If
|
|
Case Else
|
|
m_SubTypeList = Nothing
|
|
End Select
|
|
Return m_SubTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedSelectedSubType As Boolean = False
|
|
Private m_SelectedSubType As Integer
|
|
' Proprietà che indica il SubType
|
|
Public Property SelectedSubType As Integer
|
|
Get
|
|
If IsNothing(SubTypeList) Then Return Nothing
|
|
Return m_SelectedSubType
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedSubType Then
|
|
If Not IsNothing(SubTypeList) Then
|
|
m_SelectedSubType = value
|
|
Dim OrigSubType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.SUBTYPE, OrigSubType)
|
|
OrigSubType = IdNameStruct.IndFromId(OrigSubType, SubTypeList)
|
|
m_IsModifiedSelectedSubType = If(value <> OrigSubType, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox LeadLinkType
|
|
Private m_LeadLinkTypeList As ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property LeadLinkTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Select Case m_Type
|
|
Case MCH_MY.SAWROUGHING
|
|
m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWROU_LL.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)), New IdNameStruct(MCH_SAWROU_LL.EXT, EgtMsg(MSG_MACHININGSDBPAGE + 123))})
|
|
Case MCH_MY.SAWFINISHING
|
|
m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWFIN_LL.STD, EgtMsg(MSG_MACHININGSDBPAGE + 124)), New IdNameStruct(MCH_SAWFIN_LL.CENT, EgtMsg(MSG_MACHININGSDBPAGE + 120)), New IdNameStruct(MCH_SAWFIN_LL.EXT, EgtMsg(MSG_MACHININGSDBPAGE + 123))})
|
|
Case Else
|
|
m_LeadLinkTypeList = Nothing
|
|
End Select
|
|
Return m_LeadLinkTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedSelectedLeadLinkType As Boolean = False
|
|
Private m_SelectedLeadLinkType As Integer
|
|
' Proprietà che indica il LeadLinkType
|
|
Public Property SelectedLeadLinkType As Integer
|
|
Get
|
|
If IsNothing(LeadLinkTypeList) Then Return Nothing
|
|
Return IdNameStruct.IdFromInd(m_SelectedLeadLinkType, LeadLinkTypeList)
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedLeadLinkType Then
|
|
If Not IsNothing(LeadLinkTypeList) Then
|
|
m_SelectedLeadLinkType = IdNameStruct.IndFromId(value, LeadLinkTypeList)
|
|
Dim OrigLeadLinkType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.LEADLINKTYPE, OrigLeadLinkType)
|
|
m_IsModifiedSelectedLeadLinkType = If(value <> OrigLeadLinkType, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox FaceUseType
|
|
Private m_FaceUseTypeList As ObservableCollection(Of IdNameStruct)
|
|
Public ReadOnly Property FaceUseTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Select Case m_Type
|
|
Case MCH_MY.MORTISING
|
|
m_FaceUseTypeList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_MIL_FU.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 153)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 154))})
|
|
Case Else
|
|
m_FaceUseTypeList = New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_MIL_FU.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 153)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.PARAL_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 154)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTHO_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTHO_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTHO_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTHO_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTHO_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTHO_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTHO_CONT, EgtMsg(MSG_MACHININGSDBPAGE + 163) & EgtMsg(MSG_MACHININGSDBPAGE + 155)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTUP_DOWN, EgtMsg(MSG_MACHININGSDBPAGE + 157) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTUP_TOP, EgtMsg(MSG_MACHININGSDBPAGE + 158) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTUP_FRONT, EgtMsg(MSG_MACHININGSDBPAGE + 159) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTUP_BACK, EgtMsg(MSG_MACHININGSDBPAGE + 160) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTUP_LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 161) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTUP_RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 162) & EgtMsg(MSG_MACHININGSDBPAGE + 156)),
|
|
New IdNameStruct(MCH_MIL_FU.ORTUP_CONT, EgtMsg(MSG_MACHININGSDBPAGE + 163) & EgtMsg(MSG_MACHININGSDBPAGE + 156))})
|
|
End Select
|
|
Return m_FaceUseTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedSelectedFaceUseType As Boolean = False
|
|
Private m_SelectedFaceUseType As Integer = 0
|
|
|
|
' Proprietà che indica il FaceUseType (MCH_MIL_FU)
|
|
Public Property SelectedFaceUseType As Integer
|
|
Get
|
|
If IsNothing(FaceUseTypeList) Then Return Nothing
|
|
Return m_SelectedFaceUseType
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedFaceUseType Then
|
|
If Not IsNothing(FaceUseTypeList) Then
|
|
m_SelectedFaceUseType = value
|
|
Dim OrigFaceUseType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.FACEUSE, OrigFaceUseType)
|
|
OrigFaceUseType = IdNameStruct.IndFromId(OrigFaceUseType, FaceUseTypeList)
|
|
m_IsModifiedSelectedFaceUseType = If(value <> OrigFaceUseType, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
'ObservableCollection che contiene le variabili per il combobox SolChoiceType
|
|
Private m_SolChoiceTypeList As New ObservableCollection(Of IdNameStruct)(
|
|
{New IdNameStruct(MCH_SCC.NONE, EgtMsg(MSG_MACHININGSDBPAGE + 105)),
|
|
New IdNameStruct(MCH_SCC.STD, EgtMsg(MSG_MACHININGSDBPAGE + 106)),
|
|
New IdNameStruct(MCH_SCC.OPPOSITE, EgtMsg(MSG_MACHININGSDBPAGE + 107)),
|
|
New IdNameStruct(MCH_SCC.ADIR_XP, EgtMsg(MSG_MACHININGSDBPAGE + 108)),
|
|
New IdNameStruct(MCH_SCC.ADIR_XM, EgtMsg(MSG_MACHININGSDBPAGE + 109)),
|
|
New IdNameStruct(MCH_SCC.ADIR_YP, EgtMsg(MSG_MACHININGSDBPAGE + 110)),
|
|
New IdNameStruct(MCH_SCC.ADIR_YM, EgtMsg(MSG_MACHININGSDBPAGE + 111)),
|
|
New IdNameStruct(MCH_SCC.ADIR_ZP, EgtMsg(MSG_MACHININGSDBPAGE + 112)),
|
|
New IdNameStruct(MCH_SCC.ADIR_ZM, EgtMsg(MSG_MACHININGSDBPAGE + 113)),
|
|
New IdNameStruct(MCH_SCC.ADIR_NEAR, EgtMsg(MSG_MACHININGSDBPAGE + 114)),
|
|
New IdNameStruct(MCH_SCC.ADIR_FAR, EgtMsg(MSG_MACHININGSDBPAGE + 115))})
|
|
Public ReadOnly Property SolChoiceTypeList As ObservableCollection(Of IdNameStruct)
|
|
Get
|
|
Return m_SolChoiceTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsModifiedSelectedSolChoiceType As Boolean = False
|
|
Private m_SelectedSolChoiceType As Integer
|
|
' Proprietà che indica il SolChoiceType (MCH_SCC)
|
|
Public Property SelectedSolChoiceType As Integer
|
|
Get
|
|
If IsNothing(SolChoiceTypeList) Then Return Nothing
|
|
Return m_SelectedSolChoiceType
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> m_SelectedSolChoiceType Then
|
|
If Not IsNothing(SolChoiceTypeList) Then
|
|
m_SelectedSolChoiceType = value
|
|
Dim OrigSolChoiceType As Integer = 0
|
|
EgtGetMachiningParam(MCH_MP.SOLCHOICETYPE, OrigSolChoiceType)
|
|
OrigSolChoiceType = IdNameStruct.IndFromId(OrigSolChoiceType, SolChoiceTypeList)
|
|
m_IsModifiedSelectedSolChoiceType = If(value <> OrigSolChoiceType, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedSpeed As Boolean = False
|
|
Private m_Speed As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Speed
|
|
''' </summary>
|
|
Public Property Speed As String
|
|
Get
|
|
Return m_Speed
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_Speed Then
|
|
m_Speed = value
|
|
Dim OrigSpeed As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.SPEED, OrigSpeed)
|
|
StringToDouble(value, dValue)
|
|
m_IsModifiedSpeed = Math.Abs(dValue - OrigSpeed) > 10 * EPS_ANG_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedFeed As Boolean = False
|
|
Private m_Feed As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Feed
|
|
''' </summary>
|
|
Public Property Feed As String
|
|
Get
|
|
Return m_Feed
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_Feed Then
|
|
m_Feed = value
|
|
Dim OrigFeed As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.FEED, OrigFeed)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedFeed = Math.Abs(dValue - OrigFeed) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedStartFeed As Boolean = False
|
|
Private m_StartFeed As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Feed
|
|
''' </summary>
|
|
Public Property StartFeed As String
|
|
Get
|
|
Return m_StartFeed
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_StartFeed Then
|
|
m_StartFeed = value
|
|
Dim OrigStartFeed As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTFEED, OrigStartFeed)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedStartFeed = Math.Abs(dValue - OrigStartFeed) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedEndFeed As Boolean = False
|
|
Private m_EndFeed As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the End Feed
|
|
''' </summary>
|
|
Public Property EndFeed As String
|
|
Get
|
|
Return m_EndFeed
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_EndFeed Then
|
|
m_EndFeed = value
|
|
Dim OrigEndFeed As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.ENDFEED, OrigEndFeed)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedEndFeed = Math.Abs(dValue - OrigEndFeed) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedTipFeed As Boolean = False
|
|
Private m_TipFeed As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tip Feed
|
|
''' </summary>
|
|
Public Property TipFeed As String
|
|
Get
|
|
Return m_TipFeed
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_TipFeed Then
|
|
m_TipFeed = value
|
|
Dim OrigTipFeed As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TIPFEED, OrigTipFeed)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedTipFeed = Math.Abs(dValue - OrigTipFeed) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedOffSr As Boolean = False
|
|
Private m_OffSr As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Offset Sr
|
|
''' </summary>
|
|
Public Property OffSr As String
|
|
Get
|
|
Return m_OffSr
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_OffSr Then
|
|
m_OffSr = value
|
|
Dim OrigOffSr As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.OFFSR, OrigOffSr)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedOffSr = Math.Abs(dValue - OrigOffSr) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedOffSl As Boolean = False
|
|
Private m_OffSl As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Offset Sl
|
|
''' </summary>
|
|
Public Property OffSl As String
|
|
Get
|
|
Return m_OffSl
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_OffSl Then
|
|
m_OffSl = value
|
|
Dim OrigOffSl As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.OFFSL, OrigOffSl)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedOffSl = Math.Abs(dValue - OrigOffSl) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedSideAngle As Boolean = False
|
|
Private m_SideAngle As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Side Angle
|
|
''' </summary>
|
|
Public Property SideAngle As String
|
|
Get
|
|
Return m_SideAngle
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_SideAngle Then
|
|
m_SideAngle = value
|
|
Dim OrigSideAngle As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.SIDEANGLE, OrigSideAngle)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedSideAngle = Math.Abs(dValue - OrigSideAngle) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedApprox As Boolean = False
|
|
Private m_Approx As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Approx
|
|
''' </summary>
|
|
Public Property Approx As String
|
|
Get
|
|
Return m_Approx
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_Approx Then
|
|
m_Approx = value
|
|
Dim OrigApprox As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.APPROX, OrigApprox)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedApprox = Math.Abs(dValue - OrigApprox) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedStartPos As Boolean = False
|
|
Private m_StartPos As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Position
|
|
''' </summary>
|
|
Public Property StartPos As String
|
|
Get
|
|
Return m_StartPos
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_StartPos Then
|
|
m_StartPos = value
|
|
Dim OrigStartPos As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTPOS, OrigStartPos)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedStartPos = Math.Abs(dValue - OrigStartPos) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedStartSlowLen As Boolean = False
|
|
Private m_StartSlowLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Slow Len
|
|
''' </summary>
|
|
Public Property StartSlowLen As String
|
|
Get
|
|
Return m_StartSlowLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_StartSlowLen Then
|
|
m_StartSlowLen = value
|
|
Dim OrigStartSlowLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTSLOWLEN, OrigStartSlowLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedStartSlowLen = Math.Abs(dValue - OrigStartSlowLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedEndSlowLen As Boolean = False
|
|
Private m_EndSlowLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the End Slow Len
|
|
''' </summary>
|
|
Public Property EndSlowLen As String
|
|
Get
|
|
Return m_EndSlowLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_EndSlowLen Then
|
|
m_EndSlowLen = value
|
|
Dim OrigEndSlowLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.ENDSLOWLEN, OrigEndSlowLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedEndSlowLen = Math.Abs(dValue - OrigEndSlowLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedThrouAddLen As Boolean = False
|
|
Private m_ThrouAddLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Throu Add Len
|
|
''' </summary>
|
|
Public Property ThrouAddLen As String
|
|
Get
|
|
Return m_ThrouAddLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_ThrouAddLen Then
|
|
m_ThrouAddLen = value
|
|
Dim OrigThrouAddLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.THROUADDLEN, OrigThrouAddLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedThrouAddLen = Math.Abs(dValue - OrigThrouAddLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedStepPar As Boolean = False
|
|
Private m_StepPar As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Step Par
|
|
''' </summary>
|
|
Public Property StepPar As String
|
|
Get
|
|
Return m_StepPar
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_StepPar Then
|
|
m_StepPar = value
|
|
Dim OrigStepPar As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STEP_, OrigStepPar)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedStepPar = Math.Abs(dValue - OrigStepPar) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedReturnPos As Boolean = False
|
|
Private m_ReturnPos As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Return Position
|
|
''' </summary>
|
|
Public Property ReturnPos As String
|
|
Get
|
|
Return m_ReturnPos
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_ReturnPos Then
|
|
m_ReturnPos = value
|
|
Dim OrigReturnPos As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.RETURNPOS, OrigReturnPos)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedReturnPos = Math.Abs(dValue - OrigReturnPos) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedOverLap As Boolean = False
|
|
Private m_OverLap As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Over Lap Str
|
|
''' </summary>
|
|
Public Property OverLap As String
|
|
Get
|
|
Return m_OverLap
|
|
End Get
|
|
Set(value As String)
|
|
If value = String.Empty Or value <> m_OverLap Then
|
|
m_OverLap = value
|
|
Dim OrigOverLap As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.OVERL, OrigOverLap)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedOverLap = Math.Abs(dValue - OrigOverLap) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedTabLen As Boolean = False
|
|
Private m_TabLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Len
|
|
''' </summary>
|
|
Public Property TabLen As String
|
|
Get
|
|
Return m_TabLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_TabLen Then
|
|
m_TabLen = value
|
|
Dim OrigTabLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABLEN, OrigTabLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedTabLen = Math.Abs(dValue - OrigTabLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedTabDist As Boolean = False
|
|
Private m_TabDist As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Dist
|
|
''' </summary>
|
|
Public Property TabDist As String
|
|
Get
|
|
Return m_TabDist
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_TabDist Then
|
|
m_TabDist = value
|
|
Dim OrigTabDist As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABDIST, OrigTabDist)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedTabDist = Math.Abs(dValue - OrigTabDist) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedTabHeight As Boolean = False
|
|
Private m_TabHeight As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Height
|
|
''' </summary>
|
|
Public Property TabHeight As String
|
|
Get
|
|
Return m_TabHeight
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_TabHeight Then
|
|
m_TabHeight = value
|
|
Dim OrigTabHeight As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABHEIGHT, OrigTabHeight)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedTabHeight = Math.Abs(dValue - OrigTabHeight) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedTabAngle As Boolean = False
|
|
Private m_TabAngle As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Angle
|
|
''' </summary>
|
|
Public Property TabAngle As String
|
|
Get
|
|
Return m_TabAngle
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_TabAngle Then
|
|
m_TabAngle = value
|
|
Dim OrigTabAngle As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TABANGLE, OrigTabAngle)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedTabAngle = Math.Abs(dValue - OrigTabAngle) > 10 * EPS_ANG_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLiTang As Boolean = False
|
|
Private m_LiTang As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Tang
|
|
''' </summary>
|
|
Public Property LiTang As String
|
|
Get
|
|
Return m_LiTang
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LiTang Then
|
|
m_LiTang = value
|
|
Dim OrigLiTang As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LITANG, OrigLiTang)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLiTang = Math.Abs(dValue - OrigLiTang) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLiPerp As Boolean = False
|
|
Private m_LiPerp As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Perp
|
|
''' </summary>
|
|
Public Property LiPerp As String
|
|
Get
|
|
Return m_LiPerp
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LiPerp Then
|
|
m_LiPerp = value
|
|
Dim OrigLiPerp As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LIPERP, OrigLiPerp)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLiPerp = Math.Abs(dValue - OrigLiPerp) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLiElev As Boolean = False
|
|
Private m_LiElev As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Elev
|
|
''' </summary>
|
|
Public Property LiElev As String
|
|
Get
|
|
Return m_LiElev
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LiElev Then
|
|
m_LiElev = value
|
|
Dim OrigLiElev As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LIELEV, OrigLiElev)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLiElev = Math.Abs(dValue - OrigLiElev) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLiCompLen As Boolean = False
|
|
Private m_LiCompLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Comp Len
|
|
''' </summary>
|
|
Public Property LiCompLen As String
|
|
Get
|
|
Return m_LiCompLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LiCompLen Then
|
|
m_LiCompLen = value
|
|
Dim OrigLiCompLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LICOMPLEN, OrigLiCompLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLiCompLen = Math.Abs(dValue - OrigLiCompLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLoTang As Boolean = False
|
|
Private m_LoTang As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Tang
|
|
''' </summary>
|
|
Public Property LoTang As String
|
|
Get
|
|
Return m_LoTang
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LoTang Then
|
|
m_LoTang = value
|
|
Dim OrigLoTang As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOTANG, OrigLoTang)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLoTang = Math.Abs(dValue - OrigLoTang) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLoPerp As Boolean = False
|
|
Private m_LoPerp As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Perp
|
|
''' </summary>
|
|
Public Property LoPerp As String
|
|
Get
|
|
Return m_LoPerp
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LoPerp Then
|
|
m_LoPerp = value
|
|
Dim OrigLoPerp As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOPERP, OrigLoPerp)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLoPerp = Math.Abs(dValue - OrigLoPerp) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLoElev As Boolean = False
|
|
Private m_LoElev As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Elev
|
|
''' </summary>
|
|
Public Property LoElev As String
|
|
Get
|
|
Return m_LoElev
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LoElev Then
|
|
m_LoElev = value
|
|
Dim OrigLoElev As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOELEV, OrigLoElev)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLoElev = Math.Abs(dValue - OrigLoElev) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedLoCompLen As Boolean = False
|
|
Private m_LoCompLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Comp Len
|
|
''' </summary>
|
|
Public Property LoCompLen As String
|
|
Get
|
|
Return m_LoCompLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_LoCompLen Then
|
|
m_LoCompLen = value
|
|
Dim OrigLoCompLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.LOCOMPLEN, OrigLoCompLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedLoCompLen = Math.Abs(dValue - OrigLoCompLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedStartAddLen As Boolean = False
|
|
Private m_StartAddLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Add Len
|
|
''' </summary>
|
|
Public Property StartAddLen As String
|
|
Get
|
|
Return m_StartAddLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_StartAddLen Then
|
|
m_StartAddLen = value
|
|
Dim OrigStartAddLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, OrigStartAddLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedStartAddLen = Math.Abs(dValue - OrigStartAddLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedEndAddLen As Boolean = False
|
|
Private m_EndAddLen As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the End Add Len
|
|
''' </summary>
|
|
Public Property EndAddLen As String
|
|
Get
|
|
Return m_EndAddLen
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_EndAddLen Then
|
|
m_EndAddLen = value
|
|
Dim OrigEndAddLen As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, OrigEndAddLen)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedEndAddLen = Math.Abs(dValue - OrigEndAddLen) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedStepExtArc As Boolean = False
|
|
Private m_StepExtArc As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Step Ext Arc
|
|
''' </summary>
|
|
Public Property StepExtArc As String
|
|
Get
|
|
Return m_StepExtArc
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_StepExtArc Then
|
|
m_StepExtArc = value
|
|
Dim OrigStepExtArc As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STEPEXTARC, OrigStepExtArc)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedStepExtArc = Math.Abs(dValue - OrigStepExtArc) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedStepIntArc As Boolean = False
|
|
Private m_StepIntArc As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Step Int Arc
|
|
''' </summary>
|
|
Public Property StepIntArc As String
|
|
Get
|
|
Return m_StepIntArc
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_StepIntArc Then
|
|
m_StepIntArc = value
|
|
Dim OrigStepIntArc As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.STEPINTARC, OrigStepIntArc)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedStepIntArc = Math.Abs(dValue - OrigStepIntArc) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedSideStep As Boolean = False
|
|
Private m_SideStep As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Side Step
|
|
''' </summary>
|
|
Public Property SideStep As String
|
|
Get
|
|
Return m_SideStep
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_SideStep Then
|
|
m_SideStep = value
|
|
Dim OrigSideStep As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.SIDESTEP, OrigSideStep)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedSideStep = Math.Abs(dValue - OrigSideStep) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedVertFeed As Boolean = False
|
|
Private m_VertFeed As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Vert Feed
|
|
''' </summary>
|
|
Public Property VertFeed As String
|
|
Get
|
|
Return m_VertFeed
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_VertFeed Then
|
|
m_VertFeed = value
|
|
Dim OrigVertFeed As Double = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.VERTFEED, OrigVertFeed)
|
|
StringToLen(value, dValue)
|
|
m_IsModifiedVertFeed = Math.Abs(dValue - OrigVertFeed) > 10 * EPS_SMALL
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedDepthStr As Boolean = False
|
|
Private m_DepthStr As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Depth Str
|
|
''' </summary>
|
|
Public Property DepthStr As String
|
|
Get
|
|
Return m_DepthStr
|
|
End Get
|
|
Set(value As String)
|
|
If value = String.Empty Or value <> m_DepthStr Then
|
|
m_DepthStr = value
|
|
Dim DbDepthStr As String = String.Empty
|
|
EgtGetMachiningParam(MCH_MP.DEPTH_STR, DbDepthStr)
|
|
m_IsModifiedDepthStr = If(value <> DbDepthStr, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedUserNotes As Boolean = False
|
|
Private m_UserNotes As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the User Notes
|
|
''' </summary>
|
|
Public Property UserNotes As String
|
|
Get
|
|
Return m_UserNotes
|
|
End Get
|
|
Set(value As String)
|
|
If value = String.Empty Or value <> m_UserNotes Then
|
|
m_UserNotes = value
|
|
Dim OrigUserNotes As String = String.Empty
|
|
EgtGetMachiningParam(MCH_MP.USERNOTES, OrigUserNotes)
|
|
m_IsModifiedUserNotes = If(value <> OrigUserNotes, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedInitAngs As Boolean = False
|
|
Private m_InitAngs As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Initial Angles
|
|
''' </summary>
|
|
Public Property InitAngs As String
|
|
Get
|
|
Return m_InitAngs
|
|
End Get
|
|
Set(value As String)
|
|
If value = String.Empty Or value <> m_InitAngs Then
|
|
m_InitAngs = value
|
|
Dim OrigInitAngs As String = String.Empty
|
|
EgtGetMachiningParam(MCH_MP.INITANGS, OrigInitAngs)
|
|
m_IsModifiedInitAngs = If(value <> OrigInitAngs, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsModifiedBlockedAxis As Boolean = False
|
|
Private m_BlockedAxis As String
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Initial Angles
|
|
''' </summary>
|
|
Public Property BlockedAxis As String
|
|
Get
|
|
Return m_BlockedAxis
|
|
End Get
|
|
Set(value As String)
|
|
If value = String.Empty Or value <> m_BlockedAxis Then
|
|
m_BlockedAxis = value
|
|
Dim OrigBlockedAxis As String = String.Empty
|
|
EgtGetMachiningParam(MCH_MP.BLOCKEDAXIS, OrigBlockedAxis)
|
|
m_IsModifiedBlockedAxis = If(value <> OrigBlockedAxis, True, False)
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_UpdateMachiningBtnIsEnabled As Boolean
|
|
Public ReadOnly Property UpdateMachiningBtnIsEnabled As Boolean
|
|
Get
|
|
Return m_IsModifiedInvert OrElse m_IsModifiedSelectedWorkSide OrElse m_IsModifiedSelectedHeadSide OrElse m_IsModifiedSelectedLeadInType OrElse m_IsModifiedSelectedExtLinkType _
|
|
OrElse m_IsModifiedSelectedLeadOutType OrElse m_IsModifiedSelectedCurveUse OrElse m_IsModifiedSelectedStepType OrElse m_IsModifiedSelectedSubType OrElse m_IsModifiedSelectedLeadLinkType _
|
|
OrElse m_IsModifiedSpeed OrElse m_IsModifiedFeed OrElse m_IsModifiedStartFeed OrElse m_IsModifiedEndFeed OrElse m_IsModifiedTipFeed OrElse m_IsModifiedOffSr OrElse m_IsModifiedOffSl _
|
|
OrElse m_IsModifiedSideAngle OrElse m_IsModifiedApprox OrElse m_IsModifiedStartPos OrElse m_IsModifiedStartSlowLen OrElse m_IsModifiedEndSlowLen OrElse m_IsModifiedThrouAddLen _
|
|
OrElse m_IsModifiedStepPar OrElse m_IsModifiedReturnPos OrElse m_IsModifiedOverLap OrElse m_IsModifiedTabLen OrElse m_IsModifiedTabDist OrElse m_IsModifiedTabHeight _
|
|
OrElse m_IsModifiedTabAngle OrElse m_IsModifiedLiTang OrElse m_IsModifiedLiPerp OrElse m_IsModifiedLiElev OrElse m_IsModifiedLiCompLen OrElse m_IsModifiedLoTang OrElse m_IsModifiedLoPerp _
|
|
OrElse m_IsModifiedLoElev OrElse m_IsModifiedLoCompLen OrElse m_IsModifiedStartAddLen OrElse m_IsModifiedEndAddLen OrElse m_IsModifiedStepExtArc OrElse m_IsModifiedStepIntArc _
|
|
OrElse m_IsModifiedSideStep OrElse m_IsModifiedVertFeed OrElse m_IsModifiedDepthStr OrElse m_IsModifiedUserNotes
|
|
End Get
|
|
End Property
|
|
|
|
Private m_bPreviewTool As Boolean = False
|
|
Private m_nPtEntId As Integer = GDB_ID.NULL
|
|
Public Property ViewTool As Boolean
|
|
Get
|
|
Return m_bPreviewTool
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value Then
|
|
EgtPreparePreviewMachiningTool()
|
|
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
|
|
m_bPreviewTool = True
|
|
Else
|
|
EgtRemovePreviewMachiningTool()
|
|
m_bPreviewTool = False
|
|
End If
|
|
EgtDraw()
|
|
NotifyPropertyChanged("ViewTool")
|
|
End Set
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property InvertMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 51)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DepthMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 99)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property HeadSideMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 55)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property WorkSideMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 54)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property UserNotesMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 100)
|
|
End Get
|
|
End Property
|
|
|
|
Private m_UserNotesTooltip As String
|
|
Public ReadOnly Property UserNotesTooltip As String
|
|
Get
|
|
Return UserNotes
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StartPosMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 73)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ReturnPosMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 78)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OverLapMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 101)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ThrouAddLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 76)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StepTypeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 60)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SubTypeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 103)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StepParMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 77)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SideStepMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 95)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StartSlowLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 74)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property EndSlowLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 75)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SideAngleMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 71)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OffsetSrMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 68)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OffsetSlMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 69)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property AdvancedParamMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 150)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property InvertToolDirMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 151)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property FaceUseTypeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 152)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property InitAngsMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 164)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property BlockedAxisMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 165)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SolChoiceTypeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 104)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LeadInTypeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 56)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StartAddLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 91)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LiTangMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 83)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LiPerpMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 84)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LiElevMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 85)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LiCompLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 86)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LeadOutTypeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 58)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property EndAddLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 92)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LoTangMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 87)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LoPerpMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 88)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LoElevMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 89)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LoCompLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 90)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ExtLinkTypeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 57)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LeaveTabMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 52)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TabLenMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 79)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TabHeightMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 80)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TabAngleMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 81)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TabDistMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 82)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CurveUseMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 59)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ApproxMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 72)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StepExtArcMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 93)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StepIntArcMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 94)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SpeedMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 63)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property FeedMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 64)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TipFeedMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 67)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StartFeedMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 65)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property EndFeedMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 66)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OperationListHeader As String
|
|
Get
|
|
Return EgtMsg(MSG_OPERATION + 1) 'Lista Operazioni
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property UpdateMachiningBtnMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPERATION + 3) 'Applica Lavorazione
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property GenericExpanderHeader As String
|
|
Get
|
|
Return EgtMsg(MSG_OPERATION + 7) 'Generici
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ToolExpanderHeader As String
|
|
Get
|
|
Return EgtMsg(MSG_MACHININGSDBPAGE + 98) & " (" & m_Tool & ")"
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ViewToolBtnMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPERATION + 13) 'Anteprima Utensile
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property NextStepToolBtnMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPERATION + 14) 'Avanti
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property PrevStepToolBtnMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPERATION + 15) 'Indietro
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Messages
|
|
|
|
#Region "METHODS"
|
|
|
|
Private Sub ReadMachiningParam()
|
|
Dim nValue As Integer = 0
|
|
Dim dValue As Double = 0
|
|
EgtGetMachiningParam(MCH_MP.TYPE, m_Type)
|
|
NotifyPropertyChanged("Type")
|
|
EgtGetMachiningParam(MCH_MP.INVERT, m_Invert)
|
|
NotifyPropertyChanged("Invert")
|
|
m_IsModifiedInvert = False
|
|
EgtGetMachiningParam(MCH_MP.LEAVETAB, m_LeaveTab)
|
|
NotifyPropertyChanged("LeaveTab")
|
|
m_IsModifiedLeaveTab = False
|
|
EgtGetMachiningParam(MCH_MP.TOOLINVERT, m_ToolInvert)
|
|
NotifyPropertyChanged("ToolInvert")
|
|
m_IsModifiedToolInvert = False
|
|
NotifyPropertyChanged("WorkSideList")
|
|
EgtGetMachiningParam(MCH_MP.WORKSIDE, nValue)
|
|
m_SelectedWorkSide = If(IsNothing(WorkSideList), nValue, IdNameStruct.IndFromId(nValue, WorkSideList))
|
|
NotifyPropertyChanged("SelectedWorkSide")
|
|
m_IsModifiedSelectedWorkSide = False
|
|
EgtGetMachiningParam(MCH_MP.HEADSIDE, nValue)
|
|
m_SelectedHeadSide = If(IsNothing(HeadSideList), nValue, IdNameStruct.IndFromId(nValue, HeadSideList))
|
|
NotifyPropertyChanged("SelectedHeadSide")
|
|
m_IsModifiedSelectedHeadSide = False
|
|
NotifyPropertyChanged("LeadInTypeList")
|
|
EgtGetMachiningParam(MCH_MP.LEADINTYPE, m_SelectedLeadInType)
|
|
NotifyPropertyChanged("SelectedLeadInType")
|
|
m_IsModifiedSelectedLeadInType = False
|
|
EgtGetMachiningParam(MCH_MP.EXTLINKTYPE, m_SelectedExtLinkType)
|
|
NotifyPropertyChanged("SelectedExtLinkType")
|
|
m_IsModifiedSelectedExtLinkType = False
|
|
NotifyPropertyChanged("LeadOutTypeList")
|
|
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, m_SelectedLeadOutType)
|
|
NotifyPropertyChanged("SelectedLeadOutType")
|
|
m_IsModifiedSelectedLeadOutType = False
|
|
NotifyPropertyChanged("CurveUseList")
|
|
EgtGetMachiningParam(MCH_MP.CURVEUSE, m_SelectedCurveUse)
|
|
NotifyPropertyChanged("SelectedCurveUse")
|
|
m_IsModifiedSelectedCurveUse = False
|
|
NotifyPropertyChanged("StepTypeList")
|
|
EgtGetMachiningParam(MCH_MP.STEPTYPE, nValue)
|
|
m_SelectedStepType = If(IsNothing(StepTypeList), nValue, IdNameStruct.IndFromId(nValue, StepTypeList))
|
|
NotifyPropertyChanged("SelectedStepType")
|
|
m_IsModifiedSelectedStepType = False
|
|
NotifyPropertyChanged("SubTypeList")
|
|
EgtGetMachiningParam(MCH_MP.SUBTYPE, nValue)
|
|
m_SelectedSubType = If(IsNothing(SubTypeList), nValue, IdNameStruct.IndFromId(nValue, SubTypeList))
|
|
NotifyPropertyChanged("SelectedSubType")
|
|
m_IsModifiedSelectedSubType = False
|
|
NotifyPropertyChanged("LeadLinkTypeList")
|
|
EgtGetMachiningParam(MCH_MP.LEADLINKTYPE, m_SelectedLeadLinkType)
|
|
NotifyPropertyChanged("SelectedLeadLinkType")
|
|
m_IsModifiedSelectedLeadLinkType = False
|
|
NotifyPropertyChanged("FaceUseTypeList")
|
|
EgtGetMachiningParam(MCH_MP.FACEUSE, nValue)
|
|
m_SelectedFaceUseType = If(IsNothing(FaceUseTypeList), nValue, IdNameStruct.IndFromId(nValue, FaceUseTypeList))
|
|
NotifyPropertyChanged("SelectedFaceUseType")
|
|
m_IsModifiedSelectedFaceUseType = False
|
|
NotifyPropertyChanged("SolChoiceTypeList")
|
|
EgtGetMachiningParam(MCH_MP.SOLCHOICETYPE, nValue)
|
|
m_SelectedSolChoiceType = If(IsNothing(SolChoiceTypeList), nValue, IdNameStruct.IndFromId(nValue, SolChoiceTypeList))
|
|
NotifyPropertyChanged("SelectedSolChoiceType")
|
|
m_IsModifiedSelectedSolChoiceType = False
|
|
EgtGetMachiningParam(MCH_MP.SPEED, dValue)
|
|
m_Speed = DoubleToString(dValue, 4)
|
|
NotifyPropertyChanged("Speed")
|
|
m_IsModifiedSpeed = False
|
|
EgtGetMachiningParam(MCH_MP.FEED, dValue)
|
|
m_Feed = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("Feed")
|
|
m_IsModifiedFeed = False
|
|
EgtGetMachiningParam(MCH_MP.STARTFEED, dValue)
|
|
m_StartFeed = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StartFeed")
|
|
m_IsModifiedStartFeed = False
|
|
EgtGetMachiningParam(MCH_MP.ENDFEED, dValue)
|
|
m_EndFeed = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("EndFeed")
|
|
m_IsModifiedEndFeed = False
|
|
EgtGetMachiningParam(MCH_MP.TIPFEED, dValue)
|
|
m_TipFeed = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("TipFeed")
|
|
m_IsModifiedTipFeed = False
|
|
EgtGetMachiningParam(MCH_MP.OFFSR, dValue)
|
|
m_OffSr = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("OffSr")
|
|
m_IsModifiedOffSr = False
|
|
EgtGetMachiningParam(MCH_MP.OFFSL, dValue)
|
|
m_OffSl = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("OffSl")
|
|
m_IsModifiedOffSl = False
|
|
EgtGetMachiningParam(MCH_MP.SIDEANGLE, dValue)
|
|
m_SideAngle = DoubleToString(dValue, 4)
|
|
NotifyPropertyChanged("SideAngle")
|
|
m_IsModifiedSideAngle = False
|
|
EgtGetMachiningParam(MCH_MP.APPROX, dValue)
|
|
m_Approx = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("Approx")
|
|
m_IsModifiedApprox = False
|
|
EgtGetMachiningParam(MCH_MP.STARTPOS, dValue)
|
|
m_StartPos = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StartPos")
|
|
m_IsModifiedStartPos = False
|
|
EgtGetMachiningParam(MCH_MP.STARTSLOWLEN, dValue)
|
|
m_StartSlowLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StartSlowLen")
|
|
m_IsModifiedStartSlowLen = False
|
|
EgtGetMachiningParam(MCH_MP.ENDSLOWLEN, dValue)
|
|
m_EndSlowLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("EndSlowLen")
|
|
m_IsModifiedEndSlowLen = False
|
|
EgtGetMachiningParam(MCH_MP.THROUADDLEN, dValue)
|
|
m_ThrouAddLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("ThrouAddLen")
|
|
m_IsModifiedThrouAddLen = False
|
|
EgtGetMachiningParam(MCH_MP.STEP_, dValue)
|
|
m_StepPar = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StepPar")
|
|
m_IsModifiedStepPar = False
|
|
EgtGetMachiningParam(MCH_MP.RETURNPOS, dValue)
|
|
m_ReturnPos = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("ReturnPos")
|
|
m_IsModifiedReturnPos = False
|
|
EgtGetMachiningParam(MCH_MP.OVERL, dValue)
|
|
m_OverLap = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("OverLap")
|
|
m_IsModifiedOverLap = False
|
|
EgtGetMachiningParam(MCH_MP.TABLEN, dValue)
|
|
m_TabLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("TabLen")
|
|
m_IsModifiedTabLen = False
|
|
EgtGetMachiningParam(MCH_MP.TABDIST, dValue)
|
|
m_TabDist = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("TabDist")
|
|
m_IsModifiedTabDist = False
|
|
EgtGetMachiningParam(MCH_MP.TABHEIGHT, dValue)
|
|
m_TabHeight = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("TabHeight")
|
|
m_IsModifiedTabHeight = False
|
|
EgtGetMachiningParam(MCH_MP.TABANGLE, dValue)
|
|
m_TabAngle = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("TabAngle")
|
|
m_IsModifiedTabAngle = False
|
|
EgtGetMachiningParam(MCH_MP.LITANG, dValue)
|
|
m_LiTang = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LiTang")
|
|
m_IsModifiedLiTang = False
|
|
EgtGetMachiningParam(MCH_MP.LIPERP, dValue)
|
|
m_LiPerp = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LiPerp")
|
|
m_IsModifiedLiPerp = False
|
|
EgtGetMachiningParam(MCH_MP.LIELEV, dValue)
|
|
m_LiElev = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LiElev")
|
|
m_IsModifiedLiElev = False
|
|
EgtGetMachiningParam(MCH_MP.LICOMPLEN, dValue)
|
|
m_LiCompLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LiCompLen")
|
|
m_IsModifiedLiCompLen = False
|
|
EgtGetMachiningParam(MCH_MP.LOTANG, dValue)
|
|
m_LoTang = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LoTang")
|
|
m_IsModifiedLoTang = False
|
|
EgtGetMachiningParam(MCH_MP.LOPERP, dValue)
|
|
m_LoPerp = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LoPerp")
|
|
m_IsModifiedLoPerp = False
|
|
EgtGetMachiningParam(MCH_MP.LOELEV, dValue)
|
|
m_LoElev = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LoElev")
|
|
m_IsModifiedLoElev = False
|
|
EgtGetMachiningParam(MCH_MP.LOCOMPLEN, dValue)
|
|
m_LoCompLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("LoCompLen")
|
|
m_IsModifiedLoCompLen = False
|
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dValue)
|
|
m_StartAddLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StartAddLen")
|
|
m_IsModifiedStartAddLen = False
|
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dValue)
|
|
m_EndAddLen = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("EndAddLen")
|
|
m_IsModifiedEndAddLen = False
|
|
EgtGetMachiningParam(MCH_MP.STEPEXTARC, dValue)
|
|
m_StepExtArc = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StepExtArc")
|
|
m_IsModifiedStepExtArc = False
|
|
EgtGetMachiningParam(MCH_MP.STEPEXTARC, dValue)
|
|
m_StepExtArc = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StepExtArc")
|
|
m_IsModifiedStepExtArc = False
|
|
EgtGetMachiningParam(MCH_MP.STEPINTARC, dValue)
|
|
m_StepIntArc = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("StepIntArc")
|
|
m_IsModifiedStepIntArc = False
|
|
EgtGetMachiningParam(MCH_MP.SIDESTEP, dValue)
|
|
m_SideStep = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("SideStep")
|
|
m_IsModifiedSideStep = False
|
|
EgtGetMachiningParam(MCH_MP.VERTFEED, dValue)
|
|
m_VertFeed = LenToString(dValue, 4)
|
|
NotifyPropertyChanged("VertFeed")
|
|
m_IsModifiedVertFeed = False
|
|
EgtGetMachiningParam(MCH_MP.TOOL, m_Tool)
|
|
NotifyPropertyChanged("ToolExpanderHeader")
|
|
EgtGetMachiningParam(MCH_MP.DEPTH_STR, m_DepthStr)
|
|
NotifyPropertyChanged("DepthStr")
|
|
m_IsModifiedDepthStr = False
|
|
EgtGetMachiningParam(MCH_MP.USERNOTES, m_UserNotes)
|
|
NotifyPropertyChanged("UserNotes")
|
|
m_IsModifiedUserNotes = False
|
|
EgtGetMachiningParam(MCH_MP.INITANGS, m_InitAngs)
|
|
NotifyPropertyChanged("InitAngs")
|
|
m_IsModifiedInitAngs = False
|
|
EgtGetMachiningParam(MCH_MP.BLOCKEDAXIS, m_BlockedAxis)
|
|
NotifyPropertyChanged("BlockedAxis")
|
|
m_IsModifiedBlockedAxis = False
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
End Sub
|
|
|
|
Private Sub WriteMachiningParam()
|
|
Dim nValue As Integer = 0
|
|
Dim dValue As Double = 0
|
|
If m_IsModifiedInvert Then
|
|
If EgtSetMachiningParam(MCH_MP.INVERT, m_Invert) Then
|
|
m_IsModifiedInvert = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLeaveTab Then
|
|
If EgtSetMachiningParam(MCH_MP.LEAVETAB, m_LeaveTab) Then
|
|
m_IsModifiedLeaveTab = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedToolInvert Then
|
|
If EgtSetMachiningParam(MCH_MP.TOOLINVERT, m_ToolInvert) Then
|
|
m_IsModifiedToolInvert = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedWorkSide Then
|
|
nValue = If(IsNothing(WorkSideList), m_SelectedWorkSide, IdNameStruct.IdFromInd(m_SelectedWorkSide, WorkSideList))
|
|
If EgtSetMachiningParam(MCH_MP.WORKSIDE, nValue) Then
|
|
m_IsModifiedSelectedWorkSide = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedHeadSide Then
|
|
nValue = If(IsNothing(HeadSideList), m_SelectedHeadSide, IdNameStruct.IdFromInd(m_SelectedHeadSide, HeadSideList))
|
|
If EgtSetMachiningParam(MCH_MP.HEADSIDE, nValue) Then
|
|
m_IsModifiedSelectedHeadSide = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedLeadInType Then
|
|
If EgtSetMachiningParam(MCH_MP.LEADINTYPE, m_SelectedLeadInType) Then
|
|
m_IsModifiedSelectedLeadInType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedExtLinkType Then
|
|
If EgtSetMachiningParam(MCH_MP.EXTLINKTYPE, m_SelectedExtLinkType) Then
|
|
m_IsModifiedSelectedExtLinkType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedLeadOutType Then
|
|
If EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, m_SelectedLeadOutType) Then
|
|
m_IsModifiedSelectedLeadOutType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedCurveUse Then
|
|
If EgtSetMachiningParam(MCH_MP.CURVEUSE, m_SelectedCurveUse) Then
|
|
m_IsModifiedSelectedCurveUse = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedStepType Then
|
|
nValue = If(IsNothing(StepTypeList), m_SelectedStepType, IdNameStruct.IdFromInd(m_SelectedStepType, StepTypeList))
|
|
If EgtSetMachiningParam(MCH_MP.STEPTYPE, nValue) Then
|
|
m_IsModifiedSelectedStepType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedSubType Then
|
|
nValue = If(IsNothing(SubTypeList), m_SelectedSubType, IdNameStruct.IdFromInd(m_SelectedSubType, SubTypeList))
|
|
If EgtSetMachiningParam(MCH_MP.SUBTYPE, nValue) Then
|
|
m_IsModifiedSelectedSubType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedLeadLinkType Then
|
|
If EgtSetMachiningParam(MCH_MP.LEADLINKTYPE, m_SelectedLeadLinkType) Then
|
|
m_IsModifiedSelectedLeadLinkType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedFaceUseType Then
|
|
nValue = If(IsNothing(FaceUseTypeList), m_SelectedFaceUseType, IdNameStruct.IdFromInd(m_SelectedFaceUseType, FaceUseTypeList))
|
|
If EgtSetMachiningParam(MCH_MP.FACEUSE, nValue) Then
|
|
m_IsModifiedSelectedFaceUseType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSelectedSolChoiceType Then
|
|
nValue = If(IsNothing(SolChoiceTypeList), m_SelectedSolChoiceType, IdNameStruct.IdFromInd(m_SelectedSolChoiceType, SolChoiceTypeList))
|
|
If EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, nValue) Then
|
|
m_IsModifiedSelectedSolChoiceType = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSpeed Then
|
|
StringToDouble(m_Speed, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.SPEED, dValue) Then
|
|
m_IsModifiedSpeed = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedFeed Then
|
|
StringToLen(m_Feed, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.FEED, dValue) Then
|
|
m_IsModifiedFeed = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedStartFeed Then
|
|
StringToLen(m_StartFeed, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.STARTFEED, dValue) Then
|
|
m_IsModifiedStartFeed = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedEndFeed Then
|
|
StringToLen(m_EndFeed, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.ENDFEED, dValue) Then
|
|
m_IsModifiedEndFeed = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedTipFeed Then
|
|
StringToLen(m_TipFeed, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.TIPFEED, dValue) Then
|
|
m_IsModifiedTipFeed = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedOffSr Then
|
|
StringToLen(m_OffSr, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.OFFSR, dValue) Then
|
|
m_IsModifiedOffSr = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedOffSl Then
|
|
StringToLen(m_OffSl, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.OFFSL, dValue) Then
|
|
m_IsModifiedOffSl = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSideAngle Then
|
|
StringToDouble(m_SideAngle, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.SIDEANGLE, dValue) Then
|
|
m_IsModifiedSideAngle = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedApprox Then
|
|
StringToLen(m_Approx, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.APPROX, dValue) Then
|
|
m_IsModifiedApprox = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedStartPos Then
|
|
StringToLen(m_StartPos, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.STARTPOS, dValue) Then
|
|
m_IsModifiedStartPos = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedStartSlowLen Then
|
|
StringToLen(m_StartSlowLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.STARTSLOWLEN, dValue) Then
|
|
m_IsModifiedStartSlowLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedEndSlowLen Then
|
|
StringToLen(m_EndSlowLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.ENDSLOWLEN, dValue) Then
|
|
m_IsModifiedEndSlowLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedThrouAddLen Then
|
|
StringToLen(m_ThrouAddLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.THROUADDLEN, dValue) Then
|
|
m_IsModifiedThrouAddLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedStepPar Then
|
|
StringToLen(m_StepPar, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.STEP_, dValue) Then
|
|
m_IsModifiedStepPar = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedReturnPos Then
|
|
StringToLen(m_ReturnPos, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.RETURNPOS, dValue) Then
|
|
m_IsModifiedReturnPos = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedOverLap Then
|
|
StringToLen(m_OverLap, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.OVERL, dValue) Then
|
|
m_IsModifiedOverLap = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedTabLen Then
|
|
StringToLen(m_TabLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.TABLEN, dValue) Then
|
|
m_IsModifiedTabLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedTabDist Then
|
|
StringToLen(m_TabDist, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.TABDIST, dValue) Then
|
|
m_IsModifiedTabDist = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedTabHeight Then
|
|
StringToLen(m_TabHeight, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.TABHEIGHT, dValue) Then
|
|
m_IsModifiedTabHeight = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedTabAngle Then
|
|
StringToLen(m_TabAngle, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.TABANGLE, dValue) Then
|
|
m_IsModifiedTabAngle = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLiTang Then
|
|
StringToLen(m_LiTang, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LITANG, dValue) Then
|
|
m_IsModifiedLiTang = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLiPerp Then
|
|
StringToLen(m_LiPerp, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LIPERP, dValue) Then
|
|
m_IsModifiedLiPerp = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLiElev Then
|
|
StringToLen(m_LiElev, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LIELEV, dValue) Then
|
|
m_IsModifiedLiElev = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLiCompLen Then
|
|
StringToLen(m_LiCompLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LICOMPLEN, dValue) Then
|
|
m_IsModifiedLiCompLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLoTang Then
|
|
StringToLen(m_LoTang, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LOTANG, dValue) Then
|
|
m_IsModifiedLoTang = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLoPerp Then
|
|
StringToLen(m_LoPerp, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LOPERP, dValue) Then
|
|
m_IsModifiedLoPerp = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLoElev Then
|
|
StringToLen(m_LoElev, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LOELEV, dValue) Then
|
|
m_IsModifiedLoElev = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedLoCompLen Then
|
|
StringToLen(m_LoCompLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.LOCOMPLEN, dValue) Then
|
|
m_IsModifiedLoCompLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedStartAddLen Then
|
|
StringToLen(m_StartAddLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.STARTADDLEN, dValue) Then
|
|
m_IsModifiedStartAddLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedEndAddLen Then
|
|
StringToLen(m_EndAddLen, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.ENDADDLEN, dValue) Then
|
|
m_IsModifiedEndAddLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedStepExtArc Then
|
|
StringToLen(m_StepExtArc, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.STEPEXTARC, dValue) Then
|
|
m_IsModifiedEndAddLen = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedStepIntArc Then
|
|
StringToLen(m_StepIntArc, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.STEPINTARC, dValue) Then
|
|
m_IsModifiedStepIntArc = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedSideStep Then
|
|
StringToLen(m_SideStep, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.SIDESTEP, dValue) Then
|
|
m_IsModifiedSideStep = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedVertFeed Then
|
|
StringToLen(m_VertFeed, dValue)
|
|
If EgtSetMachiningParam(MCH_MP.VERTFEED, dValue) Then
|
|
m_IsModifiedVertFeed = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedDepthStr Then
|
|
If EgtSetMachiningParam(MCH_MP.DEPTH_STR, m_DepthStr) Then
|
|
m_IsModifiedDepthStr = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedUserNotes Then
|
|
If EgtSetMachiningParam(MCH_MP.USERNOTES, m_UserNotes) Then
|
|
m_IsModifiedUserNotes = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedInitAngs Then
|
|
If EgtSetMachiningParam(MCH_MP.INITANGS, m_InitAngs) Then
|
|
m_IsModifiedInitAngs = False
|
|
End If
|
|
End If
|
|
If m_IsModifiedBlockedAxis Then
|
|
If EgtSetMachiningParam(MCH_MP.BLOCKEDAXIS, m_BlockedAxis) Then
|
|
m_IsModifiedBlockedAxis = False
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' Commands
|
|
|
|
' Definizione comando
|
|
Private m_cmdNextStepTool As ICommand
|
|
Private m_cmdPrevStepTool As ICommand
|
|
Private m_cmdUpdateMachining As ICommand
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New(ByRef m_UpdateParamValues As Action)
|
|
m_UpdateParamValues = AddressOf ReadMachiningParam
|
|
End Sub
|
|
|
|
#End Region ' Constructor
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "NextStepToolCommand"
|
|
|
|
''' <summary>
|
|
''' Restituisce funzione per ricalcolo lavorazione.
|
|
''' </summary>
|
|
Public ReadOnly Property NextStepToolCommand As ICommand
|
|
Get
|
|
If m_cmdNextStepTool Is Nothing Then
|
|
m_cmdNextStepTool = New RelayCommand(AddressOf NextStepTool)
|
|
End If
|
|
Return m_cmdNextStepTool
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Ricalcola una lavorazione.
|
|
''' </summary>
|
|
Public Sub NextStepTool(ByVal param As Object)
|
|
If m_bPreviewTool Then
|
|
Dim nNextId = EgtPreviewMachiningTool(m_nPtEntId, MCH_PTM.AFTER)
|
|
If nNextId <> GDB_ID.NULL Then m_nPtEntId = nNextId
|
|
EgtDraw()
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' NextStepToolCommand
|
|
|
|
#Region "PrevStepToolCommand"
|
|
|
|
''' <summary>
|
|
''' Restituisce funzione per ricalcolo lavorazione.
|
|
''' </summary>
|
|
Public ReadOnly Property PrevStepToolCommand As ICommand
|
|
Get
|
|
If m_cmdPrevStepTool Is Nothing Then
|
|
m_cmdPrevStepTool = New RelayCommand(AddressOf PrevStepTool)
|
|
End If
|
|
Return m_cmdPrevStepTool
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Ricalcola una lavorazione.
|
|
''' </summary>
|
|
Public Sub PrevStepTool(ByVal param As Object)
|
|
If m_bPreviewTool Then
|
|
Dim nPrevId = EgtPreviewMachiningTool(m_nPtEntId, MCH_PTM.BEFORE)
|
|
If nPrevId <> GDB_ID.NULL Then m_nPtEntId = nPrevId
|
|
EgtDraw()
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' PrevStepToolCommand
|
|
|
|
#Region "UpdateMachiningCommand"
|
|
|
|
''' <summary>
|
|
''' Restituisce funzione per ricalcolo lavorazione.
|
|
''' </summary>
|
|
Public ReadOnly Property UpdateMachiningCommand As ICommand
|
|
Get
|
|
If m_cmdUpdateMachining Is Nothing Then
|
|
m_cmdUpdateMachining = New RelayCommand(AddressOf UpdateMachining)
|
|
End If
|
|
Return m_cmdUpdateMachining
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Ricalcola una lavorazione.
|
|
''' </summary>
|
|
Public Sub UpdateMachining(ByVal param As Object)
|
|
' La modifica di alcuni parametri forza il ricalcolo della geometria
|
|
Dim ModifiedGeometry As Boolean = m_IsModifiedSelectedFaceUseType
|
|
' aggiorno valori modificati
|
|
WriteMachiningParam()
|
|
' Carico tutta la geometria selezionata in una lista
|
|
Dim SelectedGeometry As New List(Of Integer)
|
|
Dim EntityIndex As Integer = EgtGetFirstSelectedObj()
|
|
While EntityIndex <> GDB_ID.NULL
|
|
SelectedGeometry.Add(EntityIndex)
|
|
EntityIndex = EgtGetNextSelectedObj()
|
|
End While
|
|
' Gestione speciale provvisoria per una sola superficie con identificazione faccia
|
|
If SelectedGeometry.Count = 1 AndAlso EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Then
|
|
' Verifico se la superficie è cambiata
|
|
Dim SubEntityIndex As Integer = 0
|
|
If Not (EgtGetMachiningGeometry(0, EntityIndex, SubEntityIndex) And
|
|
EntityIndex = SelectedGeometry(0) And
|
|
SubEntityIndex = IniFile.m_LastSubEntityId And
|
|
Not EgtGetMachiningGeometry(1, EntityIndex, SubEntityIndex)) Then
|
|
Dim nF As Integer = EgtSurfTmFacetFromTria(SelectedGeometry(0), IniFile.m_LastSubEntityId)
|
|
If nF < 0 Then nF = 0
|
|
Dim SubEntityArray As Integer() = {nF}
|
|
ModifiedGeometry = True
|
|
EgtSetMachiningGeometry(SelectedGeometry.ToArray, SubEntityArray)
|
|
End If
|
|
' Gestione standard per curve
|
|
Else
|
|
' Verifico se la geometria è cambiata, confrontando selezione attuale con geometria di lavorazione
|
|
Dim CountIndex As Integer = 0
|
|
EntityIndex = 0
|
|
Dim SubEntityIndex As Integer = 0 ' Sottocomponente, per ora non usato ma necessario
|
|
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
|
|
If CountIndex < SelectedGeometry.Count() Then
|
|
If SelectedGeometry(CountIndex) <> EntityIndex Then
|
|
ModifiedGeometry = True
|
|
Exit While
|
|
End If
|
|
Else
|
|
ModifiedGeometry = True
|
|
Exit While
|
|
End If
|
|
CountIndex += 1
|
|
End While
|
|
If SelectedGeometry.Count <> CountIndex Then
|
|
ModifiedGeometry = True
|
|
End If
|
|
' Imposto geometria selezionata come geometria di lavorazione
|
|
If ModifiedGeometry Then EgtSetMachiningGeometry(SelectedGeometry.ToArray)
|
|
End If
|
|
' Ricalcolo la lavorazione
|
|
If Not EgtApplyMachining(ModifiedGeometry) Then
|
|
If EgtGetLastMachMgrErrorId() <> 0 Then
|
|
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
|
Dim sInfo As String = String.Empty
|
|
EgtGetOutstrokeInfo(sInfo)
|
|
If Not String.IsNullOrEmpty(sInfo) Then sErr &= " " & sInfo
|
|
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
|
Else
|
|
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
|
End If
|
|
End If
|
|
' Restart visualizzazione utensile
|
|
If m_bPreviewTool Then
|
|
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
|
|
End If
|
|
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
|
|
EgtDraw()
|
|
Application.Msn.NotifyColleagues(Application.EMITTITLE)
|
|
End Sub
|
|
|
|
#End Region ' UpdateMachiningCommand
|
|
|
|
#End Region ' Commands
|
|
|
|
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 TMDbParamVisibility.OperationDisposition(CInt(parameter))
|
|
Case MCH_OY.DRILLING
|
|
Return TMDbParamVisibility.Drilling(CInt(parameter))
|
|
Case MCH_OY.SAWING
|
|
Return TMDbParamVisibility.Sawing(CInt(parameter))
|
|
Case MCH_OY.MILLING
|
|
Return TMDbParamVisibility.Milling(CInt(parameter))
|
|
Case MCH_OY.POCKETING
|
|
Return TMDbParamVisibility.Pocketing(CInt(parameter))
|
|
Case MCH_OY.MORTISING
|
|
Return TMDbParamVisibility.Mortising(CInt(parameter))
|
|
Case MCH_OY.SAWROUGHING
|
|
Return TMDbParamVisibility.Sawroughing(CInt(parameter))
|
|
Case MCH_OY.SAWFINISHING
|
|
Return TMDbParamVisibility.Sawfinishing(CInt(parameter))
|
|
Case MCH_OY.GENMACHINING
|
|
Return TMDbParamVisibility.GenMachining(CInt(parameter))
|
|
Case MCH_OY.CHISELING
|
|
Return TMDbParamVisibility.Chiseling(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
|
|
value = CStr(value).Replace(INCHTOMM, INCHSYMBOL)
|
|
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
|
|
value = CStr(value).Replace(INCHSYMBOL, INCHTOMM)
|
|
End If
|
|
Return value
|
|
End Function
|
|
|
|
End Class |