diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index abc8fa5..0af0670 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb index a1563bc..f9db69f 100644 --- a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb +++ b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb @@ -69,6 +69,8 @@ Namespace EgtCAM5 InitializeSimulation() If IniFile.m_bShowOnlyTable Then EgtShowOnlyTable(False) + EgtZoom(ZM.ALL) + Else EgtDraw() End If Else @@ -502,8 +504,7 @@ Namespace EgtCAM5 MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE End If End If - ' Aggiorno visualizzazione - EgtDraw() + ' Aggiorno visualizzazione dati macchina ShowCncData() StatusMsg = EgtMsg(MSG_SIMULATION + 14) ' Home End Sub diff --git a/ProjectPage/ProjectViewModel.vb b/ProjectPage/ProjectViewModel.vb index dfe556f..0a832fe 100644 --- a/ProjectPage/ProjectViewModel.vb +++ b/ProjectPage/ProjectViewModel.vb @@ -187,9 +187,15 @@ Namespace EgtCAM5 .ValidateNames = True } If LicDlg.ShowDialog() = True Then - ' Copio il file nel direttorio di configurazione del programma - Dim sDestFile As String = IniFile.m_sConfigDir & "\" & LicDlg.SafeFileName - My.Computer.FileSystem.CopyFile(LicDlg.FileName, sDestFile, True) + ' Recupero il direttorio del file + Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName) + ' Se il file non è già nel direttorio di configurazione lo copio + If Not String.Equals(Path.GetFullPath(sDir), Path.GetFullPath(IniFile.m_sConfigDir), StringComparison.OrdinalIgnoreCase) Then + Try + File.Copy(LicDlg.FileName, Path.Combine(IniFile.m_sConfigDir, LicDlg.SafeFileName), True) + Catch ex As Exception + End Try + End If ' Imposto il nuovo file di licenza nell'Ini WritePrivateProfileString(S_GENERAL, K_LICENCE, LicDlg.SafeFileName) End If