- correzione su visibilita' layer
- estes o blocco interfaccia durante calcoli - migliorata gestione slider
This commit is contained in:
@@ -55,9 +55,7 @@ Public Class LeftPanelVM
|
||||
Case Panels.SHELLNUMBER
|
||||
Map.refShellNumberPanelVM.Init()
|
||||
End Select
|
||||
If Not m_SelPanel = Panels.NULL Then
|
||||
Map.refViewLayerManagerVM.UpdateForced()
|
||||
End If
|
||||
Map.refViewLayerManagerVM.UpdateForced()
|
||||
NotifyPropertyChanged(NameOf(SelPanel))
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -42,18 +42,22 @@
|
||||
<Button Content="Slice"
|
||||
Command="{Binding Slice_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"
|
||||
IsEnabled="{Binding Buttons_IsEnabled}"
|
||||
Visibility="{Binding ModifyMode_Visibility}"/>
|
||||
<Button Content="Generate"
|
||||
Command="{Binding Generate_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"
|
||||
IsEnabled="{Binding Buttons_IsEnabled}"
|
||||
Visibility="{Binding SliceMode_Visibility}"/>
|
||||
<Button Content="Simulate"
|
||||
Command="{Binding Simulate_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"
|
||||
IsEnabled="{Binding Buttons_IsEnabled}"
|
||||
Visibility="{Binding SliceMode_Visibility}"/>
|
||||
<Button Content="Exit"
|
||||
Command="{Binding Exit_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"
|
||||
IsEnabled="{Binding Buttons_IsEnabled}"
|
||||
Visibility="{Binding SliceMode_Visibility}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
|
||||
@@ -127,6 +127,17 @@ Public Class SliceManagerVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Buttons_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property Buttons_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Buttons_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetButtonsIsEnabled(value As Boolean)
|
||||
m_Buttons_IsEnabled = value
|
||||
NotifyPropertyChanged(NameOf(Buttons_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_ModifyMode_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property ModifyMode_Visibility As Visibility
|
||||
Get
|
||||
@@ -276,10 +287,14 @@ Public Class SliceManagerVM
|
||||
m_bGenerate = bGenerate
|
||||
' mostro barre di caricamento
|
||||
SetLoadingVisibility(True)
|
||||
' disabilito ProjManager, TopPanel e uscita dal programma
|
||||
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
|
||||
Map.refTFSEditorVM.SetTFSEditorIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||
SetButtonsIsEnabled(False)
|
||||
' verifico se eseguire slice
|
||||
Dim bOk As Boolean = True
|
||||
Dim bToRecalcSlice As Boolean = False
|
||||
@@ -363,6 +378,10 @@ Public Class SliceManagerVM
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
|
||||
Map.refTFSEditorVM.SetTFSEditorIsEnabled(True)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||
SetButtonsIsEnabled(True)
|
||||
m_bSlice = False
|
||||
m_bCalcTFS = False
|
||||
m_bGenerate = False
|
||||
|
||||
@@ -5,5 +5,7 @@
|
||||
Value="{Binding dLayerAdvancement}"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
SmallChange="1"
|
||||
IsEnabled="{Binding LayerAdvancement_IsEnabled}"
|
||||
Visibility="{Binding LayerAdvancement_Visibility}"/>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Icarus="clr-namespace:Icarus"
|
||||
IsEnabled="{Binding LayerIndex_IsEnabled}"
|
||||
Visibility="{Binding LayerIndex_Visibility}">
|
||||
<Grid VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -17,15 +18,16 @@
|
||||
SelectedIndex="{Binding ghSelViewSlider}"
|
||||
Width="100"/>
|
||||
<Icarus:ShowValueSlider Grid.Row="3"
|
||||
Orientation="Vertical"
|
||||
Height="400"
|
||||
Value="{Binding nLayerIndex}"
|
||||
Minimum="{Binding nLayerIndex_Minimum}"
|
||||
Maximum="{Binding nLayerIndex_Maximum}"
|
||||
ShowValue="{Binding ghShowValue}"
|
||||
ShowMaximum="{Binding ghShowMaximum}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource LayerIndex_Slider}"/>
|
||||
Orientation="Vertical"
|
||||
Height="400"
|
||||
Value="{Binding nLayerIndex}"
|
||||
Minimum="{Binding nLayerIndex_Minimum}"
|
||||
Maximum="{Binding nLayerIndex_Maximum}"
|
||||
ShowValue="{Binding ghShowValue}"
|
||||
ShowMaximum="{Binding ghShowMaximum}"
|
||||
SmallChange="1"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource LayerIndex_Slider}"/>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -229,6 +229,28 @@ Public Class SliderManagerVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_LayerIndex_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property LayerIndex_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_LayerIndex_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetLayerIndexIsEnabled(value As Boolean)
|
||||
m_LayerIndex_IsEnabled = value
|
||||
NotifyPropertyChanged(NameOf(LayerIndex_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_LayerAdvancement_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property LayerAdvancement_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_LayerAdvancement_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetLayerAdvancementIsEnabled(value As Boolean)
|
||||
m_LayerAdvancement_IsEnabled = value
|
||||
NotifyPropertyChanged(NameOf(LayerAdvancement_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_nLayerIndex_Minimum As Double
|
||||
Public Property nLayerIndex_Minimum As Double
|
||||
Get
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:PrintApp="clr-namespace:Icarus"
|
||||
MaxHeight="600"
|
||||
Width="{Binding ControlWidth}">
|
||||
Width="{Binding ControlWidth}"
|
||||
IsEnabled="{Binding bTFSEditor_IsEnabled}">
|
||||
<Border VerticalAlignment="Center"
|
||||
MinHeight="300"
|
||||
Style="{StaticResource RightPanel_Border}">
|
||||
|
||||
@@ -197,6 +197,17 @@ Public Class TFSEditorVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bTFSEditor_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property bTFSEditor_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_bTFSEditor_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetTFSEditorIsEnabled(bValue As Boolean)
|
||||
m_bTFSEditor_IsEnabled = bValue
|
||||
NotifyPropertyChanged(NameOf(bTFSEditor_IsEnabled))
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdSet As ICommand
|
||||
Private m_cmdMedia As ICommand
|
||||
|
||||
@@ -92,8 +92,8 @@ Public Class TopPanelVM
|
||||
' imposto pagina di modifica
|
||||
SetSelPage(Pages.MODIFY)
|
||||
End If
|
||||
m_SelModifyMode = value
|
||||
If Not IsNothing(value) AndAlso Map.refTopPanelVM.m_PartList.Count > 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
m_SelModifyMode = value
|
||||
Dim SelLeftPanel As LeftPanelVM.Panels = LeftPanelVM.Panels.NULL
|
||||
Select Case value.ModifyMode
|
||||
Case ModifyModes.DISPOSITION
|
||||
@@ -364,7 +364,8 @@ Public Class TopPanelVM
|
||||
End Sub
|
||||
|
||||
Private Function ExitMODIFY()
|
||||
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.NULL)
|
||||
SetSelModifyMode(ModifyModes.NULL)
|
||||
' Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.NULL)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -140,38 +140,45 @@ Public Class ViewLayer
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr ' se solidi
|
||||
If m_Type = ViewLayerType.SOLID_SLICE Then
|
||||
' aggiorno parametro di calcolo solidi sui pezzi
|
||||
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||
EgtSetInfo(CurrPart.nPartId, KEY_CALC_SOLIDS, bIsVisible)
|
||||
Next
|
||||
' lancio calcolo solidi
|
||||
If bIsVisible Then
|
||||
' mostro barre di caricamento
|
||||
Map.refSliceManagerVM.SetCalcSolid(True)
|
||||
Map.refSliceManagerVM.SetLoadingVisibility(True)
|
||||
' disabilito ProjManager, TopPanel e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
|
||||
ExecSolid()
|
||||
' rileggo i layer con i solidi
|
||||
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
|
||||
' aggiorno parametro di calcolo solidi sui pezzi
|
||||
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||
CurrPart.RefreshPrintLayers()
|
||||
EgtSetInfo(CurrPart.nPartId, KEY_CALC_SOLIDS, bIsVisible)
|
||||
Next
|
||||
' nascondo barre di caricamento
|
||||
Map.refSliceManagerVM.SetCalcSolid(False)
|
||||
Map.refSliceManagerVM.SetLoadingVisibility(False)
|
||||
' riabilito ProjManager, TopPanel e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
|
||||
' lancio calcolo solidi
|
||||
If bIsVisible Then
|
||||
' mostro barre di caricamento
|
||||
Map.refSliceManagerVM.SetCalcSolid(True)
|
||||
Map.refSliceManagerVM.SetLoadingVisibility(True)
|
||||
' disabilito ProjManager, TopPanel e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
|
||||
Map.refTFSEditorVM.SetTFSEditorIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||
Map.refSliceManagerVM.SetButtonsIsEnabled(False)
|
||||
ExecSolid()
|
||||
' rileggo i layer con i solidi
|
||||
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||
CurrPart.RefreshPrintLayers()
|
||||
Next
|
||||
' nascondo barre di caricamento
|
||||
Map.refSliceManagerVM.SetCalcSolid(False)
|
||||
Map.refSliceManagerVM.SetLoadingVisibility(False)
|
||||
' riabilito ProjManager, TopPanel e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
|
||||
Map.refTFSEditorVM.SetTFSEditorIsEnabled(True)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||
Map.refSliceManagerVM.SetButtonsIsEnabled(True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Map.refTopPanelVM.SelPage = Pages.SLICE AndAlso (m_Type = ViewLayerType.SOLID_SLICE OrElse m_Type = ViewLayerType.SLICE_TOOLPATH) Then
|
||||
'If Then
|
||||
' Map.refSliderManagerVM.SetSliderVisibility(Map.refViewLayerManagerVM.LayerList.Any(Function(x) (x.Type = ViewLayerType.SOLID_SLICE OrElse x.Type = ViewLayerType.START_MACHINING) AndAlso x.bIsVisible))
|
||||
'End If
|
||||
End If
|
||||
' se uno tra solid e toolpath e' attivo, visualizzo gli slider
|
||||
Map.refSliderManagerVM.SetSliderVisibility(Map.refViewLayerManagerVM.LayerList.Any(Function(x) (x.Type = ViewLayerType.SOLID_SLICE OrElse x.Type = ViewLayerType.SLICE_TOOLPATH) AndAlso Not IsNothing(x.bIsVisible) AndAlso x.bIsVisible))
|
||||
Dim Status As GDB_ST = If(bIsVisible, GDB_ST.ON_, GDB_ST.OFF)
|
||||
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||
Select Case m_Type
|
||||
|
||||
Reference in New Issue
Block a user