1402 lines
77 KiB
VB.net
1402 lines
77 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports System.Collections.Specialized
|
|
Imports System.ComponentModel
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class CurrMachining
|
|
Inherits Machining
|
|
|
|
Private m_sCurrGUID As Guid = Guid.Empty
|
|
Public Property sCurrGUID As Guid
|
|
Get
|
|
Return m_sCurrGUID
|
|
End Get
|
|
Set(value As Guid)
|
|
m_sCurrGUID = value
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property dCurrSlicingType As Machining.MPAR_SLICINGTYPE
|
|
Get
|
|
Dim SlicingType As CurrComboMachiningParam = m_CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.SLICINGTYPE)
|
|
If Not IsNothing(SlicingType) Then
|
|
Return SlicingType.SelValue.Id
|
|
Else
|
|
Return 0
|
|
End If
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property sCurrSlicingType As String
|
|
Get
|
|
Dim Slicing45 As CurrComboMachiningParam = m_CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.SLICINGTYPE)
|
|
If Not IsNothing(Slicing45) Then
|
|
Return Slicing45.SelValue.Name
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property dCurrStrandH As Double
|
|
Get
|
|
Dim StrandH As CurrNumericMachiningParam = m_CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH)
|
|
If Not IsNothing(StrandH) Then
|
|
Return StrandH.dValue
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property sCurrStrandH As String
|
|
Get
|
|
Dim StrandH As CurrNumericMachiningParam = m_CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH)
|
|
If Not IsNothing(StrandH) Then
|
|
Return StrandH.sValue
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property sCurrStrandW As String
|
|
Get
|
|
Dim StrandH As CurrNumericMachiningParam = m_CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDW)
|
|
If Not IsNothing(StrandH) Then
|
|
Return StrandH.sValue
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property sCurrStrandCount As String
|
|
Get
|
|
Dim StrandH As CurrNumericMachiningParam = m_CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDCOUNT)
|
|
If Not IsNothing(StrandH) Then
|
|
Return StrandH.sValue
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property sCurrOffset As String
|
|
Get
|
|
Dim StrandH As CurrNumericMachiningParam = m_CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.OFFSET)
|
|
If Not IsNothing(StrandH) Then
|
|
Return StrandH.sValue
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Sub New(nPartId As Integer)
|
|
' ricavo lavorazione da lista
|
|
Dim sCurrGuid As String = ""
|
|
EgtGetInfo(nPartId, MAC_GUID, sCurrGuid)
|
|
If Guid.TryParse(sCurrGuid, m_sCurrGUID) Then
|
|
Dim CurrMachiningInDb As MachiningIndex = Map.refTopPanelVM.MachiningList.FirstOrDefault(Function(x) x.sGUID = m_sCurrGUID)
|
|
If IsNothing(CurrMachiningInDb) Then
|
|
m_nIndex = 0
|
|
Else
|
|
m_nIndex = CurrMachiningInDb.nIndex
|
|
End If
|
|
Else
|
|
m_nIndex = 0
|
|
End If
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, False))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, False))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False))
|
|
For Each Cathegory In m_CathegoryList
|
|
For Each MachiningParam In Cathegory.MachiningParamList
|
|
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
|
Next
|
|
Next
|
|
End Sub
|
|
|
|
Sub New(nPartId As Integer, nIndex As Integer)
|
|
m_nIndex = nIndex
|
|
' ricavo lavorazione da lista
|
|
Dim CurrMachiningInDb As MachiningIndex = Map.refTopPanelVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
|
m_sCurrGUID = CurrMachiningInDb.sGUID
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, True))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, True))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True))
|
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True))
|
|
For Each Cathegory In m_CathegoryList
|
|
For Each MachiningParam In Cathegory.MachiningParamList
|
|
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
|
Next
|
|
Next
|
|
' scrivo i parametri impostati dentro il pezzo
|
|
WriteCurrParamInPart(nPartId)
|
|
End Sub
|
|
|
|
Sub New(sName As String, bSlicing45 As Boolean, dStrandH As Double, dStrandW As Double, nStrandCount As Integer, dOffset As Double, dStartPointOffsetOnSlice As Double,
|
|
dStrandOrder As MPAR_STRANDORDERS, dDirection As MPAR_DIRECTIONS, dLinkType As MPAR_LINKTYPES, dLinkParam As Double, dLinkZup As Double, dOffsetLeadPoint As Double,
|
|
dLeadIn As MPAR_LEADINOUT, dLeadInTangDist As Double, dLeadInOrthoDist As Double, dLeadOut As MPAR_LEADINOUT, dLeadOutTangDist As Double, dLeadOutOrthoDist As Double,
|
|
dCoastingLen As Double, dCoastingFeed As Double, dWipeLen As Double, dWipeFeedPu As Double, dFloorCount As Integer, dG0Feed As Double, dMaterial As String,
|
|
dToolDiam As Double, dRibsOverlap As Double, dRibsStrandCount As Integer, dRibsLink As Boolean, dRibsInvertOrder As Boolean, dRibsInvertDirection As Boolean,
|
|
dRibsLeadInInvert As Boolean, dRibsLeadInLen As Double, dRibsLeadOutInvert As Boolean, dRibsLeadOutLen As Double, dRibsLeadOutCoasting As Double,
|
|
dRibsLeadOutWipe As Double, dRibsLeadOutWipeDir As Double)
|
|
|
|
End Sub
|
|
|
|
#Region "METHODS"
|
|
|
|
Friend Overrides Sub OnMachiningParamPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
|
Select Case e.PropertyName
|
|
Case NameOf(sender.dValue), NameOf(sender.sValue), NameOf(sender.bValue), NameOf(sender.SelValue), NameOf(sender.Value)
|
|
m_bIsModified = m_CathegoryList.Any(Function(x) x.MachiningParamList.Any(Function(y) y.bIsModified))
|
|
NotifyPropertyChanged(NameOf(ghName))
|
|
NotifyPropertyChanged(NameOf(sCurrSlicingType))
|
|
NotifyPropertyChanged(NameOf(sCurrStrandH))
|
|
NotifyPropertyChanged(NameOf(sCurrStrandW))
|
|
NotifyPropertyChanged(NameOf(sCurrStrandCount))
|
|
NotifyPropertyChanged(NameOf(sCurrOffset))
|
|
sender.NotifyPropertyChanged(NameOf(sender.bIsModifiedFromDb))
|
|
End Select
|
|
End Sub
|
|
|
|
Friend Overrides Sub Save()
|
|
If bIsModified Then
|
|
' salvo tutti i parametri su orig
|
|
SaveParams()
|
|
' resetto stato di modificata
|
|
UpdateIsModified()
|
|
End If
|
|
End Sub
|
|
|
|
Protected Overrides Sub SaveParams()
|
|
For Each Cathegory In m_CathegoryList
|
|
Cathegory.SaveParams()
|
|
Next
|
|
End Sub
|
|
|
|
Friend Sub WriteCurrParamInPart(nPartId As Integer)
|
|
EgtSetInfo(nPartId, MAC_GUID, m_sCurrGUID.ToString())
|
|
For Each Cathegory As CurrMachiningCathegory In m_CathegoryList
|
|
Cathegory.WriteCurrParamInPart(nPartId)
|
|
Next
|
|
' Imposto flag di ricalcolo slice
|
|
EgtSetInfo(nPartId, MAC_TORECALC_SLICE, True)
|
|
End Sub
|
|
|
|
#End Region ' METHODS
|
|
|
|
End Class
|
|
|
|
Public Class CurrMachiningCathegory
|
|
Inherits MachiningCathegory
|
|
|
|
Sub New(Type As Cathegories, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
|
|
m_Type = Type
|
|
Select Case m_Type
|
|
Case Cathegories.GENERAL
|
|
m_sName = "General"
|
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.SPIRALVASE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDH, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDW, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.OFFSET, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me)})
|
|
Case Cathegories.LINK
|
|
m_sName = "Shell"
|
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me)})
|
|
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
|
Case Cathegories.RIBS
|
|
m_sName = "Ribs"
|
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nPartId, nIndex, bForceFromDb, Me)})
|
|
Case Cathegories.SHELL_NUMBER
|
|
m_sName = "Reduce Shell Number"
|
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
|
Case Cathegories.AUX_SOLID
|
|
m_sName = "Filled Solid"
|
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
|
Case Cathegories.INFILL
|
|
m_sName = "Infill"
|
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INFILLSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.FLOORTYPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.CEILCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.CEILTYPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrComboMachiningParam(MachiningParam.Params.INFILLTYPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrCheckMachiningParam(MachiningParam.Params.INFILLLINK, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDENSITY, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETX, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETY, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPE, nPartId, nIndex, bForceFromDb, Me),
|
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
|
End Select
|
|
' verifico dipendenze tra parametri
|
|
Select Case m_Type
|
|
Case Cathegories.LINK
|
|
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN, MachiningParam.Params.LEADOUT}
|
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
|
MachiningParam.ManageDependencyParam()
|
|
Next
|
|
Case Cathegories.RIBS
|
|
For Each Param In {MachiningParam.Params.RIBSTYPE}
|
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
|
MachiningParam.ManageDependencyParam()
|
|
Next
|
|
Case Cathegories.AUX_SOLID
|
|
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
|
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
|
MachiningParam.ManageDependencyParam()
|
|
Next
|
|
For Each Param In {MachiningParam.Params.AUXSOLIDSSTRANDCOUNT}
|
|
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
|
MachiningParam.ManageDependencyParam()
|
|
Next
|
|
Case Cathegories.INFILL
|
|
For Each Param In {MachiningParam.Params.FLOORCOUNT, MachiningParam.Params.CEILCOUNT}
|
|
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
|
MachiningParam.ManageDependencyParam()
|
|
Next
|
|
For Each Param In {MachiningParam.Params.INFILLTYPE}
|
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
|
MachiningParam.ManageDependencyParam()
|
|
Next
|
|
End Select
|
|
End Sub
|
|
|
|
Friend Sub ResetCurrParams()
|
|
For Each Param In m_MachiningParamList
|
|
Param.ResetParam()
|
|
Next
|
|
End Sub
|
|
|
|
Friend Sub WriteCurrParamInPart(nPartId As Integer)
|
|
For Each Param In m_MachiningParamList
|
|
Param.WriteParamInPart(nPartId)
|
|
Next
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
Public Class CurrNumericMachiningParam
|
|
Inherits NumericMachiningParam
|
|
|
|
Public Overrides Property sValue As String
|
|
Get
|
|
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
|
|
End Get
|
|
Set(value As String)
|
|
Dim dTempValue As Double = 0
|
|
If m_bIsLen Then
|
|
StringToLen(value, dTempValue)
|
|
Else
|
|
StringToDouble(value, dTempValue)
|
|
End If
|
|
If m_bIsActiveMinMax Then
|
|
If m_MinMaxType = MinMaxTypes.ABSOLUT Then
|
|
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
|
|
m_dValue = dTempValue
|
|
End If
|
|
ElseIf m_MinMaxType = MinMaxTypes.PERCENTAGE Then
|
|
Dim LinkedParam As MachiningParam = Nothing
|
|
' cerco il parametro a cui e' collegato
|
|
For Each CurrCathegory In Map.refMachiningDbVM.SelMachining.CathegoryList
|
|
LinkedParam = CurrCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = m_MinMaxLinkedParam)
|
|
If Not IsNothing(LinkedParam) Then Exit For
|
|
Next
|
|
If Not IsNothing(LinkedParam) AndAlso TypeOf LinkedParam Is NumericMachiningParam Then
|
|
Dim NumericLinkedParam As NumericMachiningParam = DirectCast(LinkedParam, NumericMachiningParam)
|
|
If dTempValue >= NumericLinkedParam.dValue * m_dMinValue / 100 AndAlso dTempValue <= NumericLinkedParam.dValue * m_dMaxValue / 100 Then
|
|
m_dValue = dTempValue
|
|
End If
|
|
Else
|
|
m_dValue = dTempValue
|
|
End If
|
|
End If
|
|
Else
|
|
m_dValue = dTempValue
|
|
End If
|
|
NotifyPropertyChanged(NameOf(sValue))
|
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
|
ManageDependencyParam()
|
|
End Set
|
|
End Property
|
|
|
|
Private m_DbParam As NumericMachiningParam
|
|
Public ReadOnly Property DbParam As NumericMachiningParam
|
|
Get
|
|
Return m_DbParam
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property bIsModifiedFromDb As Boolean
|
|
Get
|
|
Return If(Map.refTopPanelVM.SelMachining.sGUID <> Guid.Empty, m_dValue <> m_DbParam.dOrigValue, False)
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdResetParam As ICommand
|
|
|
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
|
MyBase.New(Type, nIndex, Cathegory)
|
|
Dim bReadFromPart As Boolean = False
|
|
Select Case Type
|
|
Case Params.STRANDH
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDH, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.STRANDW
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDW, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.STRANDCOUNT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDCOUNT, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.OFFSET
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSET, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.STRANDOVERLAP
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDOVERLAP, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.STARTPOINTOFFSETONSLICE
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STARTPOINTOFFSETONSLICE, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.LINKPARAM
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LINKPARAM, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.LINKZUP
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LINKZUP, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.INNERSHELLWIDTH
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INNERSHELLWIDTH, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.OFFSETLEADPOINT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSETLEADPOINT, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.LEADINTANGDIST
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADINTANGDIST, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.LEADINORTHODIST
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADINORTHODIST, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.LEADOUTTANGDIST
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADOUTTANGDIST, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.LEADOUTORTHODIST
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADOUTORTHODIST, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.COASTINGLEN
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGLEN, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.COASTINGFEED_PC
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGFEEDPU, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.WIPELEN
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPELEN, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.WIPEFEED_PC
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEFEEDPU, m_dValue)
|
|
m_bIsLen = False
|
|
'Case Params.WIPEDIR
|
|
' bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEDIR, m_dValue)
|
|
' m_bIsLen = True
|
|
Case Params.FLOORCOUNT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORCOUNT, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.G0FEED
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_G0FEED, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.G0FEEDZ
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_G0FEEDZ, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.TOOLDIAM
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_TOOLDIAM, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.PREFLOWDELAY
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.POSTFLOWDELAY
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.SCREWBACK
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.SLICINGHEIGHT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.RIBSSTRANDWIDTH
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.RIBSOVERLAP
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.RIBSSTRANDCOUNT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.RIBSLINKFILLET
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.RIBSLEADINLEN
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.RIBSLEADOUTLEN
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTLEN, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.RIBSLEADOUTCOASTING
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTCOASTING, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.RIBSLEADOUTWIPE
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPE, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.RIBSLEADOUTWIPEDIR
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.RIBSLEADFILLET
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.SHELLNBRDIFFERENCE
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.SHELLNBRCOASTING
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRCOASTING, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.SHELLNBRWIPE
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPE, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.SHELLNBRWIPEDIR
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.AUXSOLIDSSTRANDWIDTH
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSOVERLAP
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.AUXSOLIDSLINKPARAM
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSSTRANDCOUNT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSOFFSETLEADPOINT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSDENSITY
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSGRIDOVERLAP
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSDIRECTION
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSOFFSETX
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSOFFSETY
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSCOASTINGLEN
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSWIPELEN
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.AUXSOLIDSWIPEDIR
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.FLOWRATE_PC
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.CEILCOUNT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILCOUNT, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.INFILLSTRANDWIDTH
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLSTRANDWIDTH, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.INFILLDENSITY
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDENSITY, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.INFILLOVERLAP
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOVERLAP, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.INFILLGRIDOVERLAP
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLGRIDOVERLAP, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.INFILLDIRECTION
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDIRECTION, m_dValue)
|
|
m_bIsLen = False
|
|
Case Params.INFILLOFFSETX
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETX, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.INFILLOFFSETY
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETY, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.INFILLCOASTING
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLCOASTING, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.INFILLWIPE
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPE, m_dValue)
|
|
m_bIsLen = True
|
|
Case Params.INFILLWIPEDIR
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPEDIR, m_dValue)
|
|
m_bIsLen = False
|
|
End Select
|
|
m_dOrigValue = m_dValue
|
|
If nIndex > 0 Then
|
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
|
Select Case Type
|
|
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
|
|
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.LINKPARAM, Params.INNERSHELLWIDTH, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
|
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
|
|
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSLINKFILLET, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
|
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
|
|
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR, Params.RIBSLEADFILLET
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.AUXSOLIDSSTRANDWIDTH, Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
|
|
Params.AUXSOLIDSOFFSETLEADPOINT, Params.AUXSOLIDSDENSITY, Params.AUXSOLIDSGRIDOVERLAP,
|
|
Params.AUXSOLIDSDIRECTION, Params.AUXSOLIDSOFFSETX, Params.AUXSOLIDSOFFSETY,
|
|
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR, Params.AUXSOLIDSSTRANDCOUNT
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.INFILLSTRANDWIDTH, Params.FLOORCOUNT, Params.CEILCOUNT, Params.INFILLDENSITY, Params.INFILLOVERLAP,
|
|
Params.INFILLGRIDOVERLAP, Params.INFILLDIRECTION, Params.INFILLOFFSETX,
|
|
Params.INFILLOFFSETY, Params.INFILLCOASTING, Params.INFILLWIPE, Params.INFILLWIPEDIR
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
End Select
|
|
If bForceFromDb OrElse Not bReadFromPart Then
|
|
m_dValue = m_DbParam.dOrigValue
|
|
m_dOrigValue = m_DbParam.dOrigValue
|
|
End If
|
|
ElseIf Type = Params.G0FEEDZ AndAlso Not bReadFromPart Then
|
|
m_dValue = 1000
|
|
m_dOrigValue = 1000
|
|
ElseIf Type = Params.FLOWRATE_PC AndAlso Not bReadFromPart Then
|
|
m_dValue = 100
|
|
m_dOrigValue = 100
|
|
End If
|
|
End Sub
|
|
|
|
Friend Overrides Sub WriteParamInPart(nPartId As Integer)
|
|
Dim sWriteValue As String = ""
|
|
If m_bIsLen Then
|
|
sWriteValue = LenToString(m_dValue, 2)
|
|
Else
|
|
sWriteValue = DoubleToString(m_dValue, 2)
|
|
End If
|
|
Select Case Type
|
|
Case Params.STRANDH
|
|
EgtSetInfo(nPartId, MAC_STRANDH, sWriteValue)
|
|
Case Params.STRANDW
|
|
EgtSetInfo(nPartId, MAC_STRANDW, sWriteValue)
|
|
Case Params.STRANDCOUNT
|
|
EgtSetInfo(nPartId, MAC_STRANDCOUNT, sWriteValue)
|
|
Case Params.OFFSET
|
|
EgtSetInfo(nPartId, MAC_OFFSET, sWriteValue)
|
|
Case Params.STRANDOVERLAP
|
|
EgtSetInfo(nPartId, MAC_STRANDOVERLAP, sWriteValue)
|
|
Case Params.STARTPOINTOFFSETONSLICE
|
|
EgtSetInfo(nPartId, MAC_STARTPOINTOFFSETONSLICE, sWriteValue)
|
|
Case Params.LINKPARAM
|
|
EgtSetInfo(nPartId, MAC_LINKPARAM, sWriteValue)
|
|
Case Params.LINKZUP
|
|
EgtSetInfo(nPartId, MAC_LINKZUP, sWriteValue)
|
|
Case Params.INNERSHELLWIDTH
|
|
EgtSetInfo(nPartId, MAC_INNERSHELLWIDTH, sWriteValue)
|
|
Case Params.OFFSETLEADPOINT
|
|
EgtSetInfo(nPartId, MAC_OFFSETLEADPOINT, sWriteValue)
|
|
Case Params.LEADINTANGDIST
|
|
EgtSetInfo(nPartId, MAC_LEADINTANGDIST, sWriteValue)
|
|
Case Params.LEADINORTHODIST
|
|
EgtSetInfo(nPartId, MAC_LEADINORTHODIST, sWriteValue)
|
|
Case Params.LEADOUTTANGDIST
|
|
EgtSetInfo(nPartId, MAC_LEADOUTTANGDIST, sWriteValue)
|
|
Case Params.LEADOUTORTHODIST
|
|
EgtSetInfo(nPartId, MAC_LEADOUTORTHODIST, sWriteValue)
|
|
Case Params.COASTINGLEN
|
|
EgtSetInfo(nPartId, MAC_COASTINGLEN, sWriteValue)
|
|
Case Params.COASTINGFEED_PC
|
|
EgtSetInfo(nPartId, MAC_COASTINGFEEDPU, sWriteValue)
|
|
Case Params.WIPELEN
|
|
EgtSetInfo(nPartId, MAC_WIPELEN, sWriteValue)
|
|
Case Params.WIPEFEED_PC
|
|
EgtSetInfo(nPartId, MAC_WIPEFEEDPU, sWriteValue)
|
|
'Case Params.WIPEDIR
|
|
' EgtSetInfo(nPartId, MAC_WIPEDIR, sWriteValue)
|
|
Case Params.FLOORCOUNT
|
|
EgtSetInfo(nPartId, MAC_FLOORCOUNT, sWriteValue)
|
|
Case Params.G0FEED
|
|
EgtSetInfo(nPartId, MAC_G0FEED, sWriteValue)
|
|
Case Params.G0FEEDZ
|
|
EgtSetInfo(nPartId, MAC_G0FEEDZ, sWriteValue)
|
|
Case Params.TOOLDIAM
|
|
EgtSetInfo(nPartId, MAC_TOOLDIAM, sWriteValue)
|
|
Case Params.PREFLOWDELAY
|
|
EgtSetInfo(nPartId, MAC_PREFLOWDELAY, sWriteValue)
|
|
Case Params.POSTFLOWDELAY
|
|
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
|
|
Case Params.SCREWBACK
|
|
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
|
|
Case Params.SLICINGHEIGHT
|
|
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
|
|
Case Params.RIBSSTRANDWIDTH
|
|
EgtSetInfo(nPartId, MAC_RIBSSTRANDWIDTH, sWriteValue)
|
|
Case Params.RIBSOVERLAP
|
|
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
|
|
Case Params.RIBSSTRANDCOUNT
|
|
EgtSetInfo(nPartId, MAC_RIBSSTRANDCOUNT, sWriteValue)
|
|
Case Params.RIBSLINKFILLET
|
|
EgtSetInfo(nPartId, MAC_RIBSLINKFILLET, sWriteValue)
|
|
Case Params.RIBSLEADINLEN
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADINLEN, sWriteValue)
|
|
Case Params.RIBSLEADOUTLEN
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADOUTLEN, sWriteValue)
|
|
Case Params.RIBSLEADOUTCOASTING
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADOUTCOASTING, sWriteValue)
|
|
Case Params.RIBSLEADOUTWIPE
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPE, sWriteValue)
|
|
Case Params.RIBSLEADOUTWIPEDIR
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, sWriteValue)
|
|
Case Params.RIBSLEADFILLET
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADFILLET, sWriteValue)
|
|
Case Params.SHELLNBRDIFFERENCE
|
|
EgtSetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, sWriteValue)
|
|
Case Params.SHELLNBRCOASTING
|
|
EgtSetInfo(nPartId, MAC_SHELLNBRCOASTING, sWriteValue)
|
|
Case Params.SHELLNBRWIPE
|
|
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
|
|
Case Params.SHELLNBRWIPEDIR
|
|
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
|
|
Case Params.AUXSOLIDSSTRANDWIDTH
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
|
|
Case Params.AUXSOLIDSSTRANDCOUNT
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
|
|
Case Params.AUXSOLIDSOVERLAP
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
|
|
Case Params.AUXSOLIDSLINKPARAM
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
|
|
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
|
|
Case Params.AUXSOLIDSOFFSETLEADPOINT
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
|
|
Case Params.AUXSOLIDSDENSITY
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSDENSITY, sWriteValue)
|
|
Case Params.AUXSOLIDSGRIDOVERLAP
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
|
|
Case Params.AUXSOLIDSDIRECTION
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
|
|
Case Params.AUXSOLIDSOFFSETX
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
|
|
Case Params.AUXSOLIDSOFFSETY
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
|
|
Case Params.AUXSOLIDSCOASTINGLEN
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
|
|
Case Params.AUXSOLIDSWIPELEN
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
|
Case Params.AUXSOLIDSWIPEDIR
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
|
Case Params.FLOWRATE_PC
|
|
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
|
|
Case Params.INFILLSTRANDWIDTH
|
|
EgtSetInfo(nPartId, MAC_INFILLSTRANDWIDTH, sWriteValue)
|
|
Case Params.CEILCOUNT
|
|
EgtSetInfo(nPartId, MAC_CEILCOUNT, sWriteValue)
|
|
Case Params.INFILLDENSITY
|
|
EgtSetInfo(nPartId, MAC_INFILLDENSITY, sWriteValue)
|
|
Case Params.INFILLOVERLAP
|
|
EgtSetInfo(nPartId, MAC_INFILLOVERLAP, sWriteValue)
|
|
Case Params.INFILLGRIDOVERLAP
|
|
EgtSetInfo(nPartId, MAC_INFILLGRIDOVERLAP, sWriteValue)
|
|
Case Params.INFILLDIRECTION
|
|
EgtSetInfo(nPartId, MAC_INFILLDIRECTION, sWriteValue)
|
|
Case Params.INFILLOFFSETX
|
|
EgtSetInfo(nPartId, MAC_INFILLOFFSETX, sWriteValue)
|
|
Case Params.INFILLOFFSETY
|
|
EgtSetInfo(nPartId, MAC_INFILLOFFSETY, sWriteValue)
|
|
Case Params.INFILLCOASTING
|
|
EgtSetInfo(nPartId, MAC_INFILLCOASTING, sWriteValue)
|
|
Case Params.INFILLWIPE
|
|
EgtSetInfo(nPartId, MAC_INFILLWIPE, sWriteValue)
|
|
Case Params.INFILLWIPEDIR
|
|
EgtSetInfo(nPartId, MAC_INFILLWIPEDIR, sWriteValue)
|
|
End Select
|
|
End Sub
|
|
|
|
Friend Overrides Sub SaveParam()
|
|
m_dOrigValue = m_dValue
|
|
End Sub
|
|
|
|
Friend Overrides Sub ResetParam()
|
|
m_dValue = m_dOrigValue
|
|
NotifyPropertyChanged(NameOf(sValue))
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "ResetParam"
|
|
|
|
Public ReadOnly Property ResetParam_Command As ICommand
|
|
Get
|
|
If m_cmdResetParam Is Nothing Then
|
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
|
End If
|
|
Return m_cmdResetParam
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub ResetParamCmd()
|
|
m_dValue = DbParam.dOrigValue
|
|
NotifyPropertyChanged(NameOf(sValue))
|
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
|
End Sub
|
|
|
|
#End Region ' ResetParam
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
Public Class CurrStringMachiningParam
|
|
Inherits StringMachiningParam
|
|
|
|
Private m_DbParam As StringMachiningParam
|
|
Public ReadOnly Property DbParam As StringMachiningParam
|
|
Get
|
|
Return m_DbParam
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property bIsModifiedFromDb As Boolean
|
|
Get
|
|
Return m_sValue <> m_DbParam.sOrigValue
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdResetParam As ICommand
|
|
|
|
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
|
|
MyBase.New(Type, nIndex, Cathegory)
|
|
m_sValue = sValue
|
|
m_sOrigValue = m_sValue
|
|
End Sub
|
|
|
|
Friend Overrides Sub WriteParamInPart(nIndex As Integer)
|
|
Select Case Type
|
|
'Case Params.STRANDH
|
|
'EgtSetInfo(nPartId, MAC_STRANDH, sWriteValue)
|
|
End Select
|
|
End Sub
|
|
|
|
Friend Overrides Sub SaveParam()
|
|
m_sOrigValue = m_sValue
|
|
End Sub
|
|
|
|
Friend Overrides Sub ResetParam()
|
|
m_sValue = m_sOrigValue
|
|
NotifyPropertyChanged(NameOf(sValue))
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "ResetParam"
|
|
|
|
Public ReadOnly Property ResetParam_Command As ICommand
|
|
Get
|
|
If m_cmdResetParam Is Nothing Then
|
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
|
End If
|
|
Return m_cmdResetParam
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub ResetParamCmd()
|
|
ResetParam()
|
|
End Sub
|
|
|
|
#End Region ' ResetParam
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
Public Class CurrComboMachiningParam
|
|
Inherits ComboMachiningParam
|
|
|
|
Public Overrides Property SelValue As IdNameStruct
|
|
Get
|
|
Return m_SelValue
|
|
End Get
|
|
Set(value As IdNameStruct)
|
|
m_SelValue = value
|
|
NotifyPropertyChanged(NameOf(SelValue))
|
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
|
ManageDependencyParam()
|
|
' se aggiorno SlicingType
|
|
If m_Type = Params.SLICINGTYPE Then
|
|
CurrentMachine.UpdateExtrusionArea()
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_DbParam As ComboMachiningParam
|
|
Public ReadOnly Property DbParam As ComboMachiningParam
|
|
Get
|
|
Return m_DbParam
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property bIsModifiedFromDb As Boolean
|
|
Get
|
|
Return If(Map.refTopPanelVM.SelMachining.sGUID <> Guid.Empty, m_SelValue.Id <> m_DbParam.OrigSelValue.Id, False)
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdResetParam As ICommand
|
|
|
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
|
MyBase.New(Type, nIndex, Cathegory)
|
|
Dim bReadFromPart As Boolean = False
|
|
Select Case Type
|
|
Case Params.SLICINGTYPE
|
|
Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, CurrentMachine.sMachIniFile)
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")})
|
|
If nSlicingType >= 1 Then
|
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
|
If nSlicingType >= 2 Then
|
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
|
If nSlicingType >= 3 Then
|
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
|
End If
|
|
End If
|
|
End If
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue)
|
|
If Not bReadFromPart Then
|
|
Dim nSlicing45 As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICING45, nSlicing45)
|
|
nSelValue = If(nSlicing45 = 0, Machining.MPAR_SLICINGTYPE.VERTICAL, Machining.MPAR_SLICINGTYPE.DEG45)
|
|
End If
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.STRANDORDER
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
|
|
New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDORDER, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.DIRECTION
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DIRECTIONS.CCW, "Counterclockwise"),
|
|
New IdNameStruct(Machining.MPAR_DIRECTIONS.CW, "Clockwise")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_DIRECTION, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.LINKTYPE
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
|
|
New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
|
|
New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LINKTYPE, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.LEADIN
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"),
|
|
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
|
|
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADIN, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.LEADOUT
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"),
|
|
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
|
|
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADOUT, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.RIBSTYPE
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"),
|
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"),
|
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded"),
|
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.SUPPORT, "Support")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.AUXSOLIDSINFILL
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.AUXSOLIDSSTRANDORDER
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
|
|
New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDORDER, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.AUXSOLIDSLINKTYPE
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
|
|
New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
|
|
New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.DYNAMIC_MODE
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.STANDARD, "Standard"),
|
|
New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.FAST, "Fast")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.FLOORTYPE
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORTYPE, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.CEILTYPE
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILTYPE, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
Case Params.INFILLTYPE
|
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
|
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
|
|
Dim nSelValue As Integer = 0
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLTYPE, nSelValue)
|
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
|
End Select
|
|
m_OrigSelValue = m_SelValue
|
|
If nIndex > 0 Then
|
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
|
Select Case Type
|
|
Case Params.SLICINGTYPE, Params.STRANDORDER, Params.DIRECTION, Params.DYNAMIC_MODE
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.LINKTYPE, Params.LEADIN, Params.LEADOUT
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.RIBSTYPE
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.FLOORTYPE, Params.CEILTYPE, Params.INFILLTYPE
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
End Select
|
|
If bForceFromDb OrElse Not bReadFromPart Then
|
|
m_SelValue = m_DbParam.OrigSelValue
|
|
m_OrigSelValue = m_DbParam.OrigSelValue
|
|
End If
|
|
ElseIf Type = Params.RIBSTYPE AndAlso Not bReadFromPart Then
|
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_RIBSTYPE.INTERNAL)
|
|
m_SelValue = m_OrigSelValue
|
|
ElseIf Type = Params.DYNAMIC_MODE AndAlso Not bReadFromPart Then
|
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_DYNAMIC_MODE.STANDARD)
|
|
m_SelValue = m_OrigSelValue
|
|
End If
|
|
End Sub
|
|
|
|
Friend Overrides Sub WriteParamInPart(nPartId As Integer)
|
|
Select Case Type
|
|
Case Params.SLICINGTYPE
|
|
EgtSetInfo(nPartId, MAC_SLICINGTYPE, m_SelValue.Id)
|
|
Case Params.STRANDORDER
|
|
EgtSetInfo(nPartId, MAC_STRANDORDER, m_SelValue.Id)
|
|
Case Params.DIRECTION
|
|
EgtSetInfo(nPartId, MAC_DIRECTION, m_SelValue.Id)
|
|
Case Params.LINKTYPE
|
|
EgtSetInfo(nPartId, MAC_LINKTYPE, m_SelValue.Id)
|
|
Case Params.LEADIN
|
|
EgtSetInfo(nPartId, MAC_LEADIN, m_SelValue.Id)
|
|
Case Params.LEADOUT
|
|
EgtSetInfo(nPartId, MAC_LEADOUT, m_SelValue.Id)
|
|
Case Params.RIBSTYPE
|
|
EgtSetInfo(nPartId, MAC_RIBSTYPE, m_SelValue.Id)
|
|
Case Params.AUXSOLIDSINFILL
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
|
Case Params.AUXSOLIDSSTRANDORDER
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDORDER, m_SelValue.Id)
|
|
Case Params.AUXSOLIDSLINKTYPE
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
|
|
Case Params.DYNAMIC_MODE
|
|
EgtSetInfo(nPartId, MAC_DYNAMICMODE, m_SelValue.Id)
|
|
Case Params.FLOORTYPE
|
|
EgtSetInfo(nPartId, MAC_FLOORTYPE, m_SelValue.Id)
|
|
Case Params.CEILTYPE
|
|
EgtSetInfo(nPartId, MAC_CEILTYPE, m_SelValue.Id)
|
|
Case Params.INFILLTYPE
|
|
EgtSetInfo(nPartId, MAC_INFILLTYPE, m_SelValue.Id)
|
|
End Select
|
|
End Sub
|
|
|
|
Friend Overrides Sub SaveParam()
|
|
m_OrigSelValue = m_SelValue
|
|
End Sub
|
|
|
|
Friend Overrides Sub ResetParam()
|
|
m_SelValue = m_OrigSelValue
|
|
NotifyPropertyChanged(NameOf(SelValue))
|
|
CurrentMachine.UpdateExtrusionArea()
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "ResetParam"
|
|
|
|
Public ReadOnly Property ResetParam_Command As ICommand
|
|
Get
|
|
If m_cmdResetParam Is Nothing Then
|
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
|
End If
|
|
Return m_cmdResetParam
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub ResetParamCmd()
|
|
m_SelValue = DbParam.OrigSelValue
|
|
NotifyPropertyChanged(NameOf(SelValue))
|
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
|
CurrentMachine.UpdateExtrusionArea()
|
|
End Sub
|
|
|
|
#End Region ' ResetParam
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
Public Class CurrCheckMachiningParam
|
|
Inherits CheckMachiningParam
|
|
|
|
Public Overrides Property bValue As Boolean
|
|
Get
|
|
Return m_bValue
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_bValue = value
|
|
NotifyPropertyChanged(NameOf(bValue))
|
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
|
End Set
|
|
End Property
|
|
|
|
Private m_DbParam As CheckMachiningParam
|
|
Public ReadOnly Property DbParam As CheckMachiningParam
|
|
Get
|
|
Return m_DbParam
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property bIsModifiedFromDb As Boolean
|
|
Get
|
|
Return If(Map.refTopPanelVM.SelMachining.sGUID <> Guid.Empty, m_bValue <> m_DbParam.bOrigValue, False)
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdResetParam As ICommand
|
|
|
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
|
MyBase.New(Type, nIndex, Cathegory)
|
|
Dim bReadFromPart As Boolean = False
|
|
Select Case Type
|
|
Case Params.SPIRALVASE
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue)
|
|
Case Params.RIBSLINK
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue)
|
|
Case Params.RIBSMERGEWITHSHELL
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bValue)
|
|
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, m_bValue)
|
|
Case Params.RIBSINVERTORDER
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
|
|
Case Params.RIBSINVERTDIRECTION
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bValue)
|
|
Case Params.RIBSINVERTSTRANDORDER
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTSTRANDORDER, m_bValue)
|
|
Case Params.RIBSLEADININVERT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADININVERT, m_bValue)
|
|
Case Params.RIBSLEADOUTINVERT
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
|
|
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue)
|
|
Case Params.AUXSOLIDSINFILLLINK
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
|
|
Case Params.INFILLLINK
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLLINK, m_bValue)
|
|
End Select
|
|
m_bOrigValue = m_bValue
|
|
If nIndex > 0 Then
|
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
|
Select Case Type
|
|
Case Params.SPIRALVASE
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.AUXSOLIDSINFILLLINK
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
Case Params.INFILLLINK
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
End Select
|
|
If bForceFromDb OrElse Not bReadFromPart Then
|
|
m_bValue = m_DbParam.bOrigValue
|
|
m_bOrigValue = m_DbParam.bOrigValue
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Friend Overrides Sub WriteParamInPart(nPartId As Integer)
|
|
Select Case Type
|
|
Case Params.SPIRALVASE
|
|
EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0))
|
|
Case Params.RIBSLINK
|
|
EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0))
|
|
Case Params.RIBSMERGEWITHSHELL
|
|
EgtSetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
|
|
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
|
EgtSetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0))
|
|
Case Params.RIBSINVERTORDER
|
|
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
|
|
Case Params.RIBSINVERTDIRECTION
|
|
EgtSetInfo(nPartId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
|
|
Case Params.RIBSINVERTSTRANDORDER
|
|
EgtSetInfo(nPartId, MAC_RIBSINVERTSTRANDORDER, If(m_bValue, 1, 0))
|
|
Case Params.RIBSLEADININVERT
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADININVERT, If(m_bValue, 1, 0))
|
|
Case Params.RIBSLEADOUTINVERT
|
|
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
|
|
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
|
EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0))
|
|
Case Params.AUXSOLIDSINFILLLINK
|
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
|
|
Case Params.INFILLLINK
|
|
EgtSetInfo(nPartId, MAC_INFILLLINK, If(m_bValue, 1, 0))
|
|
End Select
|
|
End Sub
|
|
|
|
Friend Overrides Sub SaveParam()
|
|
m_bOrigValue = m_bValue
|
|
End Sub
|
|
|
|
Friend Overrides Sub ResetParam()
|
|
m_bValue = m_bOrigValue
|
|
NotifyPropertyChanged(NameOf(bValue))
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "ResetParam"
|
|
|
|
Public ReadOnly Property ResetParam_Command As ICommand
|
|
Get
|
|
If m_cmdResetParam Is Nothing Then
|
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
|
End If
|
|
Return m_cmdResetParam
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub ResetParamCmd()
|
|
m_bValue = DbParam.bOrigValue
|
|
NotifyPropertyChanged(NameOf(bValue))
|
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
|
End Sub
|
|
|
|
#End Region ' ResetParam
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
Public Class CurrOrderedMachiningParam
|
|
Inherits OrderedMachiningParam
|
|
|
|
Private m_DbParam As OrderedMachiningParam
|
|
Public ReadOnly Property DbParam As OrderedMachiningParam
|
|
Get
|
|
Return m_DbParam
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property bIsModifiedFromDb As Boolean
|
|
Get
|
|
Return If(Map.refTopPanelVM.SelMachining.sGUID <> Guid.Empty, Value <> m_DbParam.Value, False)
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdResetParam As ICommand
|
|
|
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
|
MyBase.New(Type, nIndex, Cathegory)
|
|
Dim bReadFromPart As Boolean = False
|
|
Select Case Type
|
|
Case Params.PRINT_ORDER
|
|
m_StandardValueOrderList = New List(Of Integer)({Machining.MPAR_PRINT_ORDER.SHELL,
|
|
Machining.MPAR_PRINT_ORDER.EXTRA_SHELL,
|
|
Machining.MPAR_PRINT_ORDER.INFILL,
|
|
Machining.MPAR_PRINT_ORDER.AUX_SOLID,
|
|
Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED,
|
|
Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL,
|
|
Machining.MPAR_PRINT_ORDER.RIB_INTERNAL,
|
|
Machining.MPAR_PRINT_ORDER.RIB_SUPPORT})
|
|
m_ValueList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_PRINT_ORDER.SHELL, "Shell"),
|
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL, "Extra Shell"),
|
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.INFILL, "Infill"),
|
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.AUX_SOLID, "Filled Solid"),
|
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED, "Unbounded Rib"),
|
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL, "External Rib"),
|
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_INTERNAL, "Internal Rib"),
|
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_SUPPORT, "Support Rib")})
|
|
Dim sValue As String = ""
|
|
bReadFromPart = EgtGetInfo(nPartId, MAC_PRINTORDER, sValue)
|
|
Value = sValue
|
|
End Select
|
|
m_OrigValue = Value
|
|
If nIndex > 0 Then
|
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
|
Select Case Type
|
|
Case Params.PRINT_ORDER
|
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
|
End Select
|
|
If bForceFromDb OrElse Not bReadFromPart Then
|
|
Value = m_DbParam.OrigValue
|
|
m_OrigValue = m_DbParam.OrigValue
|
|
End If
|
|
ElseIf Type = Params.PRINT_ORDER AndAlso Not bReadFromPart Then
|
|
Value = ""
|
|
m_OrigValue = Value
|
|
End If
|
|
End Sub
|
|
|
|
Friend Overrides Sub WriteParamInPart(nPartId As Integer)
|
|
Select Case Type
|
|
Case Params.PRINT_ORDER
|
|
EgtSetInfo(nPartId, MAC_PRINTORDER, Value)
|
|
End Select
|
|
End Sub
|
|
|
|
Friend Overrides Sub SaveParam()
|
|
m_OrigValue = Value
|
|
End Sub
|
|
|
|
Friend Overrides Sub ResetParam()
|
|
Value = m_OrigValue
|
|
m_SelValue = Nothing
|
|
NotifyPropertyChanged(NameOf(ValueList))
|
|
NotifyPropertyChanged(NameOf(SelValue))
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "ResetParam"
|
|
|
|
Public ReadOnly Property ResetParam_Command As ICommand
|
|
Get
|
|
If m_cmdResetParam Is Nothing Then
|
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
|
End If
|
|
Return m_cmdResetParam
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub ResetParamCmd()
|
|
Value = DbParam.OrigValue
|
|
NotifyPropertyChanged(NameOf(Value))
|
|
NotifyPropertyChanged(NameOf(SelValue))
|
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
|
End Sub
|
|
|
|
#End Region ' ResetParam
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|