- aggiunto flag per VirtualAdditive
This commit is contained in:
@@ -78,4 +78,7 @@ Public Module ConstGen
|
||||
' Nome file Lua con le funzioni di attrezzaggio
|
||||
Public Const SETUP_LUA As String = "SetUp.lua"
|
||||
|
||||
' Chiave di Info in gruppo di lavoro per attivazione Virtual Milling
|
||||
Public Const KEY_MCHGRP_VM As String = "Vm"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -109,6 +109,7 @@ Public Module ConstIni
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
Public Const K_MACHVIEWMODE As String = "MachViewMode"
|
||||
Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive"
|
||||
|
||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||
|
||||
@@ -63,6 +63,8 @@ Public Class MySimulation
|
||||
' Aggiornamenti per bottone Play/Pause
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged("PlayPauseImage")
|
||||
' Abilito check VMill
|
||||
VMill_IsEnabled = True
|
||||
Select Case nMove
|
||||
Case MCH_SIM.END_
|
||||
StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata
|
||||
|
||||
@@ -67,6 +67,23 @@
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:SimulationPanelV}}}"
|
||||
IsEnabled="{Binding MySimul.VMill_IsEnabled}"
|
||||
Margin="2.5"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding VirtualAdditive_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding VirtualAdditive_IsChecked}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding VirtualAdditive_Msg}"
|
||||
Margin="2.5"
|
||||
Style="{StaticResource Simulation_TextBlock}"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding StatusMsg}"
|
||||
TextAlignment="Center"
|
||||
Margin="2.5"
|
||||
|
||||
@@ -20,6 +20,45 @@ Public Class SimulationPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_VirtualAdditive_IsChecked As Boolean = False
|
||||
Public Property VirtualAdditive_IsChecked As Boolean
|
||||
Get
|
||||
Return m_VirtualAdditive_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, value) Then
|
||||
m_VirtualAdditive_IsChecked = value
|
||||
Else
|
||||
NotifyPropertyChanged(VirtualAdditive_IsChecked)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_VirtualAdditive_IsEnabled As Boolean = False
|
||||
Public Property VirtualAdditive_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_VirtualAdditive_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_VirtualAdditive_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property VirtualAdditive_Visibility As Visibility
|
||||
Get
|
||||
Return If(GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property VirtualAdditive_Msg As String
|
||||
Get
|
||||
Return "Virtual Additive"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
@@ -101,6 +140,21 @@ Public Class SimulationPanelVM
|
||||
MySimul.SliderValue = SliderVal
|
||||
MySimul.ShowCncData()
|
||||
MySimul.StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 14) ' Home
|
||||
' Gestione check VMill
|
||||
If GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0 Then
|
||||
Dim bVal As Boolean
|
||||
MySimul.VMill_IsEnabled = True
|
||||
m_VirtualAdditive_IsChecked = EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) AndAlso bVal
|
||||
Else
|
||||
' Disabilito Vmill, ma inibisco dichiarazione progetto modificato
|
||||
EgtDisableModified()
|
||||
MySimul.VMill_IsEnabled = False
|
||||
m_VirtualAdditive_IsChecked = False
|
||||
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
|
||||
EgtEnableModified()
|
||||
End If
|
||||
NotifyPropertyChanged(VirtualAdditive_IsChecked)
|
||||
NotifyPropertyChanged(VirtualAdditive_Visibility)
|
||||
' nascondo slider strati e layer da visualizzare
|
||||
Map.refSliderManagerVM.SetSliderVisibility(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False)
|
||||
|
||||
Reference in New Issue
Block a user