From 0bac54e993e7d964fa8deb79a2ecf7117a020320 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 24 Feb 2020 08:12:12 +0000 Subject: [PATCH] =?UTF-8?q?EgtCAM5=20:=20-=20aggiunta=20gestione=20errore?= =?UTF-8?q?=20generazione=20CN=20perch=C3=A8=20operazione=20non=20abilitat?= =?UTF-8?q?a=20da=20licenza=20-=20in=20dialogo=20richiesta=20licenza=20agg?= =?UTF-8?q?iunta=20visualizzazione=20numero=20chiave.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimulationExpanderViewModel.vb | 12 ++++++++---- Project/ProjectVM.vb | 7 ++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb index 81436b8..72a0836 100644 --- a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb +++ b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb @@ -591,14 +591,18 @@ Public Class SimulationExpanderVM If Not GetCncFileName( True, sCncFile, sInfo) Then Return ' Eseguo If Not EgtGenerate(sCncFile, sInfo) Then - If EgtGetLastMachMgrErrorId() <> 0 Then + Dim nErr = EgtGetLastMachMgrErrorId() + If nErr = 1000 then + MessageBox.Show( EgtMsg( 5333), 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) + MessageBox.Show( sErr, EgtMsg( 5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) Else - MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) + MessageBox.Show( EgtMsg( 5306), EgtMsg( 5305), MessageBoxButton.OK, MessageBoxImage.Error) End If + bNcView = False Else - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 32) & " (" & sCncFile & ")") + Application.Msn.NotifyColleagues( Application.NOTIFYSTATUSOUTPUT, EgtMsg( 5332) & " (" & sCncFile & ")") End If ' Torno alla fase originale (o alla prima se non definita) EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True) diff --git a/Project/ProjectVM.vb b/Project/ProjectVM.vb index 4876745..38d6c66 100644 --- a/Project/ProjectVM.vb +++ b/Project/ProjectVM.vb @@ -177,10 +177,11 @@ Public Class ProjectVM ' Altrimenti manca la licenza Else EgtOutLog("Problems with Licence") - ' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore" - Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6) + ' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore" + Dim sKeyInfo As String = "" : EgtGetKeyInfo( sKeyInfo) + Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6) Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) - If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then + If MessageBox.Show( sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then ' Apro dialogo per richiesta file licenza Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With { .DefaultExt = ".lic",