Files
EgtWPFLib5/MachiningDbWindow/MachiningTreeView.vb
T
Dario Sassi 769ab2f4aa EgtWPFLib5 :
- piccola modifica per evitare implicit conversion a string.
2020-02-14 07:33:00 +00:00

3749 lines
148 KiB
VB.net

Imports System.Collections.ObjectModel
Imports System.ComponentModel
Imports System.IO
Imports EgtUILib
''' <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 InheritableTreeViewItem
' Actions
Friend Shared m_delIsEnabledBtns As Action(Of Boolean, Boolean, Boolean)
Public Shared m_delNotifyPropertyChanged As Action(Of String)
''' <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 value Then
m_delNotifyPropertyChanged("ParamPageV")
m_delIsEnabledBtns(True, False, False)
End If
End If
End Set
End Property
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
' 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
Public ReadOnly Property FamilyColor As Brush
Get
If m_HaveInvalidMachining Then
Return Brushes.Red
Else
Return Brushes.Transparent
End If
End Get
End Property
Private m_HaveInvalidMachining As Boolean
Friend ReadOnly Property HaveInvalidMachining As Boolean
Get
Return m_HaveInvalidMachining
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, Parent As InheritableTreeViewItem)
MyBase.New(Name, Parent)
Me.MachiningType = MachiningType
Me.PictureString = "/Resources/TreeView/Folder.png"
' Aggiungo il gestore d'evento di modifica lista degli item per poter mettere e togliere il pallino che indica se ci sono utensili da attrezzare
VerifyMachiningValidity()
End Sub
Public Sub VerifyMachiningValidity()
m_HaveInvalidMachining = False
For Index = 0 To Items.Count - 1
Dim ToolItem As MachiningTreeViewItem = DirectCast(Items(Index), MachiningTreeViewItem)
If Not ToolItem.m_IsValidTool Then
m_HaveInvalidMachining = True
End If
Next
NotifyPropertyChanged("FamilyColor")
End Sub
End Class
''' <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 InheritableTreeViewItem
' Actions
Friend Shared m_delRemoveMachining As Action(Of MachiningTreeViewItem)
Friend Shared m_delErrorOnMachining As Action(Of Boolean)
Public Shared m_delIsEnabledBtns As Action(Of Boolean, Boolean, Boolean)
Public Shared m_delNotifyPropertyChanged As Action(Of String)
#Region "Machining 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 value Then
EgtSetCurrentContext(MachiningDbWindowVM.m_ProjectSceneContext)
EgtMdbSetCurrMachining(Me.Name)
ReadMachiningParam()
IsModifiedReset()
NotifyPropertyChanged("Type")
m_delNotifyPropertyChanged("ParamPageV")
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
Else
WriteMachiningParam()
If EgtMdbIsCurrMachiningModified() Or m_IsModifiedName Or Me.NewMachining Then
Select Case MsgBox(EgtMsg(MSG_MACHININGDBERRORS + 1), MsgBoxStyle.YesNo, EgtMsg(MSG_MACHININGDBERRORS + 2))
Case MsgBoxResult.Yes
m_NewMachining = False
m_Name = m_Name.Trim()
WriteMachiningName()
EgtMdbSaveCurrMachining()
Case MsgBoxResult.No
If m_NewMachining Then
m_delRemoveMachining(Me)
ElseIf m_IsModifiedName Then
Dim DbName As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, DbName)
NamePar = DbName
End If
End Select
End If
End If
NotifyPropertyChanged("IsSelected")
End If
End Set
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 DbInvert As Boolean = False
EgtMdbGetCurrMachiningParam(MCH_MP.INVERT, DbInvert)
m_IsModifiedInvert = If(value <> DbInvert, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("Invert")
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 DbLeaveTab As Boolean = False
EgtMdbGetCurrMachiningParam(MCH_MP.LEAVETAB, DbLeaveTab)
m_IsModifiedLeaveTab = If(value <> DbLeaveTab, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LeaveTab")
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 InvertToolDir As Boolean
Get
Return m_ToolInvert
End Get
Set(value As Boolean)
If value <> m_ToolInvert Then
m_ToolInvert = value
Dim DbToolInvert As Boolean = False
EgtMdbGetCurrMachiningParam(MCH_MP.TOOLINVERT, DbToolInvert)
m_IsModifiedToolInvert = If(value <> DbToolInvert, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("InvertToolDir")
End If
End Set
End Property
Private m_Type As MCH_MY
''' <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_MACHININGDB + 121)),
New IdNameStruct(MCH_MORTISE_WS.RIGHT, EgtMsg(MSG_MACHININGDB + 122))})
Case MCH_MY.CHISELING
m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_CHISEL_WS.LEFT, EgtMsg(MSG_MACHININGDB + 121)),
New IdNameStruct(MCH_CHISEL_WS.RIGHT, EgtMsg(MSG_MACHININGDB + 122))})
Case Else
m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_SAW_WS.CENTER, EgtMsg(MSG_MACHININGDB + 120)),
New IdNameStruct(MCH_SAW_WS.LEFT, EgtMsg(MSG_MACHININGDB + 121)),
New IdNameStruct(MCH_SAW_WS.RIGHT, EgtMsg(MSG_MACHININGDB + 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 DbWorkSide As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.WORKSIDE, DbWorkSide)
DbWorkSide = IdNameStruct.IndFromId(DbWorkSide, WorkSideList)
m_IsModifiedSelectedWorkSide = If(value <> DbWorkSide, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedWorkSide")
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_MACHININGDB + 121)), New IdNameStruct(MCH_SAW_HS.RIGHT, EgtMsg(MSG_MACHININGDB + 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 DbHeadSide As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.HEADSIDE, DbHeadSide)
DbHeadSide = IdNameStruct.IndFromId(DbHeadSide, HeadSideList)
m_IsModifiedSelectedHeadSide = If(value <> DbHeadSide, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedHeadSide")
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_MACHININGDB + 120)),
New IdNameStruct(MCH_SAW_LI.STRICT, EgtMsg(MSG_MACHININGDB + 125)),
New IdNameStruct(MCH_SAW_LI.OUT, EgtMsg(MSG_MACHININGDB + 126)),
New IdNameStruct(MCH_SAW_LI.EXT_CENT, EgtMsg(MSG_MACHININGDB + 127)),
New IdNameStruct(MCH_SAW_LI.EXT_OUT, EgtMsg(MSG_MACHININGDB + 128))})
Case MCH_MY.MILLING
m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(MSG_MACHININGDB + 129)),
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(MSG_MACHININGDB + 130)),
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(MSG_MACHININGDB + 131)),
New IdNameStruct(MCH_MIL_LI.GLIDE, EgtMsg(MSG_MACHININGDB + 132)),
New IdNameStruct(MCH_MIL_LI.ZIGZAG, EgtMsg(MSG_MACHININGDB + 142)),
New IdNameStruct(MCH_MIL_LI.HELIX, EgtMsg(MSG_MACHININGDB + 133))})
Case MCH_MY.POCKETING
m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_MACHININGDB + 129)),
New IdNameStruct(MCH_POCK_LI.GLIDE, EgtMsg(MSG_MACHININGDB + 132)),
New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_MACHININGDB + 142)),
New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_MACHININGDB + 133))})
Case MCH_MY.WATERJETTING
m_LeadInTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(31329)),
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(31330)),
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(31331))})
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 DbLeadInType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, DbLeadInType)
m_IsModifiedSelectedLeadInType = If(value <> DbLeadInType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedLeadInType")
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_MACHININGDB + 120)), New IdNameStruct(MCH_SAW_EL.EXT_PREV, EgtMsg(MSG_MACHININGDB + 134)), New IdNameStruct(MCH_SAW_EL.EXT_NEXT, EgtMsg(MSG_MACHININGDB + 135)), New IdNameStruct(MCH_SAW_EL.EXT_BOTH, EgtMsg(MSG_MACHININGDB + 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 DbExtLinkType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, DbExtLinkType)
m_IsModifiedSelectedExtLinkType = If(value <> DbExtLinkType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedExtLinkType")
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_MACHININGDB + 120)),
New IdNameStruct(MCH_SAW_LO.STRICT, EgtMsg(MSG_MACHININGDB + 125)),
New IdNameStruct(MCH_SAW_LO.OUT, EgtMsg(MSG_MACHININGDB + 126)),
New IdNameStruct(MCH_SAW_LO.EXT_CENT, EgtMsg(MSG_MACHININGDB + 127)),
New IdNameStruct(MCH_SAW_LO.EXT_OUT, EgtMsg(MSG_MACHININGDB + 128))})
Case MCH_MY.MILLING
m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(MSG_MACHININGDB + 129)),
New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(MSG_MACHININGDB + 130)),
New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(MSG_MACHININGDB + 131)),
New IdNameStruct(MCH_MIL_LO.GLIDE, EgtMsg(MSG_MACHININGDB + 132)),
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(MSG_MACHININGDB + 137))})
Case MCH_MY.POCKETING
m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_POCK_LO.NONE, EgtMsg(MSG_MACHININGDB + 129)),
New IdNameStruct(MCH_POCK_LO.GLIDE, EgtMsg(MSG_MACHININGDB + 132))})
Case MCH_MY.WATERJETTING
m_LeadOutTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(31329)),
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(31330)),
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(31331)),
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(31337))})
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 m_SelectedLeadOutType
End Get
Set(value As Integer)
If value <> m_SelectedLeadOutType Then
If Not IsNothing(LeadOutTypeList) Then
m_SelectedLeadOutType = value
Dim DbLeadOutType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LEADOUTTYPE, DbLeadOutType)
DbLeadOutType = IdNameStruct.IndFromId(DbLeadOutType, LeadOutTypeList)
m_IsModifiedSelectedLeadOutType = If(value <> DbLeadOutType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedLeadOutType")
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, MachiningDbWindowVM.m_sMachineIniPath) <> 0 Then
m_CurveUseList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_SAW_CU.SKIP, EgtMsg(MSG_MACHININGDB + 138)),
New IdNameStruct(MCH_SAW_CU.APPROX, EgtMsg(MSG_MACHININGDB + 139)),
New IdNameStruct(MCH_SAW_CU.CONVEX, EgtMsg(MSG_MACHININGDB + 140)),
New IdNameStruct(MCH_SAW_CU.KEEP, EgtMsg(MSG_MACHININGDB + 141))})
Else
m_CurveUseList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_SAW_CU.SKIP, EgtMsg(MSG_MACHININGDB + 138)),
New IdNameStruct(MCH_SAW_CU.APPROX, EgtMsg(MSG_MACHININGDB + 139)),
New IdNameStruct(MCH_SAW_CU.CONVEX, EgtMsg(MSG_MACHININGDB + 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 DbCurveUse As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.CURVEUSE, DbCurveUse)
m_IsModifiedSelectedCurveUse = If(value <> DbCurveUse, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedCurveUse")
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_MACHININGDB + 142)),
New IdNameStruct(MCH_SAW_ST.ONEWAY, EgtMsg(MSG_MACHININGDB + 143)),
New IdNameStruct(MCH_SAW_ST.TOANDFROM, EgtMsg(MSG_MACHININGDB + 145))})
Case MCH_MY.MILLING
m_StepTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_ST.ZIGZAG, EgtMsg(MSG_MACHININGDB + 142)),
New IdNameStruct(MCH_MIL_ST.ONEWAY, EgtMsg(MSG_MACHININGDB + 143)),
New IdNameStruct(MCH_MIL_ST.SPIRAL, EgtMsg(MSG_MACHININGDB + 144))})
Case MCH_MY.MORTISING
m_StepTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MORTISE_ST.ZIGZAG, EgtMsg(MSG_MACHININGDB + 142)),
New IdNameStruct(MCH_MORTISE_ST.ONEWAY, EgtMsg(MSG_MACHININGDB + 143))})
Case MCH_MY.SAWROUGHING, MCH_MY.SAWFINISHING
m_StepTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_SAWROU_ST.ZIGZAG, EgtMsg(MSG_MACHININGDB + 142)),
New IdNameStruct(MCH_SAWROU_ST.ONEWAY, EgtMsg(MSG_MACHININGDB + 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 = IdNameStruct.IndFromId(value, StepTypeList)
Dim DbStepType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STEPTYPE, DbStepType)
m_IsModifiedSelectedStepType = If(value <> DbStepType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedStepType")
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_MACHININGDB + 142)),
New IdNameStruct(MCH_POCK_SUB.ONEWAY, EgtMsg(MSG_MACHININGDB + 143)),
New IdNameStruct(MCH_POCK_SUB.SPIRALIN, EgtMsg(MSG_MACHININGDB + 148)),
New IdNameStruct(MCH_POCK_SUB.SPIRALOUT, EgtMsg(MSG_MACHININGDB + 149))})
Case MCH_MY.SAWFINISHING
m_SubTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_SAWFIN_SUB.ALONG, EgtMsg(MSG_MACHININGDB + 146)),
New IdNameStruct(MCH_SAWFIN_SUB.ACROSS, EgtMsg(MSG_MACHININGDB + 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, MachiningDbWindowVM.m_sMachineIniPath) > 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 DbSubType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.SUBTYPE, DbSubType)
DbSubType = IdNameStruct.IndFromId(DbSubType, SubTypeList)
m_IsModifiedSelectedSubType = If(value <> DbSubType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedSubType")
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_MACHININGDB + 120)), New IdNameStruct(MCH_SAWROU_LL.EXT, EgtMsg(MSG_MACHININGDB + 123))})
Case MCH_MY.SAWFINISHING
m_LeadLinkTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAWFIN_LL.STD, EgtMsg(MSG_MACHININGDB + 124)), New IdNameStruct(MCH_SAWFIN_LL.CENT, EgtMsg(MSG_MACHININGDB + 120)), New IdNameStruct(MCH_SAWFIN_LL.EXT, EgtMsg(MSG_MACHININGDB + 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 DbLeadLinkType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LEADLINKTYPE, DbLeadLinkType)
m_IsModifiedSelectedLeadLinkType = If(value <> DbLeadLinkType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedLeadLinkType")
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_MACHININGDB + 153)),
New IdNameStruct(MCH_MIL_FU.PARAL_DOWN, EgtMsg(MSG_MACHININGDB + 157) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_TOP, EgtMsg(MSG_MACHININGDB + 158) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_FRONT, EgtMsg(MSG_MACHININGDB + 159) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_BACK, EgtMsg(MSG_MACHININGDB + 160) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_LEFT, EgtMsg(MSG_MACHININGDB + 161) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_RIGHT, EgtMsg(MSG_MACHININGDB + 162) & EgtMsg(MSG_MACHININGDB + 154))})
Case Else
m_FaceUseTypeList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_FU.NONE, EgtMsg(MSG_MACHININGDB + 153)),
New IdNameStruct(MCH_MIL_FU.PARAL_DOWN, EgtMsg(MSG_MACHININGDB + 157) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_TOP, EgtMsg(MSG_MACHININGDB + 158) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_FRONT, EgtMsg(MSG_MACHININGDB + 159) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_BACK, EgtMsg(MSG_MACHININGDB + 160) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_LEFT, EgtMsg(MSG_MACHININGDB + 161) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.PARAL_RIGHT, EgtMsg(MSG_MACHININGDB + 162) & EgtMsg(MSG_MACHININGDB + 154)),
New IdNameStruct(MCH_MIL_FU.ORTHO_DOWN, EgtMsg(MSG_MACHININGDB + 157) & EgtMsg(MSG_MACHININGDB + 155)),
New IdNameStruct(MCH_MIL_FU.ORTHO_TOP, EgtMsg(MSG_MACHININGDB + 158) & EgtMsg(MSG_MACHININGDB + 155)),
New IdNameStruct(MCH_MIL_FU.ORTHO_FRONT, EgtMsg(MSG_MACHININGDB + 159) & EgtMsg(MSG_MACHININGDB + 155)),
New IdNameStruct(MCH_MIL_FU.ORTHO_BACK, EgtMsg(MSG_MACHININGDB + 160) & EgtMsg(MSG_MACHININGDB + 155)),
New IdNameStruct(MCH_MIL_FU.ORTHO_LEFT, EgtMsg(MSG_MACHININGDB + 161) & EgtMsg(MSG_MACHININGDB + 155)),
New IdNameStruct(MCH_MIL_FU.ORTHO_RIGHT, EgtMsg(MSG_MACHININGDB + 162) & EgtMsg(MSG_MACHININGDB + 155)),
New IdNameStruct(MCH_MIL_FU.ORTHO_CONT, EgtMsg(MSG_MACHININGDB + 163) & EgtMsg(MSG_MACHININGDB + 155)),
New IdNameStruct(MCH_MIL_FU.ORTUP_DOWN, EgtMsg(MSG_MACHININGDB + 157) & EgtMsg(MSG_MACHININGDB + 156)),
New IdNameStruct(MCH_MIL_FU.ORTUP_TOP, EgtMsg(MSG_MACHININGDB + 158) & EgtMsg(MSG_MACHININGDB + 156)),
New IdNameStruct(MCH_MIL_FU.ORTUP_FRONT, EgtMsg(MSG_MACHININGDB + 159) & EgtMsg(MSG_MACHININGDB + 156)),
New IdNameStruct(MCH_MIL_FU.ORTUP_BACK, EgtMsg(MSG_MACHININGDB + 160) & EgtMsg(MSG_MACHININGDB + 156)),
New IdNameStruct(MCH_MIL_FU.ORTUP_LEFT, EgtMsg(MSG_MACHININGDB + 161) & EgtMsg(MSG_MACHININGDB + 156)),
New IdNameStruct(MCH_MIL_FU.ORTUP_RIGHT, EgtMsg(MSG_MACHININGDB + 162) & EgtMsg(MSG_MACHININGDB + 156)),
New IdNameStruct(MCH_MIL_FU.ORTUP_CONT, EgtMsg(MSG_MACHININGDB + 163) & EgtMsg(MSG_MACHININGDB + 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
EgtMdbGetCurrMachiningParam(MCH_MP.FACEUSE, OrigFaceUseType)
OrigFaceUseType = IdNameStruct.IndFromId(OrigFaceUseType, FaceUseTypeList)
m_IsModifiedSelectedFaceUseType = If(value <> OrigFaceUseType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedFaceUseType")
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_MACHININGDB + 105)),
New IdNameStruct(MCH_SCC.STD, EgtMsg(MSG_MACHININGDB + 106)),
New IdNameStruct(MCH_SCC.OPPOSITE, EgtMsg(MSG_MACHININGDB + 107)),
New IdNameStruct(MCH_SCC.ADIR_XP, EgtMsg(MSG_MACHININGDB + 108)),
New IdNameStruct(MCH_SCC.ADIR_XM, EgtMsg(MSG_MACHININGDB + 109)),
New IdNameStruct(MCH_SCC.ADIR_YP, EgtMsg(MSG_MACHININGDB + 110)),
New IdNameStruct(MCH_SCC.ADIR_YM, EgtMsg(MSG_MACHININGDB + 111)),
New IdNameStruct(MCH_SCC.ADIR_ZP, EgtMsg(MSG_MACHININGDB + 112)),
New IdNameStruct(MCH_SCC.ADIR_ZM, EgtMsg(MSG_MACHININGDB + 113)),
New IdNameStruct(MCH_SCC.ADIR_NEAR, EgtMsg(MSG_MACHININGDB + 114)),
New IdNameStruct(MCH_SCC.ADIR_FAR, EgtMsg(MSG_MACHININGDB + 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_SAW_EL)
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 DbSolChoiceType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.SOLCHOICETYPE, DbSolChoiceType)
DbSolChoiceType = IdNameStruct.IndFromId(DbSolChoiceType, SolChoiceTypeList)
m_IsModifiedSelectedSolChoiceType = If(value <> DbSolChoiceType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedSolChoiceType")
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 DbSpeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.SPEED, DbSpeed)
StringToDouble(value, dValue)
m_IsModifiedSpeed = Math.Abs(dValue - DbSpeed) > 10 * EPS_ANG_SMALL
If Not GetValidationError("Speed") Then
m_delErrorOnMachining(True)
m_delIsEnabledBtns(False, False, True)
Else
m_delErrorOnMachining(Not IsValid)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
End If
NotifyPropertyChanged("Speed")
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 DbFeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.FEED, DbFeed)
StringToLen(value, dValue)
m_IsModifiedFeed = Math.Abs(dValue - DbFeed) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("Feed")
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 DbStartFeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STARTFEED, DbStartFeed)
StringToLen(value, dValue)
m_IsModifiedStartFeed = Math.Abs(dValue - DbStartFeed) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StartFeed")
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 DbEndFeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.ENDFEED, DbEndFeed)
StringToLen(value, dValue)
m_IsModifiedEndFeed = Math.Abs(dValue - DbEndFeed) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("EndFeed")
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 DbTipFeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.TIPFEED, DbTipFeed)
StringToLen(value, dValue)
m_IsModifiedTipFeed = Math.Abs(dValue - DbTipFeed) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("TipFeed")
End If
End Set
End Property
Private m_IsModifiedBackFeed As Boolean = False
Private m_BackFeed As String
''' <summary>
''' Property that read and write to the Machining's database the Tip Feed
''' </summary>
Public Property BackFeed As String
Get
Return m_BackFeed
End Get
Set(value As String)
If value <> m_BackFeed Then
m_BackFeed = value
Dim DbBackFeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.BACKFEED, DbBackFeed)
StringToLen(value, dValue)
m_IsModifiedBackFeed = Math.Abs(dValue - DbBackFeed) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("BackFeed")
End If
End Set
End Property
Private m_IsModifiedThicknessFeed As Boolean = False
Private m_ThicknessFeed As String
''' <summary>
''' Property that read and write to the Machining's database the Thickness Feed
''' </summary>
Public Property ThicknessFeed As String
Get
Return m_ThicknessFeed
End Get
Set(value As String)
If value <> m_ThicknessFeed Then
m_ThicknessFeed = value
Dim DbThicknessFeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.THICKREF, DbThicknessFeed)
StringToLen(value, dValue)
m_IsModifiedThicknessFeed = Math.Abs(dValue - DbThicknessFeed) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("ThicknessFeed")
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 DbOffSr As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.OFFSR, DbOffSr)
StringToLen(value, dValue)
m_IsModifiedOffSr = Math.Abs(dValue - DbOffSr) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("OffSr")
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 DbOffSl As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.OFFSL, DbOffSl)
StringToLen(value, dValue)
m_IsModifiedOffSl = Math.Abs(dValue - DbOffSl) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("OffSl")
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 DbSideAngle As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGLE, DbSideAngle)
StringToLen(value, dValue)
m_IsModifiedSideAngle = Math.Abs(dValue - DbSideAngle) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SideAngle")
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 DbApprox As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.APPROX, DbApprox)
StringToLen(value, dValue)
m_IsModifiedApprox = Math.Abs(dValue - DbApprox) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("Approx")
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 DbStartPos As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STARTPOS, DbStartPos)
StringToLen(value, dValue)
m_IsModifiedStartPos = Math.Abs(dValue - DbStartPos) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StartPos")
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 DbStartSlowLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STARTSLOWLEN, DbStartSlowLen)
StringToLen(value, dValue)
m_IsModifiedStartSlowLen = Math.Abs(dValue - DbStartSlowLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StartSlowLen")
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 DbEndSlowLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.ENDSLOWLEN, DbEndSlowLen)
StringToLen(value, dValue)
m_IsModifiedEndSlowLen = Math.Abs(dValue - DbEndSlowLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("EndSlowLen")
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 DbThrouAddLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.THROUADDLEN, DbThrouAddLen)
StringToLen(value, dValue)
m_IsModifiedThrouAddLen = Math.Abs(dValue - DbThrouAddLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("ThrouAddLen")
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 DbStepPar As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STEP_, DbStepPar)
StringToLen(value, dValue)
m_IsModifiedStepPar = Math.Abs(dValue - DbStepPar) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StepPar")
End If
End Set
End Property
Private m_IsModifiedStepBack As Boolean = False
Private m_StepBack As String
''' <summary>
''' Property that read and write to the Machining's database the Step Par
''' </summary>
Public Property StepBack As String
Get
Return m_StepBack
End Get
Set(value As String)
If value <> m_StepBack Then
m_StepBack = value
Dim DbStepBack As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STEPBACK, DbStepBack)
StringToLen(value, dValue)
m_IsModifiedStepBack = Math.Abs(dValue - DbStepBack) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StepBack")
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 DbReturnPos As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.RETURNPOS, DbReturnPos)
StringToLen(value, dValue)
m_IsModifiedReturnPos = Math.Abs(dValue - DbReturnPos) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("ReturnPos")
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 DbOverLap As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.OVERL, DbOverLap)
StringToLen(value, dValue)
m_IsModifiedOverLap = Math.Abs(dValue - DbOverLap) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("OverLap")
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 DbTabLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.TABLEN, DbTabLen)
StringToLen(value, dValue)
m_IsModifiedTabLen = Math.Abs(dValue - DbTabLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("TabLen")
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 DbTabDist As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.TABDIST, DbTabDist)
StringToLen(value, dValue)
m_IsModifiedTabDist = Math.Abs(dValue - DbTabDist) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("TabDist")
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 DbTabHeight As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.TABHEIGHT, DbTabHeight)
StringToLen(value, dValue)
m_IsModifiedTabHeight = Math.Abs(dValue - DbTabHeight) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("TabHeight")
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 DbTabAngle As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.TABANGLE, DbTabAngle)
StringToLen(value, dValue)
m_IsModifiedTabAngle = Math.Abs(dValue - DbTabAngle) > 10 * EPS_ANG_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("TabAngle")
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 DbLiTang As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LITANG, DbLiTang)
StringToLen(value, dValue)
m_IsModifiedLiTang = Math.Abs(dValue - DbLiTang) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LiTang")
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 DbLiPerp As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LIPERP, DbLiPerp)
StringToLen(value, dValue)
m_IsModifiedLiPerp = Math.Abs(dValue - DbLiPerp) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LiPerp")
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 DbLiElev As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LIELEV, DbLiElev)
StringToLen(value, dValue)
m_IsModifiedLiElev = Math.Abs(dValue - DbLiElev) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LiElev")
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 DbLiCompLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LICOMPLEN, DbLiCompLen)
StringToLen(value, dValue)
m_IsModifiedLiCompLen = Math.Abs(dValue - DbLiCompLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LiCompLen")
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 DbLoTang As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LOTANG, DbLoTang)
StringToLen(value, dValue)
m_IsModifiedLoTang = Math.Abs(dValue - DbLoTang) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LoTang")
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 DbLoPerp As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LOPERP, DbLoPerp)
StringToLen(value, dValue)
m_IsModifiedLoPerp = Math.Abs(dValue - DbLoPerp) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LoPerp")
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 DbLoElev As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LOELEV, DbLoElev)
StringToLen(value, dValue)
m_IsModifiedLoElev = Math.Abs(dValue - DbLoElev) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LoElev")
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 DbLoCompLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LOCOMPLEN, DbLoCompLen)
StringToLen(value, dValue)
m_IsModifiedLoCompLen = Math.Abs(dValue - DbLoCompLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LoCompLen")
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 DbStartAddLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STARTADDLEN, DbStartAddLen)
StringToLen(value, dValue)
m_IsModifiedStartAddLen = Math.Abs(dValue - DbStartAddLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StartAddLen")
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 DbEndAddLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.ENDADDLEN, DbEndAddLen)
StringToLen(value, dValue)
m_IsModifiedEndAddLen = Math.Abs(dValue - DbEndAddLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("EndAddLen")
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 DbStepExtArc As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STEPEXTARC, DbStepExtArc)
StringToLen(value, dValue)
m_IsModifiedStepExtArc = Math.Abs(dValue - DbStepExtArc) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StepExtArc")
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 DbStepIntArc As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STEPINTARC, DbStepIntArc)
StringToLen(value, dValue)
m_IsModifiedStepIntArc = Math.Abs(dValue - DbStepIntArc) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StepIntArc")
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 DbSideStep As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.SIDESTEP, DbSideStep)
StringToLen(value, dValue)
m_IsModifiedSideStep = Math.Abs(dValue - DbSideStep) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SideStep")
End If
End Set
End Property
Private m_IsModifiedStepSideAng As Boolean = False
Private m_StepSideAng As String
''' <summary>
''' Property that read and write to the Machining's database the Side Step
''' </summary>
Public Property StepSideAng As String
Get
Return m_StepSideAng
End Get
Set(value As String)
If value <> m_StepSideAng Then
m_StepSideAng = value
Dim DbStepSideAng As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STEPSIDEANG, DbStepSideAng)
StringToLen(value, dValue)
m_IsModifiedStepSideAng = Math.Abs(dValue - DbStepSideAng) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StepSideAng")
End If
End Set
End Property
Private m_IsModifiedStepSideAngBack As Boolean = False
Private m_StepSideAngBack As String
''' <summary>
''' Property that read and write to the Machining's database the Side Step
''' </summary>
Public Property StepSideAngBack As String
Get
Return m_StepSideAngBack
End Get
Set(value As String)
If value <> m_StepSideAngBack Then
m_StepSideAngBack = value
Dim DbStepSideAngBack As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.STEPSIDEANGBACK, DbStepSideAngBack)
StringToLen(value, dValue)
m_IsModifiedStepSideAngBack = Math.Abs(dValue - DbStepSideAngBack) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("StepSideAngBack")
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 DbVertFeed As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.VERTFEED, DbVertFeed)
StringToLen(value, dValue)
m_IsModifiedVertFeed = Math.Abs(dValue - DbVertFeed) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("VertFeed")
End If
End Set
End Property
Private m_IsModifiedOscEnable As Boolean = False
Private m_OscEnable As Boolean
''' <summary>
''' Property that read and write to the Machining's database the Oscillation
''' </summary>
Public Property OscEnable As Boolean
Get
Return m_OscEnable
End Get
Set(value As Boolean)
If value <> m_OscEnable Then
m_OscEnable = value
Dim DbOscEnable As Boolean = False
EgtMdbGetCurrMachiningParam(MCH_MP.OSCENABLE, DbOscEnable)
m_IsModifiedOscEnable = If(value <> DbOscEnable, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("OscEnable")
End If
End Set
End Property
Private m_IsModifiedOscHeight As Boolean = False
Private m_OscHeight As String
''' <summary>
''' Property that read and write to the Machining's database the Oscillation Height
''' </summary>
Public Property OscHeight As String
Get
Return m_OscHeight
End Get
Set(value As String)
If value <> m_OscHeight Then
m_OscHeight = value
Dim OrigOscHeight As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.OSCHEIGHT, OrigOscHeight)
StringToLen(value, dValue)
m_IsModifiedOscHeight = Math.Abs(dValue - OrigOscHeight) > 10 * EPS_SMALL
NotifyPropertyChanged("OscHeight")
End If
End Set
End Property
Private m_IsModifiedOscRampLen As Boolean = False
Private m_OscRampLen As String
''' <summary>
''' Property that read and write to the Machining's database the Oscillation Ramp Length
''' </summary>
Public Property OscRampLen As String
Get
Return m_OscRampLen
End Get
Set(value As String)
If value <> m_OscRampLen Then
m_OscRampLen = value
Dim OrigOscRampLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.OSCRAMPLEN, OrigOscRampLen)
StringToLen(value, dValue)
m_IsModifiedOscRampLen = Math.Abs(dValue - OrigOscRampLen) > 10 * EPS_SMALL
NotifyPropertyChanged("OscRampLen")
End If
End Set
End Property
Private m_IsModifiedOscFlatLen As Boolean = False
Private m_OscFlatLen As String
''' <summary>
''' Property that read and write to the Machining's database the Oscillation Flat Length
''' </summary>
Public Property OscFlatLen As String
Get
Return m_OscFlatLen
End Get
Set(value As String)
If value <> m_OscFlatLen Then
m_OscFlatLen = value
Dim OrigOscFlatLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.OSCFLATLEN, OrigOscFlatLen)
StringToLen(value, dValue)
m_IsModifiedOscFlatLen = Math.Abs(dValue - OrigOscFlatLen) > 10 * EPS_SMALL
NotifyPropertyChanged("OscFlatLen")
End If
End Set
End Property
' Variabile che indica se c'è un errore nel nome della lavorazione (ad esempio nome già utilizzato)
Dim nErrorMachiningName As Integer = 0
Friend m_IsModifiedName As Boolean = False
''' <summary>
''' Property that read and write to the machining's database the Name
''' </summary>
Public Property NamePar As String
Get
Return m_Name
End Get
Set(value As String)
If value = String.Empty Or value <> m_Name Then
nErrorMachiningName = 0
m_Name = value
' Verifico se il nome è diverso da quello nel database e imposto l'apposito flag
Dim DbName As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, DbName)
m_IsModifiedName = If(value <> DbName, True, False)
' Verifico che il nuovo nome sia valido
Dim sTempName As String = value
EgtMdbGetMachiningNewName(sTempName)
If m_IsModifiedName And Not value = sTempName Then
nErrorMachiningName = 1
End If
If Not GetValidationError("NamePar") Then
m_delErrorOnMachining(True)
m_delIsEnabledBtns(False, False, True)
Else
m_delErrorOnMachining(Not IsValid)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
End If
NotifyPropertyChanged("NamePar")
End If
End Set
End Property
''' <summary>
''' ObservableCollection che contiene le variabili per il combobox Tool
''' </summary>
Private m_ToolList As ObservableCollection(Of String)
Public ReadOnly Property ToolList As ObservableCollection(Of String)
Get
Select Case m_Type
Case MCH_MY.DRILLING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.DRILL_STD, m_ToolList)
FindToolByType(MCH_TY.DRILL_LONG, m_ToolList)
FindToolByType(MCH_TY.MILL_STD, m_ToolList)
Case MCH_MY.SAWING, MCH_MY.SAWROUGHING, MCH_MY.SAWFINISHING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.SAW_STD, m_ToolList)
FindToolByType(MCH_TY.SAW_FLAT, m_ToolList)
Case MCH_MY.MILLING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.SAW_STD, m_ToolList)
FindToolByType(MCH_TY.SAW_FLAT, m_ToolList)
FindToolByType(MCH_TY.MILL_STD, m_ToolList)
FindToolByType(MCH_TY.MILL_NOTIP, m_ToolList)
FindToolByType(MCH_TY.COMPO, m_ToolList)
Case MCH_MY.POCKETING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.MILL_STD, m_ToolList)
FindToolByType(MCH_TY.MILL_NOTIP, m_ToolList)
Case MCH_MY.MORTISING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.MORTISE_STD, m_ToolList)
Case MCH_MY.GENMACHINING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.DRILL_STD, m_ToolList)
FindToolByType(MCH_TY.DRILL_LONG, m_ToolList)
FindToolByType(MCH_TY.SAW_STD, m_ToolList)
FindToolByType(MCH_TY.SAW_FLAT, m_ToolList)
FindToolByType(MCH_TY.MILL_STD, m_ToolList)
FindToolByType(MCH_TY.MILL_NOTIP, m_ToolList)
FindToolByType(MCH_TY.COMPO, m_ToolList)
Case MCH_MY.CHISELING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.CHISEL_STD, m_ToolList)
Case MCH_MY.WATERJETTING
m_ToolList = New ObservableCollection(Of String)
FindToolByType(MCH_TY.WATERJET, m_ToolList)
Case Else
m_ToolList = Nothing
End Select
Return m_ToolList
End Get
End Property
''' <summary>
''' Method that search all tools in Db of a specified type
''' </summary>
Private Sub FindToolByType(ToolType As MCH_TY, ToolList As ObservableCollection(Of String))
Dim nType As Integer = 0
Dim ToolName As String = String.Empty
If EgtTdbGetFirstTool(ToolType, ToolName, nType) Then
If nType = ToolType Then m_ToolList.Add(ToolName)
While EgtTdbGetNextTool(ToolType, ToolName, nType)
If nType = ToolType Then m_ToolList.Add(ToolName)
End While
End If
End Sub
' Variabile che indica quando questa variabile viene modificata dalla letttura dei parametri e non dall'utente
Dim ReadTool As Boolean = False
Private m_IsModifiedSelectedTool As Boolean = False
Private m_SelectedTool As Integer
''' <summary>
''' Property that read and write to the Machining's database the Tool
''' </summary>
Public Property SelectedTool As Integer
Get
Return m_SelectedTool
End Get
Set(value As Integer)
If value <> m_SelectedTool Then
m_SelectedTool = value
If value <> -1 Then
Dim DbSelectedTool As String = String.Empty
EgtSetCurrentContext(MachiningDbWindowVM.m_ProjectSceneContext)
EgtTdbGetCurrToolParam(MCH_MP.TOOL, DbSelectedTool)
m_IsModifiedSelectedTool = If(m_ToolList(value) <> DbSelectedTool, True, False)
If Not ReadTool Then
EgtTdbSetCurrTool(m_ToolList(value))
Dim dVal As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dVal)
Speed = DoubleToString(dVal, 4)
EgtTdbGetCurrToolParam(MCH_TP.FEED, dVal)
Feed = LenToString(dVal, 4)
EgtTdbGetCurrToolParam(MCH_TP.STARTFEED, dVal)
StartFeed = LenToString(dVal, 4)
EgtTdbGetCurrToolParam(MCH_TP.ENDFEED, dVal)
EndFeed = LenToString(dVal, 4)
EgtTdbGetCurrToolParam(MCH_TP.TIPFEED, dVal)
TipFeed = LenToString(dVal, 4)
EgtTdbGetCurrToolParam(MCH_TP.LONOFFSET, dVal)
OffSr = LenToString(dVal, 4)
EgtTdbGetCurrToolParam(MCH_TP.RADOFFSET, dVal)
OffSl = LenToString(dVal, 4)
End If
End If
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedTool")
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
EgtMdbGetCurrMachiningParam(MCH_MP.DEPTH_STR, DbDepthStr)
m_IsModifiedDepthStr = If(value <> DbDepthStr, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("DepthStr")
End If
End Set
End Property
Private m_Uuid As String
''' <summary>
''' Property that read and write to the tool's database the Uuid
''' </summary>
Public ReadOnly Property Uuid As String
Get
Return m_Uuid
End Get
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 DbUserNotes As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, DbUserNotes)
m_IsModifiedUserNotes = If(value <> DbUserNotes, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("UserNotes")
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 DbInitAngs As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.INITANGS, DbInitAngs)
m_IsModifiedInitAngs = If(value <> DbInitAngs, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("InitAngs")
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 DbBlockedAxis As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.BLOCKEDAXIS, DbBlockedAxis)
m_IsModifiedBlockedAxis = If(value <> DbBlockedAxis, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("BlockedAxis")
End If
End Set
End Property
Public ReadOnly Property ToolColor As Brush
Get
If Not m_IsValidTool Then
Return Brushes.Red
Else
Return Brushes.Transparent
End If
End Get
End Property
Friend m_IsValidTool As Boolean
''' <summary>
''' Property that read and write to the tool's database the Exit
''' </summary>
Public Property IsValidTool As Boolean
Get
Return m_IsValidTool
End Get
Set(value As Boolean)
If value <> m_IsValidTool Then
m_IsValidTool = value
NotifyPropertyChanged("ToolColor")
End If
End Set
End Property
Private m_IsModifiedForwardAngle As Boolean = False
Private m_ForwardAngle As String
''' <summary>
''' Property that read and write to the Machining's database the ForwardAngle
''' </summary>
Public Property ForwardAngle As String
Get
Return m_ForwardAngle
End Get
Set(value As String)
If value <> m_ForwardAngle Then
m_ForwardAngle = value
Dim DbForwardAngle As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.FORWARDANGLE, DbForwardAngle)
StringToDouble(value, dValue)
m_IsModifiedForwardAngle = Math.Abs(dValue - DbForwardAngle) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("ForwardAngle")
End If
End Set
End Property
Private m_IsModifiedProbing As Boolean = False
Private m_Probing As Boolean
''' <summary>
''' Property that read and write to the Machining's database the Probing
''' </summary>
Public Property Probing As Boolean
Get
Return m_Probing
End Get
Set(value As Boolean)
If value <> m_Probing Then
m_Probing = value
Dim DbProbing As Boolean = False
EgtMdbGetCurrMachiningParam(MCH_MP.PROBING, DbProbing)
m_IsModifiedProbing = If(value <> DbProbing, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("Probing")
End If
End Set
End Property
Private m_IsModifiedProbingMinDist As Boolean = False
Private m_ProbingMinDist As String
''' <summary>
''' Property that read and write to the Machining's database the ProbingMinDist
''' </summary>
Public Property ProbingMinDist As String
Get
Return m_ProbingMinDist
End Get
Set(value As String)
If value <> m_ProbingMinDist Then
m_ProbingMinDist = value
Dim DbProbingMinDist As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.PROBINGMINDIST, DbProbingMinDist)
StringToLen(value, dValue)
m_IsModifiedProbingMinDist = Math.Abs(dValue - DbProbingMinDist) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("ProbingMinDist")
End If
End Set
End Property
Private m_IsModifiedProbingMaxDist As Boolean = False
Private m_ProbingMaxDist As String
''' <summary>
''' Property that read and write to the Machining's database the ProbingMaxDist
''' </summary>
Public Property ProbingMaxDist As String
Get
Return m_ProbingMaxDist
End Get
Set(value As String)
If value <> m_ProbingMaxDist Then
m_ProbingMaxDist = value
Dim DbProbingMaxDist As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.PROBINGMAXDIST, DbProbingMaxDist)
StringToLen(value, dValue)
m_IsModifiedProbingMaxDist = Math.Abs(dValue - DbProbingMaxDist) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("ProbingMaxDist")
End If
End Set
End Property
'ObservableCollection che contiene le variabili per il combobox ExtCornType
Private m_ExtCornTypeList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_WATERJET_EC.NONE, EgtMsg(31391)), New IdNameStruct(MCH_WATERJET_EC.SLOW, EgtMsg(31392)), New IdNameStruct(MCH_WATERJET_EC.LOOP_, EgtMsg(31393))})
Public ReadOnly Property ExtCornTypeList As ObservableCollection(Of IdNameStruct)
Get
Return m_ExtCornTypeList
End Get
End Property
Private m_IsModifiedSelectedExtCornType As Boolean = False
Private m_SelectedExtCornType As Integer
' Proprietà che indica il ExtCornType (MCH_WATERJET_EC)
Public Property SelectedExtCornType As Integer
Get
If IsNothing(ExtCornTypeList) Then Return Nothing
Return m_SelectedExtCornType
End Get
Set(value As Integer)
If value <> m_SelectedExtCornType Then
If Not IsNothing(ExtCornTypeList) Then
m_SelectedExtCornType = value
Dim DbExtCornType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.EXTCORNERTYPE, DbExtCornType)
DbExtCornType = IdNameStruct.IndFromId(DbExtCornType, ExtCornTypeList)
m_IsModifiedSelectedExtCornType = If(value <> DbExtCornType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedExtCornType")
End If
End If
End Set
End Property
'ObservableCollection che contiene le variabili per il combobox IntCornType
Private m_IntCornTypeList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_WATERJET_IC.NONE, EgtMsg(31391)), New IdNameStruct(MCH_WATERJET_IC.SLOW, EgtMsg(31392))})
Public ReadOnly Property IntCornTypeList As ObservableCollection(Of IdNameStruct)
Get
Return m_IntCornTypeList
End Get
End Property
Private m_IsModifiedSelectedIntCornType As Boolean = False
Private m_SelectedIntCornType As Integer
' Proprietà che indica il IntCornType (MCH_WATERJET_IC)
Public Property SelectedIntCornType As Integer
Get
If IsNothing(IntCornTypeList) Then Return Nothing
Return m_SelectedIntCornType
End Get
Set(value As Integer)
If value <> m_SelectedIntCornType Then
If Not IsNothing(IntCornTypeList) Then
m_SelectedIntCornType = value
Dim DbIntCornType As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.INTCORNERTYPE, DbIntCornType)
DbIntCornType = IdNameStruct.IndFromId(DbIntCornType, IntCornTypeList)
m_IsModifiedSelectedIntCornType = If(value <> DbIntCornType, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("SelectedIntCornType")
End If
End If
End Set
End Property
Private m_IsModifiedCornSlowLen As Boolean = False
Private m_CornSlowLen As String
''' <summary>
''' Property that read and write to the Machining's database the CornSlowLen
''' </summary>
Public Property CornSlowLen As String
Get
Return m_CornSlowLen
End Get
Set(value As String)
If value <> m_CornSlowLen Then
m_CornSlowLen = value
Dim DbCornSlowLen As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.CORNERSLOWLEN, DbCornSlowLen)
StringToLen(value, dValue)
m_IsModifiedCornSlowLen = Math.Abs(dValue - DbCornSlowLen) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("CornSlowLen")
End If
End Set
End Property
Private m_IsModifiedCornSlowPerc As Boolean = False
Private m_CornSlowPerc As Integer
''' <summary>
''' Property that read and write to the Machining's database the CornSlowPerc
''' </summary>
Public Property CornSlowPerc As Integer
Get
Return m_CornSlowPerc
End Get
Set(value As Integer)
If value <> m_CornSlowPerc Then
m_CornSlowPerc = value
Dim DbCornSlowPerc As Integer = 0
Dim nValue As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.CORNERSLOWPERC, DbCornSlowPerc)
nValue = value
m_IsModifiedCornSlowPerc = Math.Abs(nValue - DbCornSlowPerc) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("CornSlowPerc")
End If
End Set
End Property
Private m_IsModifiedLiHole As Boolean = False
Private m_LiHole As Boolean
''' <summary>
''' Property that read and write to the Machining's database the LiHole
''' </summary>
Public Property LiHole As Boolean
Get
Return m_LiHole
End Get
Set(value As Boolean)
If value <> m_LiHole Then
m_LiHole = value
Dim DbLiHole As Boolean = False
EgtMdbGetCurrMachiningParam(MCH_MP.LIHOLE, DbLiHole)
m_IsModifiedLiHole = If(value <> DbLiHole, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LiHole")
End If
End Set
End Property
Private m_IsModifiedLiHoleRad As Boolean = False
Private m_LiHoleRad As String
''' <summary>
''' Property that read and write to the Machining's database the LiHoleRad
''' </summary>
Public Property LiHoleRad As String
Get
Return m_LiHoleRad
End Get
Set(value As String)
If value <> m_LiHoleRad Then
m_LiHoleRad = value
Dim DbLiHoleRad As Double = 0
Dim dValue As Double = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LIHOLERAD, DbLiHoleRad)
StringToLen(value, dValue)
m_IsModifiedLiHoleRad = Math.Abs(dValue - DbLiHoleRad) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LiHoleRad")
End If
End Set
End Property
Private m_IsModifiedLpTurns As Boolean = False
Private m_LpTurns As Integer
''' <summary>
''' Property that read and write to the Machining's database the LpTurns
''' </summary>
Public Property LpTurns As Integer
Get
Return m_LpTurns
End Get
Set(value As Integer)
If value <> m_LpTurns Then
m_LpTurns = value
Dim DbLpTurns As Integer = 0
Dim nValue As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.LPTURNS, DbLpTurns)
nValue = value
m_IsModifiedLpTurns = Math.Abs(nValue - DbLpTurns) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("LpTurns")
End If
End Set
End Property
Private m_IsModifiedHpTurns As Boolean = False
Private m_HpTurns As Integer
''' <summary>
''' Property that read and write to the Machining's database the HpTurns
''' </summary>
Public Property HpTurns As Integer
Get
Return m_HpTurns
End Get
Set(value As Integer)
If value <> m_HpTurns Then
m_HpTurns = value
Dim DbHpTurns As Integer = 0
Dim nValue As Integer = 0
EgtMdbGetCurrMachiningParam(MCH_MP.HPTURNS, DbHpTurns)
nValue = value
m_IsModifiedHpTurns = Math.Abs(nValue - DbHpTurns) > 10 * EPS_SMALL
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid, True)
NotifyPropertyChanged("HpTurns")
End If
End Set
End Property
'ObservableCollection che contiene le variabili per il combobox LeadInType
Private m_MaterialList As New ObservableCollection(Of MachiningMaterial)
Public Property MaterialList As ObservableCollection(Of MachiningMaterial)
Get
Return m_MaterialList
End Get
Set(value As ObservableCollection(Of MachiningMaterial))
m_MaterialList = value
End Set
End Property
Private m_SelMaterial As MachiningMaterial
Public Property SelMaterial As MachiningMaterial
Get
Return m_SelMaterial
End Get
Set(value As MachiningMaterial)
m_SelMaterial = value
End Set
End Property
Private m_IsModifiedSystemNotes As Boolean = False
Private m_SystemNotes As String
''' <summary>
''' Property that read and write to the Machining's database the User Notes
''' </summary>
Public Property SystemNotes As String
Get
Return m_SystemNotes
End Get
Set(value As String)
If value = String.Empty Or value <> m_SystemNotes Then
m_SystemNotes = value
Dim DbSystemNotes As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, DbSystemNotes)
m_IsModifiedSystemNotes = If(value <> DbSystemNotes, True, False)
m_delIsEnabledBtns(IsValid And Not IsModified, IsValid And (IsModified Or NewMachining), True)
End If
End Set
End Property
Private Sub SetSystemNotes()
' Scrivo stringa materiali da lista
Dim sMaterialString As String = String.Empty
For Each Material In m_MaterialList
Dim dMinTh As Double = 0
StringToLen(Material.MinThickness, dMinTh)
Dim dMaxTh As Double = 0
StringToLen(Material.MaxThickness, dMaxTh)
If dMinTh > 0 Or dMaxTh > 0 Then
sMaterialString += Material.nId.ToString & "," & DoubleToString(dMinTh, 3) & "," & DoubleToString(dMaxTh, 3) & ";"
End If
Next
SystemNotes = sMaterialString
End Sub
#End Region ' Machining Property
#Region "Messages"
'Definizione dei messaggi della pagina
Public ReadOnly Property InvertTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 51)
End Get
End Property
Public ReadOnly Property LeaveTabTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 52)
End Get
End Property
Public ReadOnly Property WorkSideTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 54)
End Get
End Property
Public ReadOnly Property HeadSideTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 55)
End Get
End Property
Public ReadOnly Property LeadInTypeTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 56)
End Get
End Property
Public ReadOnly Property ExtLinkTypeTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 57)
End Get
End Property
Public ReadOnly Property LeadOutTypeTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 58)
End Get
End Property
Public ReadOnly Property CurveUseTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 59)
End Get
End Property
Public ReadOnly Property StepTypeTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 60)
End Get
End Property
Public ReadOnly Property LeadLinkTypeTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90770) ' Collegamento
Else
Return EgtMsg(MSG_MACHININGDB + 62) ' Tipo approccio
End If
End Get
End Property
Public ReadOnly Property InvertToolDirTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 151)
End Get
End Property
Public ReadOnly Property FaceUseTypeTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 152)
End Get
End Property
Public ReadOnly Property InitAngsTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 164) ' Angoli suggeriti
End Get
End Property
Public ReadOnly Property BlockedAxisTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 165) ' Asse bloccato
End Get
End Property
Public ReadOnly Property SolChoiceTypeTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 104)
End Get
End Property
Public ReadOnly Property SpeedTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90725) ' Rotazione
Else
Return EgtMsg(MSG_MACHININGDB + 63) ' Speed
End If
End Get
End Property
Public ReadOnly Property FeedTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90729) ' Avanzamento
Else
Return EgtMsg(MSG_MACHININGDB + 64) ' Feed
End If
End Get
End Property
Public ReadOnly Property StartFeedTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90731) ' Ingresso
Else
Return EgtMsg(MSG_MACHININGDB + 65) ' Feed iniziale
End If
End Get
End Property
Public ReadOnly Property EndFeedTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90732) ' Uscita
Else
Return EgtMsg(MSG_MACHININGDB + 66) ' Feed finale
End If
End Get
End Property
Public ReadOnly Property BackFeedTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90866) ' Ultimo ritorno
Else
Return EgtMsg(MSG_MACHININGDB + 166) ' Feed ultimo all'indietro
End If
End Get
End Property
Public ReadOnly Property OffSrTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90737) ' Radiale
Else
Return EgtMsg(MSG_MACHININGDB + 68) ' Offset radiale
End If
End Get
End Property
Public ReadOnly Property OffSlTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90736) ' Longitudinale
Else
Return EgtMsg(MSG_MACHININGDB + 69) ' Offset longitudinale
End If
End Get
End Property
Public ReadOnly Property SideAngleTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE And m_Type = MCH_MY.SAWING Then
Return EgtMsg(90763) ' Angolo di sbandamento
Else
Return EgtMsg(MSG_MACHININGDB + 71) ' Angolo di fianco
End If
End Get
End Property
Public ReadOnly Property ApproxTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 72)
End Get
End Property
Public ReadOnly Property StartPosTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90768) ' Posizione inizio
Else
Return EgtMsg(MSG_MACHININGDB + 73) ' Dist. di sicurezza
End If
End Get
End Property
Public ReadOnly Property StartSlowLenTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE And m_Type = MCH_MY.DRILLING Then
Return EgtMsg(90780) ' Iniziale
Else
Return EgtMsg(MSG_MACHININGDB + 74) ' Lungh. rallent. iniziale
End If
End Get
End Property
Public ReadOnly Property EndSlowLenTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE And m_Type = MCH_MY.DRILLING Then
Return EgtMsg(90781) ' Finale
Else
Return EgtMsg(MSG_MACHININGDB + 75) ' Lungh. rallent. finale
End If
End Get
End Property
Public ReadOnly Property ThrouAddLenTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE And m_Type = MCH_MY.DRILLING Then
Return EgtMsg(90782) ' Affondamento aggiuntivo
Else
Return EgtMsg(MSG_MACHININGDB + 76) ' Lungh. passante agg.
End If
End Get
End Property
Public ReadOnly Property StepParTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
If m_Type = MCH_MY.SAWFINISHING Or m_Type = MCH_MY.SAWROUGHING Then
Return EgtMsg(90788) ' In affondo
ElseIf m_Type = MCH_MY.SAWING Then
Return EgtMsg(90864) ' Andata
ElseIf m_Type = MCH_MY.MILLING Then
Return EgtMsg(90775) ' Normale
ElseIf m_Type = MCH_MY.DRILLING Then
Return EgtMsg(90774) ' Passo di affondamento
Else
Return EgtMsg(MSG_MACHININGDB + 77) ' Passo
End If
Else
Return EgtMsg(MSG_MACHININGDB + 77) ' Passo
End If
End Get
End Property
Public ReadOnly Property StepBackTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90865) ' Ritorno
Else
Return EgtMsg(MSG_MACHININGDB + 167) ' Passo all'indietro
End If
End Get
End Property
Public ReadOnly Property ReturnPosTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 78)
End Get
End Property
Public ReadOnly Property TabLenTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 79)
End Get
End Property
Public ReadOnly Property TabDistTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 80)
End Get
End Property
Public ReadOnly Property TabHeightTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 81)
End Get
End Property
Public ReadOnly Property TabAngleTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 82)
End Get
End Property
Public ReadOnly Property StepExtArcTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90778) ' Esterno archi
Else
Return EgtMsg(MSG_MACHININGDB + 93) ' Passo su esterno arco
End If
End Get
End Property
Public ReadOnly Property StepIntArcTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90777) ' Interno archi
Else
Return EgtMsg(MSG_MACHININGDB + 94) ' Passo su interno arco
End If
End Get
End Property
Public ReadOnly Property SideStepTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90789) ' Di lato
Else
Return EgtMsg(MSG_MACHININGDB + 95) ' Passo di lato
End If
End Get
End Property
Public ReadOnly Property StepSideAngTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90862) ' Inclinato
Else
Return EgtMsg(MSG_MACHININGDB + 168) ' Passo inclinato
End If
End Get
End Property
Public ReadOnly Property StepSideAngBackTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90863) ' Incl. ritorno
Else
Return EgtMsg(MSG_MACHININGDB + 169) ' Passo all'indietro inclinato
End If
End Get
End Property
Public ReadOnly Property VertFeedTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
Return EgtMsg(90790) ' In verticale
Else
Return EgtMsg(MSG_MACHININGDB + 96) ' Feed verticale
End If
End Get
End Property
Public ReadOnly Property NameParTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 97)
End Get
End Property
Public ReadOnly Property ToolTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 98)
End Get
End Property
Public ReadOnly Property DepthStrTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 99)
End Get
End Property
Public ReadOnly Property UserNotesTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 100)
End Get
End Property
Public ReadOnly Property OverLapTxBl As String
Get
Return EgtMsg(MSG_MACHININGDB + 101)
End Get
End Property
Public ReadOnly Property SubTypeTxBl As String
Get
If m_Type = MCH_MY.SAWFINISHING Then
Return EgtMsg(90861) ' Spatolatura
Else
Return EgtMsg(MSG_MACHININGDB + 103) ' Sottotipo
End If
End Get
End Property
Public ReadOnly Property ForwardAngleTxBl As String
Get
Return EgtMsg(31370)
End Get
End Property
Public ReadOnly Property ProbingTxBl As String
Get
Return EgtMsg(90879) ' Abilitazione
End Get
End Property
Public ReadOnly Property ProbingMinDistTxBl As String
Get
Return EgtMsg(31372)
End Get
End Property
Public ReadOnly Property ProbingMaxDistTxBl As String
Get
Return EgtMsg(31373)
End Get
End Property
Public ReadOnly Property ExtCornTypeTxBl As String
Get
Return EgtMsg(31374)
End Get
End Property
Public ReadOnly Property IntCornTypeTxBl As String
Get
Return EgtMsg(31375)
End Get
End Property
Public ReadOnly Property CornSlowLenTxBl As String
Get
Return EgtMsg(31376)
End Get
End Property
Public ReadOnly Property CornSlowPercTxBl As String
Get
Return EgtMsg(31377)
End Get
End Property
Public ReadOnly Property LiHoleTxBl As String
Get
Return EgtMsg(31378)
End Get
End Property
Public ReadOnly Property LiHoleRadTxBl As String
Get
Return EgtMsg(31379)
End Get
End Property
Public ReadOnly Property LpTurnsTxBl As String
Get
Return EgtMsg(31380)
End Get
End Property
Public ReadOnly Property HpTurnsTxBl As String
Get
Return EgtMsg(31381)
End Get
End Property
Public ReadOnly Property ThicknessFeedTxBl As String
Get
Return EgtMsg(31070) ' Spessore
End Get
End Property
Public ReadOnly Property TipFeedTxBl As String
Get
If MachiningDbWindowVM.m_MatType = MaterialType.STONE Then
If m_Type = MCH_MY.WATERJETTING Then
Return EgtMsg(31201) ' Foratura
Else
Return EgtMsg(90730) ' Testa
End If
Else
Return EgtMsg(MSG_MACHININGDB + 67) ' Feed di testa
End If
End Get
End Property
Public ReadOnly Property MaterialMsg As String
Get
Return EgtMsg(91451) ' Materiale
End Get
End Property
Public ReadOnly Property MinThicknessMsg As String
Get
Return EgtMsg(91452) ' Spessore minimo
End Get
End Property
Public ReadOnly Property MaxThicknessMsg As String
Get
Return EgtMsg(91453) ' Spessore massimo
End Get
End Property
Public ReadOnly Property OscillationGpBxLbl As String
Get
Return EgtMsg(31382) ' Oscillazione
End Get
End Property
Public ReadOnly Property OscHeightTxBl As String
Get
Return EgtMsg(31383) ' Ampiezza
End Get
End Property
Public ReadOnly Property OscRampLenTxBl As String
Get
Return EgtMsg(31384) ' Lungh. rampa
End Get
End Property
Public ReadOnly Property OscFlatLenTxBl As String
Get
Return EgtMsg(31385) ' Lungh. cresta
End Get
End Property
Public ReadOnly Property AcrossTxBl As String
Get
Return EgtMsg(90861) ' Spatolatura
End Get
End Property
Public ReadOnly Property GenericGpBxLbl As String
Get
Return EgtMsg(31386) ' Generici
End Get
End Property
Public ReadOnly Property AdvancedGpBxLbl As String
Get
Return EgtMsg(31387) ' Avanzati
End Get
End Property
Public ReadOnly Property StepGpBxLbl As String
Get
Return EgtMsg(MSG_MACHININGDB + 77) ' Passo
End Get
End Property
Public ReadOnly Property FeedGpBxLbl As String
Get
Return EgtMsg(90728) ' Feed
End Get
End Property
Public ReadOnly Property OffsetGpBxLbl As String
Get
Return EgtMsg(90735) ' Sovramateriale
End Get
End Property
Public ReadOnly Property SlowLenGpBxLbl As String
Get
Return EgtMsg(90779) ' Lunghezza del rallentamento
End Get
End Property
Public ReadOnly Property OverlapGpBxLbl As String
Get
Return EgtMsg(90227) ' Sovrapposizione
End Get
End Property
Public ReadOnly Property AnglesGpBxLbl As String
Get
Return EgtMsg(90880) ' Angoli
End Get
End Property
Public ReadOnly Property ProbingGpBxLbl As String
Get
Return EgtMsg(90868) ' Tastatura
End Get
End Property
Public ReadOnly Property LeadInTypeGpBxLbl As String
Get
Return EgtMsg(MSG_MACHININGDB + 56) ' Attacco
End Get
End Property
Public ReadOnly Property LeadOutTypeGpBxLbl As String
Get
Return EgtMsg(MSG_MACHININGDB + 58) ' Uscita
End Get
End Property
Public ReadOnly Property CurveUseGpBxLbl As String
Get
Return EgtMsg(MSG_MACHININGDB + 59) ' Uso curve
End Get
End Property
Public ReadOnly Property TypeTxBl As String
Get
Return EgtMsg(31053) ' Tipo
End Get
End Property
Public ReadOnly Property LeadTangTxBl As String
Get
Return EgtMsg(31283) ' Dist. tangente
End Get
End Property
Public ReadOnly Property LeadPerpTxBl As String
Get
Return EgtMsg(31284) ' Dist. perp.
End Get
End Property
Public ReadOnly Property LeadElevTxBl As String
Get
Return EgtMsg(31285) ' Elevazione
End Get
End Property
Public ReadOnly Property LeadCompLenTxBl As String
Get
Return EgtMsg(31286) ' Lungh. correz.
End Get
End Property
Public ReadOnly Property AddLenTxBl As String
Get
Return EgtMsg(31291) ' Lungh. addiz.
End Get
End Property
Public ReadOnly Property EnableTxBl As String
Get
Return EgtMsg(31394) ' Abilitazione
End Get
End Property
#End Region ' Messages
#Region "Constructors"
Sub New(Name As String, Type As MCH_MY, bIsValidTool As Boolean, Parent As InheritableTreeViewItem)
MyBase.New(Name, Parent)
Me.m_Type = Type
Me.IsValidTool = bIsValidTool
End Sub
#End Region ' Constructors
#Region "METHODS"
Public Overridable Sub ReadMachiningParam()
EgtSetCurrentContext(MachiningDbWindowVM.m_ProjectSceneContext)
Dim dValue As Double = 0
Dim nValue As Integer = 0
Dim sValue As String = String.Empty
ReadSelectedTool()
NotifyPropertyChanged("TipFeedTxBl")
EgtMdbGetCurrMachiningParam(MCH_MP.INVERT, Invert)
EgtMdbGetCurrMachiningParam(MCH_MP.LEAVETAB, LeaveTab)
EgtMdbGetCurrMachiningParam(MCH_MP.TOOLINVERT, InvertToolDir)
EgtMdbGetCurrMachiningParam(MCH_MP.WORKSIDE, nValue)
SelectedWorkSide = If(IsNothing(WorkSideList), nValue, IdNameStruct.IndFromId(nValue, WorkSideList))
EgtMdbGetCurrMachiningParam(MCH_MP.HEADSIDE, nValue)
SelectedHeadSide = If(IsNothing(HeadSideList), nValue, IdNameStruct.IndFromId(nValue, HeadSideList))
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, nValue)
SelectedLeadInType = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, nValue)
SelectedExtLinkType = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.LEADOUTTYPE, nValue)
SelectedLeadOutType = If(IsNothing(LeadOutTypeList), nValue, IdNameStruct.IndFromId(nValue, LeadOutTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.CURVEUSE, nValue)
SelectedCurveUse = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.STEPTYPE, nValue)
SelectedStepType = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.SUBTYPE, nValue)
SelectedSubType = If(IsNothing(SubTypeList), nValue, IdNameStruct.IndFromId(nValue, SubTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.LEADLINKTYPE, nValue)
SelectedLeadLinkType = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.FACEUSE, nValue)
SelectedFaceUseType = If(IsNothing(FaceUseTypeList), nValue, IdNameStruct.IndFromId(nValue, FaceUseTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.SOLCHOICETYPE, nValue)
SelectedSolChoiceType = If(IsNothing(SolChoiceTypeList), nValue, IdNameStruct.IndFromId(nValue, SolChoiceTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.SPEED, dValue)
Speed = DoubleToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.FEED, dValue)
Feed = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STARTFEED, dValue)
StartFeed = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.ENDFEED, dValue)
EndFeed = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.TIPFEED, dValue)
TipFeed = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.BACKFEED, dValue)
BackFeed = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.THICKREF, dValue)
ThicknessFeed = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.OFFSR, dValue)
OffSr = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.OFFSL, dValue)
OffSl = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGLE, dValue)
SideAngle = DoubleToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.APPROX, dValue)
Approx = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STARTPOS, dValue)
StartPos = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STARTSLOWLEN, dValue)
StartSlowLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.ENDSLOWLEN, dValue)
EndSlowLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.THROUADDLEN, dValue)
ThrouAddLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STEP_, dValue)
StepPar = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STEPBACK, dValue)
StepBack = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.RETURNPOS, dValue)
ReturnPos = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.OVERL, dValue)
OverLap = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.TABLEN, dValue)
TabLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.TABDIST, dValue)
TabDist = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.TABHEIGHT, dValue)
TabHeight = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.TABANGLE, dValue)
TabAngle = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LITANG, dValue)
LiTang = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LIPERP, dValue)
LiPerp = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LIELEV, dValue)
LiElev = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LICOMPLEN, dValue)
LiCompLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LOTANG, dValue)
LoTang = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LOPERP, dValue)
LoPerp = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LOELEV, dValue)
LoElev = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.LOCOMPLEN, dValue)
LoCompLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STARTADDLEN, dValue)
StartAddLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.ENDADDLEN, dValue)
EndAddLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STEPEXTARC, dValue)
StepExtArc = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STEPINTARC, dValue)
StepIntArc = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.SIDESTEP, dValue)
SideStep = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STEPSIDEANG, dValue)
StepSideAng = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.STEPSIDEANGBACK, dValue)
StepSideAngBack = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.VERTFEED, dValue)
VertFeed = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.OSCENABLE, OscEnable)
EgtMdbGetCurrMachiningParam(MCH_MP.OSCHEIGHT, dValue)
OscHeight = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.OSCRAMPLEN, dValue)
OscRampLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.OSCFLATLEN, dValue)
OscFlatLen = LenToString(dValue, 4)
EgtMdbGetCurrMachiningParam(MCH_MP.DEPTH_STR, DepthStr)
EgtMdbGetCurrMachiningParam(MCH_MP.UUID, m_Uuid)
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, UserNotes)
EgtMdbGetCurrMachiningParam(MCH_MP.INITANGS, InitAngs)
EgtMdbGetCurrMachiningParam(MCH_MP.BLOCKEDAXIS, BlockedAxis)
EgtMdbGetCurrMachiningParam(MCH_MP.FORWARDANGLE, dValue)
ForwardAngle = DoubleToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.PROBING, Probing)
ProbingMinDist = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.PROBINGMINDIST, dValue)
ProbingMinDist = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.PROBINGMAXDIST, dValue)
ProbingMaxDist = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.EXTCORNERTYPE, nValue)
SelectedExtCornType = If(IsNothing(ExtCornTypeList), nValue, IdNameStruct.IndFromId(nValue, ExtCornTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.INTCORNERTYPE, nValue)
SelectedIntCornType = If(IsNothing(IntCornTypeList), nValue, IdNameStruct.IndFromId(nValue, IntCornTypeList))
EgtMdbGetCurrMachiningParam(MCH_MP.CORNERSLOWLEN, dValue)
CornSlowLen = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.CORNERSLOWPERC, nValue)
CornSlowPerc = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.LIHOLE, LiHole)
EgtMdbGetCurrMachiningParam(MCH_MP.LIHOLERAD, dValue)
LiHoleRad = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.LPTURNS, nValue)
LpTurns = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.HPTURNS, nValue)
HpTurns = nValue
EgtMdbGetCurrMachiningParam(MCH_MP.LITANG, dValue)
LiTang = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.LIPERP, dValue)
LiPerp = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.LOTANG, dValue)
LoTang = LenToString(dValue, 3)
EgtMdbGetCurrMachiningParam(MCH_MP.LOPERP, dValue)
LoPerp = LenToString(dValue, 3)
InitCurrentMachine(MachiningDbWindowVM.m_sMachineIniPath)
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, SystemNotes)
' Compilo lista materiali
m_MaterialList.Clear()
For i = 0 To Materials.Count - 1
Dim Material = Materials(i)
m_MaterialList.Add(New MachiningMaterial(Material.nId, Material.sName, AddressOf SetSystemNotes))
Next
If m_SystemNotes <> String.Empty Then
Dim sItems() = m_SystemNotes.Split(";".ToCharArray)
Dim Index As Integer = 0
For Each Material In m_MaterialList
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
Dim nParId As Integer = 0
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
Dim dVal As Double = 0
StringToDouble(Param(1), dVal)
Material.SetMinThickness(LenToString(dVal, 2))
StringToDouble(Param(2), dVal)
Material.SetMaxThickness(LenToString(dVal, 2))
'Material.bIsActive = True
Index += 1
Else
'Material.bIsActive = False
End If
Next
End If
NotifyPropertyChanged("MaterialList")
End Sub
Friend Sub ReadMachiningName()
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, NamePar)
End Sub
Private Sub ReadSelectedTool()
ReadTool = True
Dim sValue As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sValue)
Dim sToolName As String = String.Empty
EgtTdbGetToolFromUUID(sValue, sToolName)
Dim sMachToolName As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sMachToolName)
If sToolName <> sMachToolName Then
EgtMdbSetCurrMachiningParam(MCH_MP.TOOL, sToolName)
EgtMdbSaveCurrMachining()
End If
If IsNothing(m_ToolList) Then
Dim i As Integer = ToolList.Count()
End If
Dim bFound As Boolean = False
For i = 0 To m_ToolList.Count - 1
If m_ToolList(i) = sToolName Then
bFound = True
SelectedTool = i
End If
Next
If Not bFound Then
SelectedTool = -1
End If
ReadTool = False
End Sub
Public Overridable Sub WriteMachiningParam()
EgtSetCurrentContext(MachiningDbWindowVM.m_ProjectSceneContext)
Dim nValue As Integer = 0
Dim dValue As Double = 0
EgtMdbSetCurrMachiningParam(MCH_MP.INVERT, Invert)
EgtMdbSetCurrMachiningParam(MCH_MP.LEAVETAB, LeaveTab)
EgtMdbSetCurrMachiningParam(MCH_MP.TOOLINVERT, InvertToolDir)
EgtMdbSetCurrMachiningParam(MCH_MP.TYPE, Type)
nValue = If(IsNothing(WorkSideList), m_SelectedWorkSide, IdNameStruct.IdFromInd(m_SelectedWorkSide, WorkSideList))
EgtMdbSetCurrMachiningParam(MCH_MP.WORKSIDE, nValue)
nValue = If(IsNothing(HeadSideList), m_SelectedHeadSide, IdNameStruct.IdFromInd(m_SelectedHeadSide, HeadSideList))
EgtMdbSetCurrMachiningParam(MCH_MP.HEADSIDE, nValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LEADINTYPE, SelectedLeadInType)
EgtMdbSetCurrMachiningParam(MCH_MP.EXTLINKTYPE, SelectedExtLinkType)
nValue = If(IsNothing(LeadOutTypeList), m_SelectedLeadOutType, IdNameStruct.IdFromInd(m_SelectedLeadOutType, LeadOutTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.LEADOUTTYPE, nValue)
EgtMdbSetCurrMachiningParam(MCH_MP.CURVEUSE, SelectedCurveUse)
EgtMdbSetCurrMachiningParam(MCH_MP.STEPTYPE, SelectedStepType)
nValue = If(IsNothing(SubTypeList), m_SelectedSubType, IdNameStruct.IdFromInd(m_SelectedSubType, SubTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, nValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LEADLINKTYPE, SelectedLeadLinkType)
nValue = If(IsNothing(FaceUseTypeList), m_SelectedFaceUseType, IdNameStruct.IdFromInd(m_SelectedFaceUseType, FaceUseTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.FACEUSE, nValue)
nValue = If(IsNothing(SolChoiceTypeList), m_SelectedSolChoiceType, IdNameStruct.IdFromInd(m_SelectedSolChoiceType, SolChoiceTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.SOLCHOICETYPE, nValue)
StringToDouble(Speed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.SPEED, dValue)
StringToLen(Feed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.FEED, dValue)
StringToLen(StartFeed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STARTFEED, dValue)
StringToLen(EndFeed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.ENDFEED, dValue)
StringToLen(TipFeed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.TIPFEED, dValue)
StringToLen(BackFeed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.BACKFEED, dValue)
StringToLen(ThicknessFeed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.THICKREF, dValue)
StringToLen(OffSr, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.OFFSR, dValue)
StringToLen(OffSl, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.OFFSL, dValue)
StringToDouble(SideAngle, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.SIDEANGLE, dValue)
StringToLen(Approx, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.APPROX, dValue)
StringToLen(StartPos, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STARTPOS, dValue)
StringToLen(StartSlowLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STARTSLOWLEN, dValue)
StringToLen(EndSlowLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.ENDSLOWLEN, dValue)
StringToLen(ThrouAddLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.THROUADDLEN, dValue)
StringToLen(StepPar, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STEP_, dValue)
StringToLen(StepBack, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STEPBACK, dValue)
StringToLen(ReturnPos, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.RETURNPOS, dValue)
StringToLen(OverLap, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.OVERL, dValue)
StringToLen(TabLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.TABLEN, dValue)
StringToLen(TabDist, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.TABDIST, dValue)
StringToLen(TabHeight, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.TABHEIGHT, dValue)
StringToLen(TabAngle, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.TABANGLE, dValue)
StringToLen(LiTang, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, dValue)
StringToLen(LiPerp, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LIPERP, dValue)
StringToLen(LiElev, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LIELEV, dValue)
StringToLen(LiCompLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LICOMPLEN, dValue)
StringToLen(LoTang, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LOTANG, dValue)
StringToLen(LoPerp, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LOPERP, dValue)
StringToLen(LoElev, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LOELEV, dValue)
StringToLen(LoCompLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LOCOMPLEN, dValue)
StringToLen(StartAddLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STARTADDLEN, dValue)
StringToLen(EndAddLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.ENDADDLEN, dValue)
StringToLen(StepExtArc, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STEPEXTARC, dValue)
StringToLen(StepIntArc, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STEPINTARC, dValue)
StringToLen(SideStep, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.SIDESTEP, dValue)
StringToLen(StepSideAng, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STEPSIDEANG, dValue)
StringToLen(StepSideAngBack, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.STEPSIDEANGBACK, dValue)
StringToLen(VertFeed, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.VERTFEED, dValue)
If SelectedTool >= 0 Then
EgtMdbSetCurrMachiningParam(MCH_MP.TOOL, m_ToolList(SelectedTool))
Else
EgtMdbSetCurrMachiningParam(MCH_MP.TOOL, "")
End If
EgtMdbSetCurrMachiningParam(MCH_MP.OSCENABLE, OscEnable)
StringToLen(OscHeight, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.OSCHEIGHT, dValue)
StringToLen(OscRampLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.OSCRAMPLEN, dValue)
StringToLen(OscFlatLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.OSCFLATLEN, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.DEPTH_STR, DepthStr)
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, UserNotes)
EgtMdbSetCurrMachiningParam(MCH_MP.INITANGS, InitAngs)
EgtMdbSetCurrMachiningParam(MCH_MP.BLOCKEDAXIS, BlockedAxis)
StringToDouble(ForwardAngle, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.FORWARDANGLE, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.PROBING, Probing)
StringToLen(ProbingMinDist, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.PROBINGMINDIST, dValue)
StringToLen(ProbingMaxDist, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.PROBINGMAXDIST, dValue)
nValue = If(IsNothing(ExtCornTypeList), m_SelectedExtCornType, IdNameStruct.IdFromInd(m_SelectedExtCornType, ExtCornTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.EXTCORNERTYPE, nValue)
nValue = If(IsNothing(IntCornTypeList), m_SelectedIntCornType, IdNameStruct.IdFromInd(m_SelectedIntCornType, IntCornTypeList))
EgtMdbSetCurrMachiningParam(MCH_MP.INTCORNERTYPE, nValue)
StringToLen(CornSlowLen, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.CORNERSLOWLEN, dValue)
nValue = CornSlowPerc
EgtMdbSetCurrMachiningParam(MCH_MP.CORNERSLOWPERC, nValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LIHOLE, LiHole)
StringToLen(LiHoleRad, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LIHOLERAD, dValue)
nValue = LpTurns
EgtMdbSetCurrMachiningParam(MCH_MP.LPTURNS, nValue)
nValue = HpTurns
EgtMdbSetCurrMachiningParam(MCH_MP.HPTURNS, nValue)
StringToLen(LiTang, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, dValue)
StringToLen(LiPerp, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LIPERP, dValue)
StringToLen(LoTang, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LOTANG, dValue)
StringToLen(LoPerp, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.LOPERP, dValue)
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, SystemNotes)
' verifico se l'utensile è valido
Dim sTUUID As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTUUID)
IsValidTool = ToolDbUtility.IsToolInDb(sTUUID)
Dim FamilyTool As FamilyMachiningTreeViewItem = DirectCast(m_Parent, FamilyMachiningTreeViewItem)
FamilyTool.VerifyMachiningValidity()
End Sub
Public Sub WriteMachiningName()
EgtMdbSetCurrMachiningParam(MCH_MP.NAME, NamePar)
End Sub
#End Region ' Methods
#Region "Validation"
Private m_NameError As String
Public ReadOnly Property NameErrorMsg As String
Get
Return m_NameError
End Get
End Property
Private m_SpeedError As String
Public ReadOnly Property SpeedErrorMsg As String
Get
Return m_SpeedError
End Get
End Property
Private Function GetValidationError(ByVal propertyName As String) As Boolean
Dim bOk As Boolean = True
Select Case propertyName
Case "NamePar"
bOk = Me.ValidateName()
Case "Speed"
bOk = Me.ValidateSpeed()
End Select
Return bOk
End Function
Private Function GetErrorString(propertyName As String) As String
Select Case propertyName
Case "NamePar"
Return m_NameError
Case "Speed"
Return m_SpeedError
End Select
Return String.Empty
End Function
''' <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 Not String.IsNullOrEmpty(GetErrorString([property])) Then
Return False
End If
Next [property]
Return True
End Get
End Property
Public Overridable ReadOnly Property IsModified() As Boolean
Get
Return m_IsModifiedInvert OrElse
m_IsModifiedLeaveTab OrElse
m_IsModifiedToolInvert 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_IsModifiedSelectedFaceUseType OrElse
m_IsModifiedSelectedSolChoiceType OrElse
m_IsModifiedSpeed OrElse
m_IsModifiedFeed OrElse
m_IsModifiedStartFeed OrElse
m_IsModifiedEndFeed OrElse
m_IsModifiedTipFeed OrElse
m_IsModifiedBackFeed OrElse
m_IsModifiedThicknessFeed 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_IsModifiedStepBack OrElse
m_IsModifiedReturnPos 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_IsModifiedStepSideAng OrElse
m_IsModifiedStepSideAngBack OrElse
m_IsModifiedVertFeed OrElse
m_IsModifiedOscEnable OrElse
m_IsModifiedOscHeight OrElse
m_IsModifiedOscRampLen OrElse
m_IsModifiedOscFlatLen OrElse
m_IsModifiedName OrElse
m_IsModifiedSelectedTool OrElse
m_IsModifiedDepthStr OrElse
m_IsModifiedUserNotes OrElse
m_IsModifiedOverLap OrElse
m_IsModifiedInitAngs OrElse
m_IsModifiedBlockedAxis OrElse
m_IsModifiedForwardAngle OrElse
m_IsModifiedProbing OrElse
m_IsModifiedProbingMinDist OrElse
m_IsModifiedProbingMaxDist OrElse
m_IsModifiedSelectedExtCornType OrElse
m_IsModifiedSelectedIntCornType OrElse
m_IsModifiedCornSlowLen OrElse
m_IsModifiedCornSlowPerc OrElse
m_IsModifiedLiHole OrElse
m_IsModifiedLiHoleRad OrElse
m_IsModifiedLpTurns OrElse
m_IsModifiedHpTurns OrElse
m_IsModifiedSystemNotes
End Get
End Property
Public Overridable Sub IsModifiedReset()
m_IsModifiedInvert = False
m_IsModifiedLeaveTab = False
m_IsModifiedToolInvert = False
m_IsModifiedSelectedWorkSide = False
m_IsModifiedSelectedHeadSide = False
m_IsModifiedSelectedLeadInType = False
m_IsModifiedSelectedExtLinkType = False
m_IsModifiedSelectedLeadOutType = False
m_IsModifiedSelectedCurveUse = False
m_IsModifiedSelectedStepType = False
m_IsModifiedSelectedSubType = False
m_IsModifiedSelectedLeadLinkType = False
m_IsModifiedSelectedFaceUseType = False
m_IsModifiedSelectedSolChoiceType = False
m_IsModifiedSpeed = False
m_IsModifiedFeed = False
m_IsModifiedStartFeed = False
m_IsModifiedEndFeed = False
m_IsModifiedTipFeed = False
m_IsModifiedBackFeed = False
m_IsModifiedThicknessFeed = False
m_IsModifiedOffSr = False
m_IsModifiedOffSl = False
m_IsModifiedSideAngle = False
m_IsModifiedApprox = False
m_IsModifiedStartPos = False
m_IsModifiedStartSlowLen = False
m_IsModifiedEndSlowLen = False
m_IsModifiedThrouAddLen = False
m_IsModifiedStepPar = False
m_IsModifiedStepBack = False
m_IsModifiedReturnPos = False
m_IsModifiedTabLen = False
m_IsModifiedTabDist = False
m_IsModifiedTabHeight = False
m_IsModifiedTabAngle = False
m_IsModifiedLiTang = False
m_IsModifiedLiPerp = False
m_IsModifiedLiElev = False
m_IsModifiedLiCompLen = False
m_IsModifiedLoTang = False
m_IsModifiedLoPerp = False
m_IsModifiedLoElev = False
m_IsModifiedLoCompLen = False
m_IsModifiedStartAddLen = False
m_IsModifiedEndAddLen = False
m_IsModifiedStepExtArc = False
m_IsModifiedStepIntArc = False
m_IsModifiedSideStep = False
m_IsModifiedStepSideAng = False
m_IsModifiedStepSideAngBack = False
m_IsModifiedVertFeed = False
m_IsModifiedOscEnable = False
m_IsModifiedOscHeight = False
m_IsModifiedOscRampLen = False
m_IsModifiedOscFlatLen = False
m_IsModifiedName = False
m_IsModifiedSelectedTool = False
m_IsModifiedDepthStr = False
m_IsModifiedUserNotes = False
m_IsModifiedOverLap = False
m_IsModifiedInitAngs = False
m_IsModifiedBlockedAxis = False
m_IsModifiedForwardAngle = False
m_IsModifiedProbing = False
m_IsModifiedProbingMinDist = False
m_IsModifiedProbingMaxDist = False
m_IsModifiedSelectedExtCornType = False
m_IsModifiedSelectedIntCornType = False
m_IsModifiedCornSlowLen = False
m_IsModifiedCornSlowPerc = False
m_IsModifiedLiHole = False
m_IsModifiedLiHoleRad = False
m_IsModifiedLpTurns = False
m_IsModifiedHpTurns = False
m_IsModifiedSystemNotes = False
End Sub
Private Shared ReadOnly ValidatedProperties() As String = {"Speed", "NamePar"}
Private Function ValidateName() As Boolean
m_NameError = String.Empty
Select Case nErrorMachiningName
Case 1
m_NameError = EgtMsg(MSG_MACHININGDBERRORS + 3)
Case 2
m_NameError = EgtMsg(MSG_MACHININGDBERRORS + 4)
End Select
NotifyPropertyChanged("NameErrorMsg")
If String.IsNullOrEmpty(m_NameError) Then
Return True
Else
Return False
End If
End Function
Private Function ValidateSpeed() As Boolean
m_SpeedError = String.Empty
If SelectedTool >= 0 Then
If Not IsNothing(m_Speed) And m_ToolList.Count >= SelectedTool + 1 Then
Dim dSpeed As Double = 0
StringToDouble(m_Speed, dSpeed)
Dim dMaxSpeed As Double = 0
EgtTdbSetCurrTool(m_ToolList(SelectedTool))
EgtTdbGetCurrToolParam(MCH_TP.MAXSPEED, dMaxSpeed)
If Math.Abs(dSpeed) > dMaxSpeed + EPS_ZERO Then
m_SpeedError = EgtMsg(MSG_TOOLDBERRORS + 11)
End If
End If
End If
NotifyPropertyChanged("SpeedErrorMsg")
If String.IsNullOrEmpty(m_SpeedError) Then
Return True
Else
Return False
End If
End Function
#End Region ' Validation
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 TMDbParamVisibility.Drilling(CInt(parameter))
Case MCH_MY.SAWING
Return TMDbParamVisibility.Sawing(CInt(parameter))
Case MCH_MY.MILLING
Return TMDbParamVisibility.Milling(CInt(parameter))
Case MCH_MY.POCKETING
Return TMDbParamVisibility.Pocketing(CInt(parameter))
Case MCH_MY.MORTISING
Return TMDbParamVisibility.Mortising(CInt(parameter))
Case MCH_MY.SAWROUGHING
Return TMDbParamVisibility.Sawroughing(CInt(parameter))
Case MCH_MY.SAWFINISHING
Return TMDbParamVisibility.Sawfinishing(CInt(parameter))
Case MCH_MY.GENMACHINING
Return TMDbParamVisibility.GenMachining(CInt(parameter))
Case MCH_MY.CHISELING
Return TMDbParamVisibility.Chiseling(CInt(parameter))
Case MCH_MY.WATERJETTING
Return TMDbParamVisibility.Waterjetting(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
Public Class ErrorVisibilityConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
If String.IsNullOrEmpty(CStr(value)) Then
Return Visibility.Collapsed
Else
Return Visibility.Visible
End If
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
Public Class MachiningMaterial
Inherits Material
Friend m_refSetSystemNotes As Action
Private m_MinThickness As String
Public Property MinThickness As String
Get
Return m_MinThickness
End Get
Set(value As String)
m_MinThickness = value
m_refSetSystemNotes()
End Set
End Property
Friend Sub SetMinThickness(value As String)
m_MinThickness = value
End Sub
Private m_MaxThickness As String
Public Property MaxThickness As String
Get
Return m_MaxThickness
End Get
Set(value As String)
m_MaxThickness = value
m_refSetSystemNotes()
End Set
End Property
Friend Sub SetMaxThickness(value As String)
m_MaxThickness = value
End Sub
Sub New(nId As Integer, sName As String, refSetSystemNotes As Action)
MyBase.New(nId, sName)
m_MinThickness = "0"
m_MaxThickness = "0"
m_refSetSystemNotes = refSetSystemNotes
End Sub
End Class