- correzione disabilitazione parametri LeadOut in CurrMachining
- cambiata gestione della modalita' di modifica selezionata - corezione impostazione pagina modifica dopo apertura progetto - verifica che non ci siano operazioni di modifica in corso prima di far partire slice - correzione errore su chiusura percorso disegnato - disabilitata interfaccia quando comando in corso in modifica
This commit is contained in:
@@ -35,6 +35,10 @@ Public Class StartMachPanelVM
|
||||
Return m_SelStart
|
||||
End Get
|
||||
Set(value As StartEntity)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
|
||||
NotifyPropertyChanged(NameOf(SelStart))
|
||||
Return
|
||||
End If
|
||||
m_SelStart = value
|
||||
EgtDeselectAll()
|
||||
If Not IsNothing(value) Then
|
||||
@@ -293,6 +297,18 @@ Public Class StartMachPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_StartList_IsEnabled As Boolean = False
|
||||
Public ReadOnly Property StartList_IsEnabled As Boolean
|
||||
Get
|
||||
Return If(m_StartList.Count > 0, m_StartList_IsEnabled, False)
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetStartListIsEnabled(bValue As Boolean)
|
||||
m_StartList_IsEnabled = bValue
|
||||
NotifyPropertyChanged(NameOf(StartList_IsEnabled))
|
||||
End Sub
|
||||
|
||||
|
||||
' riferimento griglia all'ingresso in questa pagina
|
||||
Private m_OriginalGridFrame As New Frame3d
|
||||
|
||||
@@ -304,6 +320,8 @@ Public Class StartMachPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bEscOnLine2P As Boolean = False
|
||||
|
||||
#Region "Tooltip"
|
||||
|
||||
Public ReadOnly Property Point_ToolTip As String
|
||||
@@ -458,6 +476,8 @@ Public Class StartMachPanelVM
|
||||
SelStart = m_StartList(0)
|
||||
NotifyPropertyChanged(NameOf(SelStart))
|
||||
End If
|
||||
' abilito lista start mach
|
||||
SetStartListIsEnabled(True)
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
@@ -481,16 +501,33 @@ Public Class StartMachPanelVM
|
||||
' seleziono percorso corrente
|
||||
EgtDeselectAll()
|
||||
EgtSelectObj(m_SelStart.nId)
|
||||
EgtDraw()
|
||||
' disattivo il resto dell'interfaccia
|
||||
ManageInterface(False)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub UpdateUI()
|
||||
' se attiva operazione in piu' passaggi, esco
|
||||
If Map.refSceneHostVM.MainController.GetContinue() Then Return
|
||||
Dim NewEntity As StartEntity = Nothing
|
||||
' se finita creazione curva (è stata chiusa)
|
||||
End Sub
|
||||
|
||||
Friend Sub OnExecCmdEnd(command As Controller.CMD)
|
||||
m_bEscOnLine2P = False
|
||||
Select Case command
|
||||
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
|
||||
Controller.CMD.MOVE, Controller.CMD.ROTATE
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
' rimetto la selezione scena a null
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End Select
|
||||
' riabilito interfaccia
|
||||
ManageInterface(True)
|
||||
' se finita creazione curva
|
||||
If bIsCreatingPath Then
|
||||
m_bIsCreatingPath = False
|
||||
Dim NewEntity As StartEntity = Nothing
|
||||
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewStartLayerId)
|
||||
Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId)
|
||||
@@ -503,37 +540,22 @@ Public Class StartMachPanelVM
|
||||
NewEntityType = StartMachTypes.COMPO
|
||||
End Select
|
||||
EgtSetName(nNewEntityId, START_GEOM)
|
||||
' coloro l'entita' di rosso
|
||||
Dim c3Red As Color3d
|
||||
c3Red.FromColor(System.Drawing.Color.Red)
|
||||
EgtSetColor(nNewEntityId, c3Red)
|
||||
' resetto colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo sposto nel layer degli start
|
||||
EgtRelocateGlob(nNewEntityId, m_nStartMachLayerId, GDB_POS.LAST_SON)
|
||||
' lo aggiungo alla lista
|
||||
NewEntity = New StartEntity(nNewEntityId, NewEntityType)
|
||||
m_StartList.Add(NewEntity)
|
||||
' cancello layer di disegno
|
||||
EgtErase(nNewStartLayerId)
|
||||
' lo seleziono
|
||||
SelStart = NewEntity
|
||||
NotifyPropertyChanged(NameOf(SelStart))
|
||||
End If
|
||||
' cancello layer di disegno
|
||||
EgtErase(nNewStartLayerId)
|
||||
End If
|
||||
' aggiorno posizione
|
||||
RefreshPos()
|
||||
' se aggiunta entita'
|
||||
If Not IsNothing(NewEntity) Then
|
||||
SelStart = NewEntity
|
||||
NotifyPropertyChanged(NameOf(SelStart))
|
||||
End If
|
||||
' rimetto la selezione scena a null
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Friend Sub OnExecCmdEnd(command As Controller.CMD)
|
||||
Select Case command
|
||||
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
|
||||
Controller.CMD.MOVE, Controller.CMD.ROTATE
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Friend Sub OnKeyDown(Key As Forms.Keys)
|
||||
@@ -550,6 +572,12 @@ Public Class StartMachPanelVM
|
||||
' rimetto la selezione scena a null
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End If
|
||||
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
|
||||
If m_bEscOnLine2P Then
|
||||
m_bEscOnLine2P = False
|
||||
Else
|
||||
ManageInterface(True)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -565,6 +593,17 @@ Public Class StartMachPanelVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ManageInterface(bValue As Boolean)
|
||||
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
|
||||
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
|
||||
SetStartListIsEnabled(bValue)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -588,13 +627,13 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub Point(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
|
||||
ManageInterface(False)
|
||||
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
|
||||
If nNewStartLayerId = GDB_ID.NULL Then
|
||||
nNewStartLayerId = EgtCreateGroup(m_nPartId)
|
||||
EgtSetName(nNewStartLayerId, LAY_NEWSTART)
|
||||
End If
|
||||
EgtSetCurrPartLayer(m_nPartId, nNewStartLayerId)
|
||||
'InitCommand(True)
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.POINT) Then
|
||||
m_bIsCreatingPath = True
|
||||
End If
|
||||
@@ -621,7 +660,8 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub Line2P(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
|
||||
ManageInterface(False)
|
||||
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
|
||||
If nNewStartLayerId = GDB_ID.NULL Then
|
||||
nNewStartLayerId = EgtCreateGroup(m_nPartId)
|
||||
EgtSetName(nNewStartLayerId, LAY_NEWSTART)
|
||||
@@ -952,6 +992,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneObj(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
' salvo selezione precedente e deseleziono altri oggetti
|
||||
m_PrevSelObjs.Clear()
|
||||
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
|
||||
@@ -1012,6 +1053,7 @@ Public Class StartMachPanelVM
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelStart))
|
||||
End If
|
||||
SetStartListIsEnabled(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Delete
|
||||
|
||||
Reference in New Issue
Block a user