diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index b28d7ff..23fe018 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 62d1c89..c3a0464 100644 --- a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb +++ b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb @@ -414,11 +414,22 @@ Namespace EgtCAM5 Public Sub Generate(ByVal param As Object) Dim sCurrFilePath As String = String.Empty EgtGetCurrFilePath(sCurrFilePath) - If String.IsNullOrEmpty(sCurrFilePath) Then + If String.IsNullOrEmpty(sCurrFilePath) OrElse EgtGetModified() Then MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) + Return End If + Dim sCncFile As String = Path.ChangeExtension(sCurrFilePath, Nothing) Dim sInfo As String = "EgtCAM5 - " & sCurrFilePath - If Not EgtGenerate(Path.ChangeExtension(sCurrFilePath, ".cnc"), sInfo) Then + If IniFile.m_bMachiningGroup Then + Dim sMGrpName As String = String.Empty + If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then + sCncFile &= "_" & sMGrpName & ".cnc" + sInfo &= "-" & sMGrpName + End If + Else + sCncFile &= ".cnc" + End If + If Not EgtGenerate(sCncFile, sInfo) Then If EgtGetLastMachMgrErrorId() <> 0 Then Dim sErr As String = EgtGetLastMachMgrErrorString() MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) diff --git a/StatusBar/StatusBarViewModel.vb b/StatusBar/StatusBarViewModel.vb index 9f9b984..a0e9e64 100644 --- a/StatusBar/StatusBarViewModel.vb +++ b/StatusBar/StatusBarViewModel.vb @@ -531,7 +531,10 @@ Namespace EgtCAM5 End Sub Public Function OutText(ByRef psText As IntPtr) As Boolean + ' Assegno stringa StatusOutput = (Marshal.PtrToStringUni(psText)) + ' Costringo ad aggiornare + UpdateUI() Return True End Function