550057bf06
- modifiche varie.
1255 lines
45 KiB
VB.net
1255 lines
45 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports System.ComponentModel
|
|
Imports EgtUILib
|
|
Imports EgtCAM5.Utility
|
|
|
|
''' <summary>
|
|
''' Class that represent a Machining in the treeview.
|
|
''' It's an element in the treeview that represent the child of familymachiningtreeviewitem, but also the class that read and write in the machining's database
|
|
''' </summary>
|
|
Public Class MachiningTreeViewItem
|
|
Inherits ChildItem
|
|
Implements IDataErrorInfo
|
|
|
|
#Region "Machining Property"
|
|
|
|
Private m_Type As MCH_MY
|
|
Public ReadOnly Property Type As Integer
|
|
Get
|
|
Return m_Type
|
|
End Get
|
|
End Property
|
|
|
|
Private m_ErrorOnTool As Boolean
|
|
Public Property ErrorOnTool As Boolean
|
|
Get
|
|
Return m_ErrorOnTool
|
|
End Get
|
|
Set(value As Boolean)
|
|
If IsValid Then
|
|
m_ErrorOnTool = False
|
|
Application.Msn.NotifyColleagues(Application.ERRORONMACHINING, Nothing)
|
|
Else
|
|
m_ErrorOnTool = True
|
|
Application.Msn.NotifyColleagues(Application.ERRORONMACHINING, Me)
|
|
End If
|
|
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, "Center"), New IdNameStruct(MCH_SAW_WS.LEFT, "Left"), New IdNameStruct(MCH_SAW_WS.RIGHT, "Right")})
|
|
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
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.WORKSIDE, nWorkSide)
|
|
Return IdNameStruct.SearchToId(nWorkSide, WorkSideList)
|
|
End Get
|
|
Set(value As Integer)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.WORKSIDE, IdNameStruct.SearchFromId(value, WorkSideList))
|
|
End Set
|
|
End Property
|
|
|
|
'dim m_precedence As
|
|
'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, "Center"), New IdNameStruct(MCH_SAWROU_LL.EXT, "External")})
|
|
Case MCH_MY.SAWFINISHING
|
|
m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWFIN_LL.STD, "Standard"), New IdNameStruct(MCH_SAWFIN_LL.CENT, "Center"), New IdNameStruct(MCH_SAWFIN_LL.EXT, "External")})
|
|
Case Else
|
|
m_LeadLinkTypeList = Nothing
|
|
End Select
|
|
Return m_LeadLinkTypeList
|
|
End Get
|
|
End Property
|
|
Private m_LeadLinkTypeGetError As Boolean = False
|
|
' Proprietà che indica il WorkSide (MCH_SAW_WS)
|
|
Public Property SelectedLeadLinkType As Integer
|
|
Get
|
|
Dim nLeadLinkType As Integer = 0
|
|
If EgtMdbGetCurrMachiningParam(MCH_MP.LEADLINKTYPE, nLeadLinkType) Then
|
|
m_LeadLinkTypeGetError = True
|
|
Else
|
|
m_LeadLinkTypeGetError = False
|
|
End If
|
|
Return IdNameStruct.SearchToId(nLeadLinkType, m_LeadLinkTypeList)
|
|
End Get
|
|
Set(value As Integer)
|
|
If m_LeadLinkTypeGetError Then
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LEADLINKTYPE, IdNameStruct.SearchFromId(value, m_LeadLinkTypeList))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
' Variabile che indica se c'è un errore nel nome della lavorazione (ad esempio nome già utilizzato)
|
|
Dim bErrorMachiningName As Boolean = False
|
|
''' <summary>
|
|
''' Property that read and write to the tool's database the Name
|
|
''' </summary>
|
|
Public Property NamePar As String
|
|
Get
|
|
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim sNamePar As String = String.Empty
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, sNamePar)
|
|
Return sNamePar
|
|
End Get
|
|
Set(value As String)
|
|
bErrorMachiningName = False
|
|
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
If EgtMdbSetCurrMachiningParam(MCH_MP.NAME, value) Then
|
|
Name = value
|
|
Else
|
|
bErrorMachiningName = True
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
' Variabile che indica se la lavorazione è appena stata creata
|
|
Dim m_NewMachining As Boolean = False
|
|
Public Property NewMachining As Boolean
|
|
Get
|
|
Return m_NewMachining
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_NewMachining = value
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that determines if the Machining is selected or not
|
|
''' </summary>
|
|
Public Overrides Property IsSelected As Boolean
|
|
Get
|
|
Return m_isSelected
|
|
End Get
|
|
Set(value As Boolean)
|
|
If (value <> m_isSelected) Then
|
|
m_isSelected = value
|
|
' If Machining is selected, set it as current and notify all machining's property
|
|
' to refresh them values with those of the new selected machining
|
|
If value Then
|
|
EgtMdbSetCurrMachining(Me.Name)
|
|
NotifyPropertyChanged("Type")
|
|
NotifyPropertyChanged("Invert")
|
|
NotifyPropertyChanged("LeaveTab")
|
|
NotifyPropertyChanged("SelectedWorkSide")
|
|
NotifyPropertyChanged("HeadSide")
|
|
NotifyPropertyChanged("LeadInType")
|
|
NotifyPropertyChanged("ExtLinkType")
|
|
NotifyPropertyChanged("LeadOutType")
|
|
NotifyPropertyChanged("CurveUse")
|
|
NotifyPropertyChanged("StepType")
|
|
'NotifyPropertyChanged("LeadLinkTypeList")
|
|
NotifyPropertyChanged("SelectedLeadLinkType")
|
|
NotifyPropertyChanged("Speed")
|
|
NotifyPropertyChanged("Feed")
|
|
NotifyPropertyChanged("StartFeed")
|
|
NotifyPropertyChanged("EndFeed")
|
|
NotifyPropertyChanged("TipFeed")
|
|
NotifyPropertyChanged("OffSr")
|
|
NotifyPropertyChanged("OffSl")
|
|
NotifyPropertyChanged("SideAngle")
|
|
NotifyPropertyChanged("Approx")
|
|
NotifyPropertyChanged("Startpos")
|
|
NotifyPropertyChanged("StartSlowLen")
|
|
NotifyPropertyChanged("EndSlowLen")
|
|
NotifyPropertyChanged("ThrouAddLen")
|
|
NotifyPropertyChanged("StepPar")
|
|
NotifyPropertyChanged("ReturnPos")
|
|
NotifyPropertyChanged("TabLen")
|
|
NotifyPropertyChanged("TabDist")
|
|
NotifyPropertyChanged("Tabheight")
|
|
NotifyPropertyChanged("TabAngle")
|
|
NotifyPropertyChanged("LiTang")
|
|
NotifyPropertyChanged("LiPerp")
|
|
NotifyPropertyChanged("LiElev")
|
|
NotifyPropertyChanged("LiCompLen")
|
|
NotifyPropertyChanged("LoTang")
|
|
NotifyPropertyChanged("LoPerp")
|
|
NotifyPropertyChanged("LoElev")
|
|
NotifyPropertyChanged("LoCompLen")
|
|
NotifyPropertyChanged("StartAddlen")
|
|
NotifyPropertyChanged("EndAddlen")
|
|
NotifyPropertyChanged("StepExtArc")
|
|
NotifyPropertyChanged("StepIntArc")
|
|
NotifyPropertyChanged("SideStep")
|
|
NotifyPropertyChanged("VertFeed")
|
|
NotifyPropertyChanged("NamePar")
|
|
NotifyPropertyChanged("Tool")
|
|
NotifyPropertyChanged("DepthStr")
|
|
NotifyPropertyChanged("UserNotes")
|
|
NotifyPropertyChanged("OverLapStr")
|
|
NotifyPropertyChanged("OffsetStr")
|
|
' Otherwhise Tool is deselected, so it and the database will be saved to
|
|
' keep the modify effective
|
|
Else
|
|
If EgtMdbIsCurrMachiningModified() And Me.IsValid Then
|
|
|
|
Select Case MsgBox(EgtMsg(MSG_MACHININGSERRORS), MsgBoxStyle.YesNo, EgtMsg(MSG_MACHININGSERRORS + 1))
|
|
Case MsgBoxResult.Yes
|
|
m_NewMachining = False
|
|
EgtMdbSaveCurrMachining()
|
|
EgtMdbSave()
|
|
Case MsgBoxResult.No
|
|
If m_NewMachining Then
|
|
Application.Msn.NotifyColleagues(Application.REMOVEMACHINING, Me)
|
|
End If
|
|
'EgtMdbRemoveTool(Me.Name)
|
|
'EgtMdbSave()
|
|
End Select
|
|
End If
|
|
End If
|
|
|
|
End If
|
|
|
|
End Set
|
|
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Invert
|
|
''' </summary>
|
|
Public Property Invert As Boolean
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim bInvert As Boolean = False
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.INVERT, bInvert)
|
|
Return bInvert
|
|
End Get
|
|
Set(value As Boolean)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.INVERT, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Leave Tab
|
|
''' </summary>
|
|
Public Property LeaveTab As Boolean
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim bLeaveTab As Boolean = False
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LEAVETAB, bLeaveTab)
|
|
Return bLeaveTab
|
|
End Get
|
|
Set(value As Boolean)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LEAVETAB, value)
|
|
End Set
|
|
End Property
|
|
|
|
' ''' <summary>
|
|
' ''' Property that read and write to the Machining's database the Type
|
|
' ''' </summary>
|
|
'Public Property Type As Integer
|
|
' Get
|
|
' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
' Dim dType As Integer = 0
|
|
' EgtMdbGetCurrMachiningParam(MCH_MP.TYPE, dType)
|
|
' Return dType
|
|
' End Get
|
|
' Set(value As Integer)
|
|
' ''EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
' 'EgtMdbSetCurrMachiningParam(MCH_MP.TYPE, value)
|
|
' End Set
|
|
'End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Work Side
|
|
''' </summary>
|
|
'Public Property WorkSide As Integer
|
|
' Get
|
|
' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
' Dim nWorkSide As Integer = 0
|
|
' EgtMdbGetCurrMachiningParam(MCH_MP.WORKSIDE, nWorkSide)
|
|
' Return nWorkSide
|
|
' End Get
|
|
' Set(value As Integer)
|
|
' 'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
' EgtMdbSetCurrMachiningParam(MCH_MP.WORKSIDE, value)
|
|
' End Set
|
|
'End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Head Side
|
|
''' </summary>
|
|
Public Property HeadSide As Integer
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim nHeadSide As Integer = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.HEADSIDE, nHeadSide)
|
|
Return nHeadSide
|
|
End Get
|
|
Set(value As Integer)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.HEADSIDE, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lead In Type
|
|
''' </summary>
|
|
Public Property LeadInType As Integer
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim nLeadInType As Integer = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, nLeadInType)
|
|
Return nLeadInType
|
|
End Get
|
|
Set(value As Integer)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LEADINTYPE, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Ext Link Type
|
|
''' </summary>
|
|
Public Property ExtLinkType As Integer
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim nExtLinkType As Integer = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, nExtLinkType)
|
|
Return nExtLinkType
|
|
End Get
|
|
Set(value As Integer)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.EXTLINKTYPE, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the LeadOut type
|
|
''' </summary>
|
|
Public Property LeadOutType As Integer
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim nLeadOutType As Integer = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LEADOUTTYPE, nLeadOutType)
|
|
Return nLeadOutType
|
|
End Get
|
|
Set(value As Integer)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LEADOUTTYPE, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Curve Use
|
|
''' </summary>
|
|
Public Property CurveUse As Integer
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim nCurveUse As Integer = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.CURVEUSE, nCurveUse)
|
|
Return nCurveUse
|
|
End Get
|
|
Set(value As Integer)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.CURVEUSE, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Step Type
|
|
''' </summary>
|
|
Public Property StepType As Integer
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim nStepType As Integer = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STEPTYPE, nStepType)
|
|
Return nStepType
|
|
End Get
|
|
Set(value As Integer)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STEPTYPE, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lead Link Type
|
|
''' </summary>
|
|
Public Property LeadLinkType As Integer
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim nLeadLinkType As Integer = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LEADLINKTYPE, nLeadLinkType)
|
|
Return nLeadLinkType
|
|
End Get
|
|
Set(value As Integer)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LEADLINKTYPE, value)
|
|
End Set
|
|
End Property
|
|
|
|
Dim m_Speed As Double
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Speed
|
|
''' </summary>
|
|
Public Property Speed As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dSpeed As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.SPEED, dSpeed)
|
|
Return LenToString(dSpeed, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dSpeed As Double = 0
|
|
StringToLen(value, dSpeed)
|
|
m_Speed = dSpeed
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.SPEED, dSpeed)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Feed
|
|
''' </summary>
|
|
Public Property Feed As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dFeed As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.FEED, dFeed)
|
|
Return LenToString(dFeed, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dFeed As Double = 0
|
|
StringToLen(value, dFeed)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.FEED, dFeed)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Feed
|
|
''' </summary>
|
|
Public Property StartFeed As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartFeed As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STARTFEED, dStartFeed)
|
|
Return LenToString(dStartFeed, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartFeed As Double = 0
|
|
StringToLen(value, dStartFeed)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STARTFEED, dStartFeed)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the End Feed
|
|
''' </summary>
|
|
Public Property EndFeed As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dEndFeed As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.ENDFEED, dEndFeed)
|
|
Return LenToString(dEndFeed, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dEndFeed As Double = 0
|
|
StringToLen(value, dEndFeed)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.ENDFEED, dEndFeed)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tip Feed
|
|
''' </summary>
|
|
Public Property TipFeed As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTipFeed As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.TIPFEED, dTipFeed)
|
|
Return LenToString(dTipFeed, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTipFeed As Double = 0
|
|
StringToLen(value, dTipFeed)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.TIPFEED, dTipFeed)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Offset Sr
|
|
''' </summary>
|
|
Public Property OffSr As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dOffSr As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.OFFSR, dOffSr)
|
|
Return LenToString(dOffSr, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dOffSr As Double = 0
|
|
StringToLen(value, dOffSr)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.OFFSR, dOffSr)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Offset Sl
|
|
''' </summary>
|
|
Public Property OffSl As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dOffSl As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.OFFSL, dOffSl)
|
|
Return LenToString(dOffSl, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dOffSl As Double = 0
|
|
StringToLen(value, dOffSl)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.OFFSL, dOffSl)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Side Angle
|
|
''' </summary>
|
|
Public Property SideAngle As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dSideAngle As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGLE, dSideAngle)
|
|
Return LenToString(dSideAngle, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dSideAngle As Double = 0
|
|
StringToLen(value, dSideAngle)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.SIDEANGLE, dSideAngle)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Approx
|
|
''' </summary>
|
|
Public Property Approx As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dApprox As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.APPROX, dApprox)
|
|
Return LenToString(dApprox, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dApprox As Double = 0
|
|
StringToLen(value, dApprox)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.APPROX, dApprox)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Position
|
|
''' </summary>
|
|
Public Property StartPos As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartPos As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STARTPOS, dStartPos)
|
|
Return LenToString(dStartPos, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartPos As Double = 0
|
|
StringToLen(value, dStartPos)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STARTPOS, dStartPos)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Slow Len
|
|
''' </summary>
|
|
Public Property StartSlowLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartSlowLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STARTSLOWLEN, dStartSlowLen)
|
|
Return LenToString(dStartSlowLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartSlowLen As Double = 0
|
|
StringToLen(value, dStartSlowLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STARTSLOWLEN, dStartSlowLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the End Slow Len
|
|
''' </summary>
|
|
Public Property EndSlowLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dEndSlowLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.ENDSLOWLEN, dEndSlowLen)
|
|
Return LenToString(dEndSlowLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dEndSlowLen As Double = 0
|
|
StringToLen(value, dEndSlowLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.ENDSLOWLEN, dEndSlowLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Throu Add Len
|
|
''' </summary>
|
|
Public Property ThrouAddLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dThrouAddLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.THROUADDLEN, dThrouAddLen)
|
|
Return LenToString(dThrouAddLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dThrouAddLen As Double = 0
|
|
StringToLen(value, dThrouAddLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.THROUADDLEN, dThrouAddLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Step Par
|
|
''' </summary>
|
|
Public Property StepPar As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStepPar As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STEP_, dStepPar)
|
|
Return LenToString(dStepPar, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStepPar As Double = 0
|
|
StringToLen(value, dStepPar)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STEP_, dStepPar)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Return Position
|
|
''' </summary>
|
|
Public Property ReturnPos As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dReturnpPos As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.RETURNPOS, dReturnpPos)
|
|
Return LenToString(dReturnpPos, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dReturnpPos As Double = 0
|
|
StringToLen(value, dReturnpPos)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.RETURNPOS, dReturnpPos)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Len
|
|
''' </summary>
|
|
Public Property TabLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.TABLEN, dTabLen)
|
|
Return LenToString(dTabLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabLen As Double = 0
|
|
StringToLen(value, dTabLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.TABLEN, dTabLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Dist
|
|
''' </summary>
|
|
Public Property TabDist As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabDist As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.TABDIST, dTabDist)
|
|
Return LenToString(dTabDist, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabDist As Double = 0
|
|
StringToLen(value, dTabDist)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.TABDIST, dTabDist)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Height
|
|
''' </summary>
|
|
Public Property TabHeight As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabHeight As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.TABHEIGHT, dTabHeight)
|
|
Return LenToString(dTabHeight, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabHeight As Double = 0
|
|
StringToLen(value, dTabHeight)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.TABHEIGHT, dTabHeight)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tab Angle
|
|
''' </summary>
|
|
Public Property TabAngle As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabAngle As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.TABANGLE, dTabAngle)
|
|
Return LenToString(dTabAngle, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dTabAngle As Double = 0
|
|
StringToLen(value, dTabAngle)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.TABANGLE, dTabAngle)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Tang
|
|
''' </summary>
|
|
Public Property LiTang As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiTang As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LITANG, dLiTang)
|
|
Return LenToString(dLiTang, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiTang As Double = 0
|
|
StringToLen(value, dLiTang)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, dLiTang)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Perp
|
|
''' </summary>
|
|
Public Property LiPerp As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiPerp As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LIPERP, dLiPerp)
|
|
Return LenToString(dLiPerp, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiPerp As Double = 0
|
|
StringToLen(value, dLiPerp)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LIPERP, dLiPerp)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Elev
|
|
''' </summary>
|
|
Public Property LiElev As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiElev As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LIELEV, dLiElev)
|
|
Return LenToString(dLiElev, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiElev As Double = 0
|
|
StringToLen(value, dLiElev)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LIELEV, dLiElev)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Li Comp Len
|
|
''' </summary>
|
|
Public Property LiCompLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiCompLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LICOMPLEN, dLiCompLen)
|
|
Return LenToString(dLiCompLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLiCompLen As Double = 0
|
|
StringToLen(value, dLiCompLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LICOMPLEN, dLiCompLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Tang
|
|
''' </summary>
|
|
Public Property LoTang As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoTang As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LOTANG, dLoTang)
|
|
Return LenToString(dLoTang, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoTang As Double = 0
|
|
StringToLen(value, dLoTang)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LOTANG, dLoTang)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Perp
|
|
''' </summary>
|
|
Public Property LoPerp As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoPerp As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LOPERP, dLoPerp)
|
|
Return LenToString(dLoPerp, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoPerp As Double = 0
|
|
StringToLen(value, dLoPerp)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LOPERP, dLoPerp)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Elev
|
|
''' </summary>
|
|
Public Property LoElev As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoElev As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LOELEV, dLoElev)
|
|
Return LenToString(dLoElev, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoElev As Double = 0
|
|
StringToLen(value, dLoElev)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LOELEV, dLoElev)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Lo Comp Len
|
|
''' </summary>
|
|
Public Property LoCompLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoCompLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.LOCOMPLEN, dLoCompLen)
|
|
Return LenToString(dLoCompLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dLoCompLen As Double = 0
|
|
StringToLen(value, dLoCompLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.LOCOMPLEN, dLoCompLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Start Add Len
|
|
''' </summary>
|
|
Public Property StartAddLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartAddLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
|
Return LenToString(dStartAddLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStartAddLen As Double = 0
|
|
StringToLen(value, dStartAddLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the End Add Len
|
|
''' </summary>
|
|
Public Property EndAddLen As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dEndAddLen As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
|
Return LenToString(dEndAddLen, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dEndAddLen As Double = 0
|
|
StringToLen(value, dEndAddLen)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Step Ext Arc
|
|
''' </summary>
|
|
Public Property StepExtArc As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStepExtArc As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STEPEXTARC, dStepExtArc)
|
|
Return LenToString(dStepExtArc, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStepExtArc As Double = 0
|
|
StringToLen(value, dStepExtArc)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STEPEXTARC, dStepExtArc)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Step Int Arc
|
|
''' </summary>
|
|
Public Property StepIntArc As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStepIntArc As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.STEPINTARC, dStepIntArc)
|
|
Return LenToString(dStepIntArc, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dStepIntArc As Double = 0
|
|
StringToLen(value, dStepIntArc)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.STEPINTARC, dStepIntArc)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Side Step
|
|
''' </summary>
|
|
Public Property SideStep As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dSideStep As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.SIDESTEP, dSideStep)
|
|
Return LenToString(dSideStep, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dSideStep As Double = 0
|
|
StringToLen(value, dSideStep)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.SIDESTEP, dSideStep)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Vert Feed
|
|
''' </summary>
|
|
Public Property VertFeed As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dVertFeed As Double = 0
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.VERTFEED, dVertFeed)
|
|
Return LenToString(dVertFeed, 3)
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim dVertFeed As Double = 0
|
|
StringToLen(value, dVertFeed)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.VERTFEED, dVertFeed)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Tool
|
|
''' </summary>
|
|
Public Property Tool As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim sTool As String = String.Empty
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sTool)
|
|
Return sTool
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.TOOL, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Depth Str
|
|
''' </summary>
|
|
Public Property DepthStr As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim sDepthStr As String = String.Empty
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.DEPTH_STR, sDepthStr)
|
|
Return sDepthStr
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.DEPTH_STR, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the User Notes
|
|
''' </summary>
|
|
Public Property UserNotes As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim sUserNotes As String = String.Empty
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, sUserNotes)
|
|
Return sUserNotes
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Over Lap Str
|
|
''' </summary>
|
|
Public Property OverLapStr As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim sOverLapStr As String = String.Empty
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.OVERLAP_STR, sOverLapStr)
|
|
Return sOverLapStr
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.OVERLAP_STR, value)
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that read and write to the Machining's database the Offset Str
|
|
''' </summary>
|
|
Public Property OffsetStr As String
|
|
Get
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
Dim sOffsetStr As String = String.Empty
|
|
EgtMdbGetCurrMachiningParam(MCH_MP.OFFSET_STR, sOffsetStr)
|
|
Return sOffsetStr
|
|
End Get
|
|
Set(value As String)
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
EgtMdbSetCurrMachiningParam(MCH_MP.OFFSET_STR, value)
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' Machining Property
|
|
|
|
#Region "Constructors"
|
|
|
|
Sub New(Name As String, Type As MCH_MY)
|
|
MyBase.New(Name)
|
|
Me.m_Type = Type
|
|
End Sub
|
|
|
|
Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean)
|
|
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
|
End Sub
|
|
|
|
#End Region ' Constructors
|
|
|
|
#Region "IDataErrorInfo Members"
|
|
|
|
Private ReadOnly Property IDataErrorInfo_Error() As String Implements IDataErrorInfo.Error
|
|
Get
|
|
Return Nothing
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property IDataErrorInfo_Item(ByVal propertyName As String) As String Implements IDataErrorInfo.Item
|
|
Get
|
|
ErrorOnTool = True
|
|
Return Me.GetValidationError(propertyName)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' IDataErrorInfo Members
|
|
|
|
#Region "Validation"
|
|
|
|
''' <summary>
|
|
''' Returns true if this object has no validation errors.
|
|
''' </summary>
|
|
Public ReadOnly Property IsValid() As Boolean
|
|
Get
|
|
For Each [property] As String In ValidatedProperties
|
|
If GetValidationError([property]) IsNot Nothing Then
|
|
Return False
|
|
End If
|
|
Next [property]
|
|
|
|
Return True
|
|
End Get
|
|
End Property
|
|
|
|
Private Shared ReadOnly ValidatedProperties() As String = {"Speed", "NamePar"}
|
|
|
|
Private Function GetValidationError(ByVal propertyName As String) As String
|
|
If Array.IndexOf(ValidatedProperties, propertyName) < 0 Then
|
|
Return Nothing
|
|
End If
|
|
|
|
Dim [error] As String = Nothing
|
|
|
|
Select Case propertyName
|
|
Case "Speed"
|
|
[error] = Me.ValidateSpeed()
|
|
Case "NamePar"
|
|
[error] = Me.ValidateName()
|
|
|
|
Case Else
|
|
'Debug.Fail("Unexpected property being validated on Tool: " & propertyName)
|
|
End Select
|
|
Return [error]
|
|
End Function
|
|
|
|
Private Function ValidateSpeed() As String
|
|
'Dim MaxSpeed As Double
|
|
'' Da leggere dall'utensile impostato per questa lavorazione
|
|
'If m_Speed > m_MaxSpeed Then
|
|
' Return "Il valore di Speed non può essere maggiore di quello di MaxSpeed"
|
|
'End If
|
|
Return Nothing
|
|
End Function
|
|
|
|
Private Function ValidateName() As String
|
|
If bErrorMachiningName Then
|
|
Return EgtMsg(MSG_MACHININGSERRORS + 2)
|
|
End If
|
|
Return Nothing
|
|
End Function
|
|
|
|
#End Region ' Validation
|
|
|
|
End Class
|
|
|
|
''' <summary>
|
|
''' Class that represent a FamilyMachining in the treeview.
|
|
''' It's an element in the treeview that represent a folder, but also a machining family
|
|
''' </summary>
|
|
Public Class FamilyMachiningTreeViewItem
|
|
Inherits ParentItem
|
|
|
|
Private m_MachiningType As MCH_MY
|
|
''' <summary>
|
|
''' Property that determines the machining type of the family
|
|
''' </summary>
|
|
Public Property MachiningType As MCH_MY
|
|
Get
|
|
Return m_MachiningType
|
|
End Get
|
|
Set(value As MCH_MY)
|
|
m_MachiningType = value
|
|
End Set
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Property that determines if the Machining is selected or not
|
|
''' </summary>
|
|
Public Overrides Property IsSelected As Boolean
|
|
Get
|
|
Return m_isSelected
|
|
End Get
|
|
Set(value As Boolean)
|
|
If (value <> m_isSelected) Then
|
|
m_isSelected = value
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
' Proprietà che permette di nascondere tutti i parametri di lavorazione grazie al binding ed al converter
|
|
Public ReadOnly Property Type As Integer
|
|
Get
|
|
Return MCH_MY.NONE
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Constructor that receive the name of the FamilyMachiningTreeViewItem, the MachiningType, and set
|
|
''' the picture(Folder.png)
|
|
''' </summary>
|
|
Sub New(Name As String, MachiningType As MCH_MY)
|
|
MyBase.New(Name)
|
|
Me.MachiningType = MachiningType
|
|
Me.PictureString = "/Resources/TreeView/Folder.png"
|
|
End Sub
|
|
|
|
Sub New(Name As String, PicturePath As String)
|
|
MyBase.New(Name)
|
|
Me.PictureString = PicturePath
|
|
End Sub
|
|
|
|
Sub New(Name As String, IsSelected As Boolean, IsExpanded As Boolean, IsActive As Boolean)
|
|
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
|
|
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 MachiningParamVisibilityConverter
|
|
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_MY.NONE
|
|
Return Visibility.Hidden
|
|
Case MCH_MY.DRILLING
|
|
Return SharedFieldsClass.Drilling(CInt(parameter))
|
|
Case MCH_MY.SAWING
|
|
Return SharedFieldsClass.Sawing(CInt(parameter))
|
|
Case MCH_MY.MILLING
|
|
Return SharedFieldsClass.Milling(CInt(parameter))
|
|
Case MCH_MY.POCKETING
|
|
Return SharedFieldsClass.Pocketing(CInt(parameter))
|
|
Case MCH_MY.MORTISING
|
|
Return SharedFieldsClass.Mortising(CInt(parameter))
|
|
Case MCH_MY.SAWROUGHING
|
|
Return SharedFieldsClass.Sawroughing(CInt(parameter))
|
|
Case MCH_MY.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 |