Merge commit 'a2a1b838889165d647b5419e61402291fca887d2' into feature/Controllo_Converter

This commit is contained in:
Demetrio Cassarino
2025-03-17 08:45:31 +01:00
36 changed files with 2230 additions and 676 deletions
@@ -100,10 +100,11 @@ Public Class SimulationExpanderVM
If Not GetCncFileName(True, sCncFile, sInfo) Then Return
' Eseguo
If Not EgtGenerate(sCncFile, sInfo) Then
Dim nErr = EgtGetLastMachMgrErrorId()
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
'MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information) ' La licenza non permette la Generazione CN INFORMAZIONE
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
'MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
@@ -229,13 +230,16 @@ Public Class SimulationExpanderVM
UpdateUI()
' Messaggio in caso di errore
If Not bOk Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) ' .... - ERRORE
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) ' .... - ERRORE
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else
'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore sconosciuto - ERRORE
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore sconosciuto - ERRORE
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If
End If
' Imposto stato corrente
@@ -273,13 +277,16 @@ Public Class SimulationExpanderVM
Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
m_bStopOnNextCollision = True
If Not EgtSimStart(False) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) ' .... - ERRORE
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) ' .... - ERRORE
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else
'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore sconosciuto - ERRORE
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore sconosciuto - ERRORE
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
End If
@@ -349,8 +356,10 @@ Public Class SimulationExpanderVM
End If
' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
UpdateMachView()
' Aggiorno visualizzazione
EgtDraw()
' Aggiorno visualizzazione (solo se interfaccia non minimizzata, per aumentare velocità)
If Application.Current.MainWindow.WindowState <> WindowState.Minimized Then
EgtDraw()
End If
' Aggiorno dati CNC
If nShowDataCounter = 5 Or GetSimulationStatus() = MCH_SIM_ST.UI_PAUSE Or GetSimulationStatus() = MCH_SIM_ST.UI_STOP Then
ShowCncData()