Icarus :
- migliorata gestione di progetto modificato.
This commit is contained in:
@@ -20,23 +20,22 @@ Public Class SliderManagerVM
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
' se diverso da nullo nascondo precedente
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
||||
If m_nLayerIndex = 0 Then
|
||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
||||
Next
|
||||
ElseIf m_nLayerIndex > 0 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
' nascondo precedente
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
||||
If m_nLayerIndex = 0 Then
|
||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
||||
Next
|
||||
ElseIf m_nLayerIndex > 0 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
m_nLayerIndex = value
|
||||
' se diverso da nullo visualizzo corrente
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
||||
If m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
||||
' porto barra nuovo strato a 100
|
||||
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
|
||||
Case ViewSliderType.UNTIL_SELECTED
|
||||
@@ -64,6 +63,7 @@ Public Class SliderManagerVM
|
||||
End If
|
||||
m_nLayerIndex = value
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||
NotifyPropertyChanged(NameOf(ghValueHeight))
|
||||
@@ -71,47 +71,44 @@ Public Class SliderManagerVM
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetLayerIndex(value As Integer)
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd = value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd = value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
m_nLayerIndex = value
|
||||
Case ViewSliderType.UNTIL_SELECTED
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd <= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd <= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
m_nLayerIndex = value
|
||||
Case ViewSliderType.FROM_SELECTED
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd >= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd >= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
m_nLayerIndex = value
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
NotifyPropertyChanged(NameOf(nLayerIndex))
|
||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||
@@ -201,6 +198,8 @@ Public Class SliderManagerVM
|
||||
Return m_dLayerAdvancement
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
Dim nTotSolid As Integer = 0
|
||||
@@ -247,6 +246,7 @@ Public Class SliderManagerVM
|
||||
End If
|
||||
m_dLayerAdvancement = value
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
EgtDraw()
|
||||
End Set
|
||||
End Property
|
||||
@@ -335,6 +335,7 @@ Public Class SliderManagerVM
|
||||
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
|
||||
' ciclo tutti i layer per nasconderli/mostrarli
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||
@@ -361,6 +362,7 @@ Public Class SliderManagerVM
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
' mostro/nascondo slider orizzontale
|
||||
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
|
||||
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
|
||||
|
||||
@@ -157,6 +157,7 @@ Public Module CurrentMachine
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateExtrusionArea()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' recupero eventuale vecchia area di estrusione
|
||||
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
|
||||
@@ -165,9 +166,15 @@ Public Module CurrentMachine
|
||||
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT)
|
||||
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId)
|
||||
' se lavorazione corrente nulla, esco
|
||||
If IsNothing(Map.refTopPanelVM.CurrMachining) Then Return
|
||||
If IsNothing(Map.refTopPanelVM.CurrMachining) Then
|
||||
DisableMgr.ReEnable()
|
||||
Return
|
||||
End If
|
||||
' se non esiste file dati macchina, esco
|
||||
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return
|
||||
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then
|
||||
DisableMgr.ReEnable()
|
||||
Return
|
||||
End If
|
||||
' recupero tipo di slice
|
||||
Dim sExtrusionType As String = S_VERTICAL
|
||||
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
||||
@@ -199,6 +206,7 @@ Public Module CurrentMachine
|
||||
EgtSetColor(nExtrusionRectId, c3Temp)
|
||||
EgtSetName(nExtrusionRectId, EXTRUSION_RECT)
|
||||
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||
DisableMgr.ReEnable()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -150,8 +150,8 @@ Public Class ViewLayer
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateVisibility(bIsVisible As Boolean)
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr ' se solidi
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' se solidi
|
||||
If m_Type = ViewLayerType.SOLID_SLICE Then
|
||||
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
|
||||
' aggiorno parametro di calcolo solidi sui pezzi
|
||||
@@ -242,7 +242,6 @@ Public Class ViewLayer
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user