-aggiunto finestre personalizzate messagebox e colorpicker
This commit is contained in:
+46
-27
@@ -61,7 +61,7 @@ Public Class ProjectVM
|
||||
|
||||
#Region "EGTUILIB FIELDS"
|
||||
|
||||
Private m_bCPlaneTypePos As Boolean
|
||||
Private m_bCPlaneTypePos As Boolean
|
||||
|
||||
' Variabile per implementazione eventi
|
||||
Private m_InputText As String
|
||||
@@ -231,29 +231,33 @@ Public Class ProjectVM
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
EgtOutLog("NetDongle is full")
|
||||
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
|
||||
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' Se altrimenti manca il collegamento con la chiave di rete
|
||||
' Se altrimenti manca il collegamento con la chiave di rete
|
||||
ElseIf IniFile.m_nKeyLevel = -9 Then
|
||||
EgtOutLog("Missing Link with Net Dongle")
|
||||
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
'MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
' 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(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
'If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, 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",
|
||||
@@ -335,8 +339,9 @@ Public Class ProjectVM
|
||||
If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
|
||||
EgtOutLog("Command log not started")
|
||||
If Environment.GetCommandLineArgs.Count() <= 1 Then
|
||||
MessageBox.Show("Command log not started", "EgtCAM5 Warning",
|
||||
MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
'MessageBox.Show("Command log not started", "EgtCAM5 Warning",
|
||||
' MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, "Command log not started", "EgtCAM5 Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
End If
|
||||
End If
|
||||
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||
@@ -478,7 +483,7 @@ Public Class ProjectVM
|
||||
End If
|
||||
' Esecuzione
|
||||
bOk = ExecBeam(sFile, sMachine, nFlag, True)
|
||||
' altrimenti pareti
|
||||
' altrimenti pareti
|
||||
Else
|
||||
' Verifica abilitazione elaborazione pareti
|
||||
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
||||
@@ -492,12 +497,12 @@ Public Class ProjectVM
|
||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
Map.refMainWindowVM.CloseApplicationCmd()
|
||||
' Altrimenti se richiesta visualizzazione DB utensili
|
||||
' Altrimenti se richiesta visualizzazione DB utensili
|
||||
ElseIf nFlag = 11 And bOk Then
|
||||
MyMachinePanelVM.ToolDb()
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
Map.refMainWindowVM.CloseApplicationCmd()
|
||||
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
||||
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
||||
ElseIf nFlag = 12 And bOk Then
|
||||
MyMachinePanelVM.MachDb()
|
||||
If bBeam Then
|
||||
@@ -507,7 +512,7 @@ Public Class ProjectVM
|
||||
End If
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
Map.refMainWindowVM.CloseApplicationCmd()
|
||||
' Altrimenti se errore
|
||||
' Altrimenti se errore
|
||||
ElseIf Not bOk Then
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
@@ -819,9 +824,11 @@ Public Class ProjectVM
|
||||
For Index = 1 To Lines.Count - 1
|
||||
If Not String.IsNullOrWhiteSpace(Lines(Index)) Then sErrMsg &= Lines(Index) & vbCrLf
|
||||
Next
|
||||
MessageBox.Show(sErrMsg, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(sErrMsg, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErrMsg, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7))
|
||||
'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7))
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 7))
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
@@ -857,9 +864,11 @@ Public Class ProjectVM
|
||||
For Index = 1 To Lines.Count - 1
|
||||
If Not String.IsNullOrWhiteSpace(Lines(Index)) Then sErrMsg &= Lines(Index) & vbCrLf
|
||||
Next
|
||||
MessageBox.Show(sErrMsg, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(sErrMsg, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sErrMsg, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7))
|
||||
'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7))
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 7))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
@@ -870,11 +879,13 @@ Public Class ProjectVM
|
||||
If bOk Then
|
||||
' Copia dei file terminata con successo ...
|
||||
Dim sMsg As String = EgtMsg(8216) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
||||
MessageBox.Show(sMsg, EgtMsg(8214), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
'MessageBox.Show(sMsg, EgtMsg(8214), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(8214), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
Else
|
||||
' Errore nella copia dei file ...
|
||||
Dim sMsg As String = EgtMsg(8255) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
||||
MessageBox.Show(sMsg, EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'MessageBox.Show(sMsg, EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1452,7 +1463,8 @@ Public Class ProjectVM
|
||||
Private Sub OnNewProject(ByVal sender As Object, ByVal bOk As Boolean) Handles m_Controller.OnNewProject
|
||||
EgtZoom(ZM.ALL)
|
||||
If Not bOk Then
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1473,7 +1485,8 @@ Public Class ProjectVM
|
||||
Else
|
||||
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
|
||||
End If
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1501,7 +1514,8 @@ Public Class ProjectVM
|
||||
Else
|
||||
IniFile.m_MruFiles.Remove(sFile)
|
||||
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1515,7 +1529,8 @@ Public Class ProjectVM
|
||||
Else
|
||||
IniFile.m_MruFiles.Remove(sFile)
|
||||
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1536,7 +1551,8 @@ Public Class ProjectVM
|
||||
Map.refStatusBarVM.NotifyStatusProgress(0)
|
||||
Map.refStatusBarVM.NotifyStatusStop(True)
|
||||
Else
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1550,7 +1566,8 @@ Public Class ProjectVM
|
||||
' Segnalo eventuale errore
|
||||
If Not bOk Then
|
||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1561,7 +1578,8 @@ Public Class ProjectVM
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTEXPDIR, Path.GetDirectoryName(sFile))
|
||||
If Not bOk Then
|
||||
Dim sMsg As String = EgtMsg(10007) & " '" & sFile & "'" 'Error exporting file
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1589,7 +1607,8 @@ Public Class ProjectVM
|
||||
IniFile.m_MruScripts.Remove(sFile)
|
||||
End If
|
||||
End If
|
||||
MessageBox.Show(Application.Current.MainWindow, sError, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
'MessageBox.Show(Application.Current.MainWindow, sError, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, sError, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
End If
|
||||
' Disabilito progress e bottone stop
|
||||
Map.refStatusBarVM.NotifyStatusProgress(0)
|
||||
|
||||
Reference in New Issue
Block a user