6c3b31ff7d
- Aggiunto bottone di scelta del file per il disegno utensile nel Db. - Aggiunto controllo per gestione RawPart in disposizione. - Piccoli miglioramenti enanched selection.
46 lines
1.9 KiB
VB.net
46 lines
1.9 KiB
VB.net
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class RawPartOptionViewModel
|
|
Inherits ViewModelBase
|
|
|
|
Private m_MoveWithFixture As Boolean = False
|
|
Public Property MoveWithFixture As Boolean
|
|
Get
|
|
Return m_MoveWithFixture
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_MoveWithFixture Then
|
|
If value Then
|
|
' Abilito la selezione di RawPart con autoselezione delle sue ventose
|
|
Application.Msn.NotifyColleagues(Application.SETSCENESELTYPE, SceneSelTypeOpt.RAWPARTWITHFIXTURE)
|
|
' Seleziono le ventose associate ad uno dei grezzi selezionati
|
|
' ciclo sui grezzi selezionati
|
|
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
|
While nSelRawPartId <> GDB_ID.NULL
|
|
' seleziono i sottopezzi del grezzo
|
|
DispositionUtility.SelectRawPartFixture(nSelRawPartId)
|
|
nSelRawPartId = EgtGetNextSelectedObj()
|
|
End While
|
|
Else
|
|
' Abilito la selezione di RawPart
|
|
Application.Msn.NotifyColleagues(Application.SETSCENESELTYPE, SceneSelTypeOpt.RAWPART)
|
|
' ciclo sui grezzi selezionati
|
|
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
|
While nSelRawPartId <> GDB_ID.NULL
|
|
' deseleziono i sottopezzi del grezzo
|
|
DispositionUtility.DeselectRawPartFixture(nSelRawPartId)
|
|
nSelRawPartId = EgtGetNextSelectedObj()
|
|
End While
|
|
End If
|
|
EgtDraw()
|
|
m_MoveWithFixture = value
|
|
OnPropertyChanged("MoveWithFixture")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
End Class
|
|
|
|
End Namespace |