diff --git a/Icarus/Constants/ConstIni.vb b/Icarus/Constants/ConstIni.vb index 8be9c07..c63fef6 100644 --- a/Icarus/Constants/ConstIni.vb +++ b/Icarus/Constants/ConstIni.vb @@ -110,6 +110,7 @@ Public Module ConstIni 'Public Const K_SLIDERVAL As String = "SliderVal" Public Const K_MACHVIEWMODE As String = "MachViewMode" Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive" + Public Const K_TRACEENABLE As String = "TraceEnable" Public Const S_PRINTING3D As String = "3dPrinting" Public Const K_3PRNBASEDIR As String = "BaseDir" diff --git a/Icarus/Constants/ConstMachIni.vb b/Icarus/Constants/ConstMachIni.vb index 4e7bdf5..a33c9ce 100644 --- a/Icarus/Constants/ConstMachIni.vb +++ b/Icarus/Constants/ConstMachIni.vb @@ -14,4 +14,10 @@ Public Const S_MINMAX As String = "MinMax" + Public Const S_VMILL As String = "VMill" + Public Const K_VM_ENABLE As String = "Enable" + + Public Const S_TOOLTRACE As String = "ToolTrace" + Public Const K_TT_ENABLE As String = "Enable" + End Module diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 40f8aa1..55b0d0f 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 2704, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 2704, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 2707, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 2707, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index aa15678..7f2f580 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Icarus/SimulationPanel/MySimulation.vb b/Icarus/SimulationPanel/MySimulation.vb index d1b262d..6289fb0 100644 --- a/Icarus/SimulationPanel/MySimulation.vb +++ b/Icarus/SimulationPanel/MySimulation.vb @@ -23,6 +23,16 @@ Public Class MySimulation #End Region ' FIELDS & PROPERTIES +#Region "Messages" + + Public ReadOnly Property VMillAdditiveMsg As String + Get + Return "Virtual Additive" + End Get + End Property + +#End Region ' Messages + #Region "CONSTRUCTOR" Sub New() @@ -57,14 +67,13 @@ Public Class MySimulation SetShowPlay(True) NotifyPropertyChanged("PlayPauseImage") End If - ' Se movimento non riuscito + ' Se movimento non riuscito Else SetSimulationStatus(MCH_SIM_ST.UI_STOP) ' Aggiornamenti per bottone Play/Pause SetShowPlay(True) NotifyPropertyChanged("PlayPauseImage") - ' Abilito check VMill - VMill_IsEnabled = True + ' Eventuale messaggio Select Case nMove Case MCH_SIM.END_ StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata @@ -109,6 +118,14 @@ Public Class MySimulation EgtSimSetUiStatus(GetStatus()) End Sub + Public Overrides Sub VMillActiveInfoTitle(VMillActive As Boolean) + If VMillActive Then + EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, VMillActive) + Else + EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM) + End If + End Sub + #End Region ' METHODS End Class diff --git a/Icarus/SimulationPanel/SimulationPanelV.xaml b/Icarus/SimulationPanel/SimulationPanelV.xaml index 8df96ba..5f4ca6a 100644 --- a/Icarus/SimulationPanel/SimulationPanelV.xaml +++ b/Icarus/SimulationPanel/SimulationPanelV.xaml @@ -71,16 +71,33 @@ IsEnabled="{Binding MySimul.VMill_IsEnabled}" Margin="2.5" HorizontalAlignment="Center" - Visibility="{Binding VirtualAdditive_Visibility}"> + Visibility="{Binding MySimul.VMill_Visibility}"> - + + + + + + + + diff --git a/Icarus/SimulationPanel/SimulationPanelVM.vb b/Icarus/SimulationPanel/SimulationPanelVM.vb index 86c8545..ee58007 100644 --- a/Icarus/SimulationPanel/SimulationPanelVM.vb +++ b/Icarus/SimulationPanel/SimulationPanelVM.vb @@ -20,36 +20,6 @@ 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(NameOf(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 @@ -141,20 +111,31 @@ Public Class SimulationPanelVM 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 + If GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0 AndAlso + EgtUILib.GetPrivateProfileInt( S_VMILL, K_VM_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then + MySimul.VMill_Visibility = Visibility.Visible MySimul.VMill_IsEnabled = True - m_VirtualAdditive_IsChecked = EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) AndAlso bVal + Dim bVal As Boolean + MySimul.SetVMillActive( EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) AndAlso bVal) Else ' Disabilito Vmill, ma inibisco dichiarazione progetto modificato - EgtDisableModified() + MySimul.VMill_Visibility = Visibility.Collapsed MySimul.VMill_IsEnabled = False - m_VirtualAdditive_IsChecked = False + MySimul.VMillActive = False + EgtDisableModified() EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM) EgtEnableModified() End If - NotifyPropertyChanged(NameOf(VirtualAdditive_IsChecked)) - NotifyPropertyChanged(NameOf(VirtualAdditive_Visibility)) + ' Gestione check Trace + If GetMainPrivateProfileInt(S_SIMUL, K_TRACEENABLE, 0) > 0 And + EgtUILib.GetPrivateProfileInt(S_TOOLTRACE, K_TT_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then + MySimul.Trace_Visibility = Visibility.Visible + MySimul.Trace_IsEnabled = True + If MySimul.TraceActive Then MySimul.TraceActive = True + Else + MySimul.Trace_Visibility = Visibility.Collapsed + MySimul.Trace_IsEnabled = False + End If ' nascondo slider strati e layer da visualizzare Map.refSliderManagerVM.SetSliderVisibility(False) Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False)