diff --git a/Application.xaml.vb b/Application.xaml.vb
index 9a9a772..b12c40d 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -210,7 +210,8 @@ Class Application
Friend Const GUNSTOCKMODIF As String = "GunStockModif"
Private Sub Application_DispatcherUnhandledException(ByVal sender As System.Object, ByVal e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs)
- MessageBox.Show(e.Exception.Message)
+ 'MessageBox.Show(e.Exception.Message)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, e.Exception.Message)
e.Handled = True
End Sub
diff --git a/CurrSetUp/CurrSetUpVM.vb b/CurrSetUp/CurrSetUpVM.vb
index 7570fc5..6267704 100644
--- a/CurrSetUp/CurrSetUpVM.vb
+++ b/CurrSetUp/CurrSetUpVM.vb
@@ -161,7 +161,8 @@ Public Class CurrSetUpVM
sFilePath = SaveFileDialogViewVM.FileName
If Not m_SetUpVM.Save(sFilePath) Then
EgtOutLog("Error in setup saving: can't find the directory")
- MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If
End Sub
@@ -256,14 +257,15 @@ Public Class CurrSetUpVM
' Verifico se l'attrezzaggio è stato modificato
If m_SetUpVM.IsAppliedSetUp() Then
' se modificato chiedo se salvarlo prima di uscire
- If MessageBox.Show(EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
' lo salvo
Apply()
End If
End If
- ' Resetto tutti i delegate usati
- ExitToolAssociation.m_delIsModifiedSetUp = Nothing
+ ' Resetto tutti i delegate usati
+ ExitToolAssociation.m_delIsModifiedSetUp = Nothing
' Reset lua
EgtLuaResetGlobVar("STU")
diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj
index 2da8add..e089165 100644
--- a/EgtCAM5.vbproj
+++ b/EgtCAM5.vbproj
@@ -161,6 +161,12 @@
CurrSetUpV.xaml
+
+ EgtColorPickerV.xaml
+
+
+ EgtMessageBoxV.xaml
+ LeftTrayV.xaml
@@ -455,6 +461,14 @@
MSBuild:CompileDesigner
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+ DesignerMSBuild:Compile
@@ -1034,6 +1048,18 @@
+
+
+
+
+
+
+
+
+
+
+
+ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
diff --git a/EgtColorPicker/EgtColorPickerV.xaml b/EgtColorPicker/EgtColorPickerV.xaml
new file mode 100644
index 0000000..0ba6f8c
--- /dev/null
+++ b/EgtColorPicker/EgtColorPickerV.xaml
@@ -0,0 +1,266 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EgtColorPicker/EgtColorPickerV.xaml.vb b/EgtColorPicker/EgtColorPickerV.xaml.vb
new file mode 100644
index 0000000..5a2703b
--- /dev/null
+++ b/EgtColorPicker/EgtColorPickerV.xaml.vb
@@ -0,0 +1,68 @@
+Imports System.Windows.Forms
+Imports EgtWPFLib5
+
+Public Class EgtColorPickerV
+
+#Region "FIELDS & PROPERTIES"
+
+ Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
+
+ Private Shadows DialogResult As DialogResult
+
+ Public Property CustomColors As Integer()
+ Get
+ Return m_EgtColorPickerVM.GetCustomColors()
+ End Get
+ Set(value As Integer())
+ m_EgtColorPickerVM.SetCustomColors(value)
+ End Set
+ End Property
+
+ Public Property Color As System.Drawing.Color
+ Get
+ Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
+ End Get
+ Set(value As System.Drawing.Color)
+ m_EgtColorPickerVM.Red = value.R
+ m_EgtColorPickerVM.Green = value.G
+ m_EgtColorPickerVM.Blue = value.B
+ End Set
+ End Property
+
+#End Region ' Fields & Properties
+
+#Region "CONTRUCTORS"
+
+ Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
+ MyBase.New(Owner)
+ InitializeComponent()
+ Me.DataContext = EtgColorPickerVM
+ ' Assegno al riferimento locale al VM il VM preso dal DataContext
+ m_EgtColorPickerVM = EtgColorPickerVM
+ End Sub
+
+#End Region ' Constructors
+
+#Region "EVENTS"
+
+ Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
+ Me.DialogResult = DialogResult
+ Me.Close()
+ End Sub
+
+#End Region ' Events
+
+#Region "METHODS"
+
+ '''
+ ''' Apre una finestra EgtColorPicker
+ '''
+ '''
+ Public Overloads Function ShowDialog() As DialogResult
+ MyBase.ShowDialog()
+ Return Me.DialogResult
+ End Function
+
+#End Region ' Methods
+
+End Class
\ No newline at end of file
diff --git a/EgtMessageBox/EgtMessageBoxV.xaml b/EgtMessageBox/EgtMessageBoxV.xaml
new file mode 100644
index 0000000..268ec87
--- /dev/null
+++ b/EgtMessageBox/EgtMessageBoxV.xaml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EgtMessageBox/EgtMessageBoxV.xaml.vb b/EgtMessageBox/EgtMessageBoxV.xaml.vb
new file mode 100644
index 0000000..dea49a8
--- /dev/null
+++ b/EgtMessageBox/EgtMessageBoxV.xaml.vb
@@ -0,0 +1,109 @@
+Imports EgtWPFLib5
+
+Public Class EgtMessageBoxV
+
+#Region "FIELDS & PROPERTIES"
+
+ Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
+
+ Private Shadows DialogResult As MessageBoxResult
+
+#End Region ' FIELDS & PROPERTIES
+
+#Region "CONTRUCTORS"
+
+ Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
+ MyBase.New(Owner)
+ ' This call is required by the designer.
+ InitializeComponent()
+ Me.DataContext = EgtMessageBoxVM
+ ' Assegno al riferimento locale al VM il VM preso dal DataContext
+ m_EgtMessageBoxVM = EgtMessageBoxVM
+ End Sub
+
+#End Region
+
+#Region "METHODS"
+
+ '''
+ ''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
+ '''
+ ''' Finestra di appartenenza
+ ''' Stringa che specifica il messaggio da mostrare
+ ''' Valore che specifica quale bottone e' stato premuto dall'utente
+ Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
+ Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
+ NewMessagebox.ShowDialog()
+ Return NewMessagebox.DialogResult
+ End Function
+
+ '''
+ ''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
+ '''
+ ''' Finestra di appartenenza
+ ''' Stringa che specifica il messaggio da mostrare
+ ''' Stringa che specifica il titolo da mostrare
+ ''' Valore che specifica quale bottone e' stato premuto dall'utente
+ Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
+ Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
+ NewMessagebox.ShowDialog()
+ Return NewMessagebox.DialogResult
+ End Function
+
+ '''
+ ''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
+ '''
+ ''' Finestra di appartenenza
+ ''' Stringa che specifica il messaggio da mostrare
+ ''' Stringa che specifica il titolo da mostrare
+ ''' Valore che specifica quali bottoni mostrare
+ ''' Valore che specifica quale bottone e' stato premuto dall'utente
+ Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
+ Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
+ NewMessagebox.ShowDialog()
+ Return NewMessagebox.DialogResult
+ End Function
+
+ '''
+ ''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
+ '''
+ ''' Finestra di appartenenza
+ ''' Stringa che specifica il messaggio da mostrare
+ ''' Stringa che specifica il titolo da mostrare
+ ''' Valore che specifica quali bottoni mostrare
+ ''' Valore che specifica quale icona mostrare
+ ''' Valore che specifica quale bottone e' stato premuto dall'utente
+ Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
+ Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
+ NewMessagebox.ShowDialog()
+ Return NewMessagebox.DialogResult
+ End Function
+
+ '''
+ ''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
+ '''
+ ''' Finestra di appartenenza
+ ''' Stringa che specifica il messaggio da mostrare
+ ''' Stringa che specifica il titolo da mostrare
+ ''' Valore che specifica quali bottoni mostrare
+ ''' Valore che specifica quale icona mostrare
+ ''' Valore che specifica il bottone di default
+ ''' Valore che specifica quale bottone e' stato premuto dall'utente
+ Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
+ Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
+ NewMessagebox.ShowDialog()
+ Return NewMessagebox.DialogResult
+ End Function
+
+#End Region ' METHODS
+
+#Region "EVENTS"
+
+ Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
+ Me.DialogResult = DialogResult
+ Me.Close()
+ End Sub
+
+#End Region
+
+End Class
diff --git a/MachGroupPanel/MyMachGroupPanelVM.vb b/MachGroupPanel/MyMachGroupPanelVM.vb
index 7da36d0..e519452 100644
--- a/MachGroupPanel/MyMachGroupPanelVM.vb
+++ b/MachGroupPanel/MyMachGroupPanelVM.vb
@@ -68,7 +68,8 @@ Public Class MyMachGroupPanelVM
' se la lista gruppi è vuota creo un nuovo gruppo
If MachGroupList.Count = 0 Then
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
- If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
Else
Return -2
@@ -92,9 +93,10 @@ Public Class MyMachGroupPanelVM
' altrimenti creo il primo gruppo
Else
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
- If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
- Else
+ Else
Return -2
End If
End If
@@ -122,7 +124,8 @@ Public Class MyMachGroupPanelVM
EgtLuaSetGlobStringVar("DISP.PARTS", sParts)
If Not EgtLuaExecFile(sScriptPath) Then
EgtOutLog("Error executing disposition init script " & sScriptPath)
- MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
Dim nErr As Integer = 999
@@ -299,7 +302,8 @@ Public Class MyMachGroupPanelVM
If Not String.IsNullOrEmpty(sDefaultSetUpName) Then
If Not EgtImportSetup(String.Empty) Then
EgtOutLog("Error loading default setup " & sDefaultSetUpName)
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & sDefaultSetUpName, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & sDefaultSetUpName, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 9) & " " & sDefaultSetUpName, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If
End Sub
@@ -366,7 +370,8 @@ Public Class MyMachGroupPanelVM
Dim nSelectedMachGroupIndex As Integer = MachGroupList.IndexOf(SelectedMachGroup)
If nSelectedMachGroupIndex = 0 And MachGroupList.Count = 1 Then
' chiedo conferma prima di cancellare il gruppo di lavorazione
- Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
+ 'Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
+ Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
' cancello il gruppo corrente
EgtRemoveMachGroup(EgtGetMachGroupId(MachGroupList(nSelectedMachGroupIndex).Name))
@@ -379,7 +384,8 @@ Public Class MyMachGroupPanelVM
End Select
Else
' chiedo conferma prima di cancellare il gruppo di lavorazione
- Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
+ 'Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
+ Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Dim nNewInd As Integer = -1
If nSelectedMachGroupIndex = 0 And MachGroupList.Count > 1 Then
diff --git a/MachinePanel/MyMachinePanelVM.vb b/MachinePanel/MyMachinePanelVM.vb
index bedf083..e3b0730 100644
--- a/MachinePanel/MyMachinePanelVM.vb
+++ b/MachinePanel/MyMachinePanelVM.vb
@@ -208,7 +208,8 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtTdbReload() Then
EgtOutLog("Impossible reloading tool Db")
- MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
@@ -231,7 +232,8 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtTdbReload() Then
EgtOutLog("Impossible reloading tool Db")
- MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
@@ -256,7 +258,8 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtMdbReload() Then
EgtOutLog("Impossible reloading machining Db")
- MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
@@ -277,7 +280,8 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtMdbReload() Then
EgtOutLog("Impossible reloading machining Db")
- MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
@@ -302,7 +306,8 @@ Public Class MyMachinePanelVM
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
If Not File.Exists(IniFile.m_sCurrMachScriptsDirPath & "\" & SETUP_LUA) Then
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato,
@@ -321,7 +326,8 @@ Public Class MyMachinePanelVM
EgtLuaGetGlobIntVar("STU.ERR", nErr)
If nErr = 0 Then
If EgtGetHeadExitCount(sHead) = 0 Then
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
End If
diff --git a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml
index 38f4691..8a7bc32 100644
--- a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml
+++ b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml
@@ -17,7 +17,7 @@
+ Visibility="{Binding TextVisibility}" Margin="5,0,5,5" IsEnabled="True" Focusable="True">
diff --git a/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb b/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb
index 98c9be0..6166412 100644
--- a/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb
+++ b/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb
@@ -479,9 +479,8 @@ Public Class ManageLayerExpanderVM
' Se è un pezzo con lavorazioni, devo chiedere conferma della cancellazione
If EgtIsPart(RightClickedTreeItemId) And EgtExistsInfo(RightClickedTreeItemId, GDB_SI_LIST) Then
' Pezzo in lavorazione, vuoi cancellarlo lo stesso ? - Erase Confirm
- If MessageBox.Show(EgtMsg(MSG_DRAWOPTION + 17), EgtMsg(MSG_DRAWOPTION + 16), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
- Return
- End If
+ 'If MessageBox.Show(EgtMsg(MSG_DRAWOPTION + 17), EgtMsg(MSG_DRAWOPTION + 16), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then Return
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DRAWOPTION + 17), EgtMsg(MSG_DRAWOPTION + 16), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then Return
End If
' Recupero Id vicino per prossimo selezionato in albero
Dim nNewId As Integer = EgtGetNext(RightClickedTreeItemId)
diff --git a/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb b/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb
index 47e6726..3c8864b 100644
--- a/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb
+++ b/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb
@@ -54,7 +54,8 @@ Public Class EstimationsExpanderVM
' Verifico che il file esista
If Not File.Exists(sEstFile) Then
' File delle stime non trovato
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
' Visualizzazione
@@ -114,7 +115,8 @@ Public Class EstimationsExpanderVM
If bAskSave Then
If String.IsNullOrEmpty(sCurrFilePath) OrElse EgtGetModified() Then
' Il progetto deve essere salvato prima di poter essere generato. Vuoi farlo ?
- If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
+ 'If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
' Abbandono
bOk = False
Else
@@ -129,7 +131,8 @@ Public Class EstimationsExpanderVM
Else
If String.IsNullOrEmpty(sCurrFilePath) Then
' File delle stime non trovato
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
bOk = False
End If
End If
@@ -179,9 +182,11 @@ Public Class EstimationsExpanderVM
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
sErr = sErr.Replace("Cnc", "Est")
- MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
bOk = False
End If
diff --git a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb
index 803e83a..0f339ed 100644
--- a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb
@@ -85,7 +85,8 @@ Public Class MachiningTreeExpanderVM
' Se l'operazione non è andata a buon fine
If MachiningId = GDB_ID.NULL Then
' Inserimento lavorazione non riuscito ERRORE
- MessageBox.Show(EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Map.refOperationsListExpanderVM.CancelOperationCmd()
Return
End If
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb
index 7afb3b8..6ebb942 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb
@@ -136,7 +136,8 @@ Public Class FixtureParametersVM
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo
EgtRemoveFixture(nAddedFixtureId)
- MessageBox.Show("No free hook point!", "ERROR")
+ 'MessageBox.Show("No free hook point!", "ERROR")
+ EgtMessageBoxV.Show(Application.Current.MainWindow, "No free hook point!", "ERROR")
Return
End If
Else
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
index 2a3da48..eaffb93 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb
@@ -352,7 +352,8 @@ Public Class MachiningParameterExpanderVM
sErrorList += Environment.NewLine + " - " + m_CurrOperation.GetErrorString([property])
End If
Next [property]
- MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return
End If
@@ -431,10 +432,12 @@ Public Class MachiningParameterExpanderVM
Dim sInfo As String = String.Empty
EgtGetOutstrokeInfo(sInfo)
If Not String.IsNullOrEmpty(sInfo) Then sErr &= " " & sInfo
- MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
' Errore nel calcolo della lavorazione!
- MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else
If EgtGetMachMgrWarningId(0) <> 0 Then
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb
index 00ca556..87b3669 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb
@@ -199,7 +199,8 @@ Public Class MachiningOpListBoxItem
' verifico che il nome non inizi con disp
If m_ModifiedName.StartsWith("disp", StringComparison.InvariantCultureIgnoreCase) Then
m_CloseModifyLostFocus = False
- MessageBox.Show(EgtMsg(MSG_OPERATION + 21), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(EgtMsg(MSG_OPERATION + 21), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_OPERATION + 21), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
' Imposto il nuovo nome
@@ -207,7 +208,8 @@ Public Class MachiningOpListBoxItem
If Not EgtSetOperationName(Id, m_ModifiedName) Then
m_Spy = False
m_CloseModifyLostFocus = False
- MessageBox.Show(EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
m_IsActive_ModifyName = True
NotifyPropertyChanged(NameOf(ModifyName_Visibility))
m_Spy = True
diff --git a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml
index 54926bb..f8f283e 100644
--- a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml
+++ b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml
@@ -31,7 +31,7 @@
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
CommandParameter="{Binding Id}"/>
-
+
@@ -44,10 +44,9 @@
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
-
+
diff --git a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb
index 6e5ea06..7229cc9 100644
--- a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb
@@ -618,9 +618,11 @@ Public Class OperationsListExpanderVM
' In caso di errori, li segnalo
If Not bOk Then
If Not String.IsNullOrEmpty(sErr) Then
- MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_OPERATION + 11))
@@ -651,7 +653,8 @@ Public Class OperationsListExpanderVM
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
If Not File.Exists(IniFile.m_sCurrMachScriptsDirPath & "\" & SETUP_LUA) Then
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato,
@@ -670,7 +673,8 @@ Public Class OperationsListExpanderVM
EgtLuaGetGlobIntVar("STU.ERR", nErr)
If nErr = 0 Then
If EgtGetHeadExitCount(sHead) = 0 Then
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
End If
@@ -867,18 +871,25 @@ Public Class OperationsListExpanderVM
' verifico che il nome non sia già utilizzato
Private Function NameVerifyer(Name As String) As Boolean
If String.IsNullOrWhiteSpace(Name) Then
- MessageBox.Show(EgtMsg(MSG_EGTSAVEFILEDIALOG + 8),
- EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
- MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_EGTSAVEFILEDIALOG + 8),
+ ' EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
+ ' MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_EGTSAVEFILEDIALOG + 8),
+ EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
+ MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
Dim TempName As String = Name
EgtMdbGetMachiningNewName(TempName)
If String.Compare(TempName, Name, True) = 0 Then Return True
- MessageBox.Show(Name & " " &
- EgtMsg(MSG_EGTSAVEFILEDIALOG + 3),
- EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
- MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(Name & " " &
+ ' EgtMsg(MSG_EGTSAVEFILEDIALOG + 3),
+ ' EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
+ ' MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, Name & " " &
+ EgtMsg(MSG_EGTSAVEFILEDIALOG + 3),
+ EgtMsg(MSG_EGTSAVEFILEDIALOG + 7),
+ MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End Function
diff --git a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb
index 2350564..c64c7ef 100644
--- a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb
@@ -39,7 +39,7 @@ Public Class SimulationExpanderVM
End Get
Set(value As Boolean)
m_bOnlySimulation = value
- NotifyPropertyChanged("bOnlySimulation")
+ NotifyPropertyChanged(NameOf(bOnlySimulation))
End Set
End Property
@@ -102,12 +102,15 @@ Public Class SimulationExpanderVM
If Not EgtGenerate(sCncFile, sInfo) Then
Dim nErr = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
- MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
+ 'MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
- MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
- MessageBox.Show(EgtMsg(5306), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(5306), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5306), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
End If
bNcView = False
Else
@@ -165,9 +168,9 @@ Public Class SimulationExpanderVM
Map.refTopCommandBarVM.DrawIsEnabled = False
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
- Map.refEstimationsExpanderVM.Estimation_IsEnabled =False
+ Map.refEstimationsExpanderVM.Estimation_IsEnabled = False
Map.refMachGroupPanelVM.SetMachGroupState(False)
- Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
+ Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
End If
Return True
End Function
@@ -196,7 +199,7 @@ Public Class SimulationExpanderVM
Friend Function UpdateAllMachinings() As Boolean
' Se disabilitato, esco
- If GetPrivateProfileInt( S_MACH, K_AUTOUPDATEALLMACHININGS, 1) = 0 Then Return True
+ If GetPrivateProfileInt(S_MACH, K_AUTOUPDATEALLMACHININGS, 1) = 0 Then Return True
' Eseguo ricalcolo
Dim bModified As Boolean = EgtGetModified()
Dim sErr As String = String.Empty
@@ -204,9 +207,11 @@ Public Class SimulationExpanderVM
' In caso di errori, li segnalo
If Not bOk Then
If Not String.IsNullOrEmpty(sErr) Then
- MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If
If Not bModified Then EgtResetModified()
@@ -226,9 +231,11 @@ Public Class SimulationExpanderVM
If Not bOk Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
- MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
+ 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else
- MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
+ 'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If
End If
' Imposto stato corrente
@@ -268,9 +275,11 @@ Public Class SimulationExpanderVM
If Not EgtSimStart(False) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
- MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
+ 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else
- MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
+ 'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
End If
@@ -291,7 +300,7 @@ Public Class SimulationExpanderVM
SetShowPlay(True)
NotifyPropertyChanged(NameOf(PlayPauseImage))
End If
- ' Se movimento con collisione
+ ' Se movimento con collisione
ElseIf nMove = MCH_SIM.COLLISION Then
If m_bStopOnNextCollision Then
' Imposto stato Pausa
@@ -301,11 +310,12 @@ Public Class SimulationExpanderVM
SetShowPlay(True)
NotifyPropertyChanged(NameOf(PlayPauseImage))
' Messaggio
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 19), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 19), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
Else
m_bStopOnNextCollision = True
End If
- ' Altrimenti movimento non riuscito
+ ' Altrimenti movimento non riuscito
Else
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
' Aggiornamenti per bottone Play/Pause
@@ -321,15 +331,19 @@ Public Class SimulationExpanderVM
Case MCH_SIM.OUTSTROKE
Dim sInfo As String = String.Empty
EgtGetOutstrokeInfo(sInfo)
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 2) & " " & sInfo, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 2) & " " & sInfo, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 2) & " " & sInfo, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
Case MCH_SIM.DIR_ERR
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 3), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 3), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 3), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
Case Else
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
- MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
+ 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else
- MessageBox.Show(EgtMsg(MSG_SIMULATION + 4), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore - ERRORE
+ 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 4), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore - ERRORE
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 4), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore - ERRORE
End If
End Select
End If
@@ -366,7 +380,7 @@ Public Class SimulationExpanderVM
End If
Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
If IniFile.m_bSimulEndExitApp Then
- refMainWindowVM.CloseApplication( Nothing)
+ refMainWindowVM.CloseApplication(Nothing)
End If
End Sub
@@ -399,7 +413,8 @@ Public Class SimulationExpanderVM
If bAskSave Then
If String.IsNullOrEmpty(sCurrFilePath) OrElse EgtGetModified() Then
' Il progetto deve essere salvato prima di poter essere generato. Vuoi farlo ?
- If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
+ 'If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
' Abbandono
Return False
Else
@@ -413,11 +428,11 @@ Public Class SimulationExpanderVM
End If
End If
sCncFile = ""
- #If PLATFORM = "x64" Then
+#If PLATFORM = "x64" Then
sInfo = "EgtCAM5 64bit ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
- #Else
- sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
- #End If
+#Else
+ sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
+#End If
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & sCncFile
Else
@@ -435,7 +450,7 @@ Public Class SimulationExpanderVM
Return True
End Function
- Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
+ Friend Sub SimulationExpander_Update_CncData(nFlag As Integer)
If Simulation_IsExpanded Then
ShowCncData()
' Se fermo per Collisione rilevata da script Lua
diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb
index f29421e..969abe5 100644
--- a/OptionsWindow/OptionModule.vb
+++ b/OptionsWindow/OptionModule.vb
@@ -80,7 +80,8 @@ Friend Module OptionModule
End While
If nIndex = 1 Then
EgtOutLog("Error missing languages section in Config.ini")
- MessageBox.Show("Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show("Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, "Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
End
End If
' Inizializzo la lingua corrente
diff --git a/OptionsWindow/OptionWindowVM.vb b/OptionsWindow/OptionWindowVM.vb
index 92ea71f..6ec7b6b 100644
--- a/OptionsWindow/OptionWindowVM.vb
+++ b/OptionsWindow/OptionWindowVM.vb
@@ -2,6 +2,7 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
+Imports EgtWPFLib5
Public Class OptionWindowVM
Inherits VMBase
@@ -257,8 +258,8 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bThickLine = value
- WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If( value, "2", "1"))
- EgtSetLineAttribs( If( value, 2, 1))
+ WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
+ EgtSetLineAttribs(If(value, 2, 1))
End Set
End Property
@@ -578,7 +579,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bSpecialOn = value
- WritePrivateProfileString(S_SPECIAL, K_SPECIALENABLE, If( value, "1", "0"))
+ WritePrivateProfileString(S_SPECIAL, K_SPECIALENABLE, If(value, "1", "0"))
End Set
End Property
@@ -598,7 +599,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bBeamOn = value
- WritePrivateProfileString(S_BEAM, K_BEAMENABLE, If( value, "1", "0"))
+ WritePrivateProfileString(S_BEAM, K_BEAMENABLE, If(value, "1", "0"))
End Set
End Property
@@ -618,7 +619,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bWallOn = value
- WritePrivateProfileString(S_WALL, K_WALLENABLE, If( value, "1", "0"))
+ WritePrivateProfileString(S_WALL, K_WALLENABLE, If(value, "1", "0"))
End Set
End Property
@@ -633,7 +634,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bDoorsOn = value
- WritePrivateProfileString(S_DOORS, K_DDFENABLE, If( value, "1", "0"))
+ WritePrivateProfileString(S_DOORS, K_DDFENABLE, If(value, "1", "0"))
End Set
End Property
@@ -648,7 +649,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bGunstockOn = value
- WritePrivateProfileString(S_GUNSTOCK, K_GUNSTOCKENABLE, If( value, "1", "0"))
+ WritePrivateProfileString(S_GUNSTOCK, K_GUNSTOCKENABLE, If(value, "1", "0"))
End Set
End Property
@@ -706,17 +707,17 @@ Public Class OptionWindowVM
End Property
Public ReadOnly Property ThickLineMsg As String
Get
- Return EgtMsg( 6536) ' Linee spesse
+ Return EgtMsg(6536) ' Linee spesse
End Get
End Property
Public ReadOnly Property SmoothTriMeshMsg As String
Get
- Return EgtMsg( 6518) ' Superfici smussate
+ Return EgtMsg(6518) ' Superfici smussate
End Get
End Property
Public ReadOnly Property UpdateLicenceMsg As String
Get
- Return EgtMsg( 6553) ' Aggiorna licenza
+ Return EgtMsg(6553) ' Aggiorna licenza
End Get
End Property
@@ -1168,143 +1169,146 @@ Public Class OptionWindowVM
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
- If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CreateDirectory( sTempDir)
+ My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sMachZip)
- zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
+ zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Se non è una macchina segnalo il problema ed esco
- If Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".ini")) Or
- Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".mlde")) Then
+ If Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".ini")) Or
+ Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
' Il file {0} non contiene una macchina - Avviso
Dim sOut As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 29), sMachZip)
- MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Imposto data e ora correnti al file mlde della macchina
Try
- File.SetLastWriteTime( Path.Combine( sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
+ File.SetLastWriteTime(Path.Combine(sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
Catch ex As Exception
End Try
' Verifico esistenza di una macchina con lo stesso nome
- Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
+ Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists(sMachDir)
Dim bUpdate As Boolean = True
If bOldExists Then
- Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName)
- Select MachBox.ShowDialog()
- Case MessageBoxResult.Yes
- bUpdate = False
- Case MessageBoxResult.No
- bUpdate = True
- Case MessageBoxResult.Cancel
- ' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
- Return
+ Dim MachBox As New MachineBox(Application.Current.MainWindow, sMachName)
+ Select Case MachBox.ShowDialog()
+ Case MessageBoxResult.Yes
+ bUpdate = False
+ Case MessageBoxResult.No
+ bUpdate = True
+ Case MessageBoxResult.Cancel
+ ' Rimuovo il direttorio temporaneo ed esco
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ Return
End Select
' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old"
- If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
- My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
+ My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
- My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True)
+ My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
- My.Computer.FileSystem.MoveDirectory( sBackupDir, sMachDir, True)
+ My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
' L'aggiornamento della macchina "{0}" non è riuscito.
Dim sKo As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 35), sMachName)
- EgtOutLog( sKo)
- MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
+ EgtOutLog(sKo)
+ 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
Return
End Try
End If
' Installo la macchina
- My.Computer.FileSystem.MoveDirectory( Path.Combine( sTempDir, sMachName), sMachDir, True)
+ My.Computer.FileSystem.MoveDirectory(Path.Combine(sTempDir, sMachName), sMachDir, True)
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
If bOldExists And bUpdate Then
Dim sBackupDir As String = sMachDir & ".old"
- If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Tools") Then
- If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Tools") Then
- My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Tools") Then
+ If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Tools") Then
+ My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Tools", sMachDir & "\Tools", True)
+ My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Tools", sMachDir & "\Tools", True)
End If
- If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Machinings") Then
- If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Machinings") Then
- My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Machinings", FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Machinings") Then
+ If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Machinings") Then
+ My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Machinings", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Machinings", sMachDir & "\Machinings", True)
+ My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Machinings", sMachDir & "\Machinings", True)
End If
- If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\SetUp") Then
- If My.Computer.FileSystem.DirectoryExists( sMachDir & "\SetUp") Then
- My.Computer.FileSystem.DeleteDirectory( sMachDir & "\SetUp", FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\SetUp") Then
+ If My.Computer.FileSystem.DirectoryExists(sMachDir & "\SetUp") Then
+ My.Computer.FileSystem.DeleteDirectory(sMachDir & "\SetUp", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CopyDirectory( sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
+ My.Computer.FileSystem.CopyDirectory(sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
End If
- If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Beam") Then
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Beam") Then
' Flag per sovrascrivere vecchio file BeamData.lua con nuovo
Dim bBeamDataExists As Boolean = False
Const sBeamData As String = "\BeamData.lua"
' Flag per sovrascrivere vecchio file MachiningTypes.ini
Dim bMchgTypesExists As Boolean = False
Const sMchgTypes As String = "\MachiningTypes.ini"
- If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Beam") Then
- If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sBeamData) Then
+ If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Beam") Then
+ If My.Computer.FileSystem.FileExists(sMachDir & "\Beam" & sBeamData) Then
bBeamDataExists = True
- My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
+ My.Computer.FileSystem.MoveFile(sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
End If
- If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sMchgTypes) Then
+ If My.Computer.FileSystem.FileExists(sMachDir & "\Beam" & sMchgTypes) Then
bMchgTypesExists = True
- My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
+ My.Computer.FileSystem.MoveFile(sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
End If
- My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Beam", sMachDir & "\Beam", True)
- If bBeamDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
- If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
+ My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Beam", sMachDir & "\Beam", True)
+ If bBeamDataExists Then My.Computer.FileSystem.MoveFile(sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
+ If bMchgTypesExists Then My.Computer.FileSystem.MoveFile(sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
End If
- If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Wall") Then
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Wall") Then
' Flag per sovrascrittura vecchio file WallData.lua con nuovo
Dim bWallDataExists As Boolean = False
Const sWallData As String = "\WallData.lua"
' Flag per sovrascrivere vecchio file MachiningTypes.ini
Dim bMchgTypesExists As Boolean = False
Const sMchgTypes As String = "\MachiningTypes.ini"
- If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Wall") Then
- If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sWallData) Then
+ If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Wall") Then
+ If My.Computer.FileSystem.FileExists(sMachDir & "\Wall" & sWallData) Then
bWallDataExists = True
- My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
+ My.Computer.FileSystem.MoveFile(sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
End If
- If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sMchgTypes) Then
+ If My.Computer.FileSystem.FileExists(sMachDir & "\Wall" & sMchgTypes) Then
bMchgTypesExists = True
- My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
+ My.Computer.FileSystem.MoveFile(sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
End If
- My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Wall", sMachDir & "\Wall", True)
- If bWallDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
- If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
+ My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Wall", sMachDir & "\Wall", True)
+ If bWallDataExists Then My.Computer.FileSystem.MoveFile(sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
+ If bMchgTypesExists Then My.Computer.FileSystem.MoveFile(sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
End If
End If
'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 30), sMachName)
- EgtOutLog( sOk)
- MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
+ EgtOutLog(sOk)
+ 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
' Rimuovo il direttorio temporaneo
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Aggiorno la lista delle macchina
Map.refMachinePanelVM.InsertMachine(sMachDir)
End Sub
+
+
#End Region ' AddMachine
-
#Region "ExportMachine"
-
'''
''' Returns a command that export a new machining.
'''
@@ -1344,7 +1348,7 @@ Public Class OptionWindowVM
' aggiungo i file della Macchina
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then
- zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
+ zip.AddSelectedFiles("name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
End If
' salvo lo zip
zip.Save()
@@ -1354,13 +1358,15 @@ Public Class OptionWindowVM
' L'esportazione della macchina "{0}" non è riuscita.
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
EgtOutLog(sKo)
- MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
- return
+ 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
+ Return
End Try
'La macchina "{0}" è stata esportata con successo.
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
EgtOutLog(sOk)
- MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
+ 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
End Sub
#End Region ' ExportMachine
@@ -1380,11 +1386,12 @@ Public Class OptionWindowVM
Dim sExeVer As String = IniFile.GetProgramVersion()
' Verifico presenza di una precedente installazione del Beam
Dim sBeamVer As String = ""
- IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sBeamVer)
- If String.IsNullOrEmpty( sBeamVer) Then
+ IniFile.GetSpecialLuaVersion(IniFile.m_sBeamDirPath, sBeamVer)
+ If String.IsNullOrEmpty(sBeamVer) Then
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
- Dim sOut As String = String.Format(EgtMsg(6555), "Beam")
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ Dim sOut As String = String.Format(EgtMsg(6555), "Beam")
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Esco
Return
End If
@@ -1392,78 +1399,83 @@ Public Class OptionWindowVM
Dim BeamDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".zip",
.Filter = "Beam (.zip)|*.zip",
- .CheckFileExists = True,
- .ValidateNames = True
- }
+.CheckFileExists = True,
+.ValidateNames = True
+}
If BeamDlg.ShowDialog() <> True Then Return
Dim sBeamZip As String = BeamDlg.FileName
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Beam")
- If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CreateDirectory( sTempDir)
+ My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sBeamZip)
- zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
+ zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Recupero i dati del nuovo Beam
Dim sNewName = ""
Dim sNewVer = ""
Dim sNewMinExe = ""
- IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
+ IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
' Verifico che sia veramente il Beam
If String.Compare(sNewName, "Beam") <> 0 Then
' Il file zip non contiene il modulo "{0}". - Avviso
- Dim sOut As String = String.Format(EgtMsg(6556), "Beam")
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ Dim sOut As String = String.Format(EgtMsg(6556), "Beam")
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione minima del programma
If String.Compare(sExeVer, sNewMinExe) < 0 Then
' Il nuovo modulo "{0}" richiede un programma con versione minima {1}. - Avviso
Dim sOut As String = String.Format(EgtMsg(6557), "Beam", sNewMinExe)
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione del Beam e se più vecchia chiedo cosa fare
If String.Compare(sNewVer, sBeamVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "Beam")
- if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
+ 'If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
End If
' Faccio una copia di backup del Beam corrente
Dim sBackupDir As String = IniFile.m_sBeamDirPath & ".old"
- If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
- My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
+ My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
- My.Computer.FileSystem.MoveDirectory( IniFile.m_sBeamDirPath, sBackupDir, True)
+ My.Computer.FileSystem.MoveDirectory(IniFile.m_sBeamDirPath, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
- My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sBeamDirPath, True)
+ My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sBeamDirPath, True)
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
Dim sOut As String = String.Format(EgtMsg(6559), "Beam")
- EgtOutLog( sOut)
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtOutLog(sOut)
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Try
' Installo il Beam
- My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sBeamDirPath, True)
+ My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sBeamDirPath, True)
' Il modulo "{0}" è stata aggiornato con successo. - Info
Dim sOk As String = String.Format(EgtMsg(6560), "Beam")
- EgtOutLog( sOk)
- MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
+ EgtOutLog(sOk)
+ 'MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
End Sub
#End Region ' UpdateBeam
@@ -1478,17 +1490,17 @@ Public Class OptionWindowVM
Return m_cmdUpdateWallCmd
End Get
End Property
-
Public Sub UpdateWallCmd()
' Recupero la versione del programma in esecuzione
Dim sExeVer As String = IniFile.GetProgramVersion()
' Verifico presenza di una precedente installazione del Wall
Dim sWallVer As String = ""
- IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sWallVer)
- If String.IsNullOrEmpty( sWallVer) Then
+ IniFile.GetSpecialLuaVersion(IniFile.m_sWallDirPath, sWallVer)
+ If String.IsNullOrEmpty(sWallVer) Then
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
- Dim sOut As String = String.Format(EgtMsg(6555), "Wall")
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ Dim sOut As String = String.Format(EgtMsg(6555), "Wall")
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Esco
Return
End If
@@ -1503,77 +1515,82 @@ Public Class OptionWindowVM
Dim sWallZip As String = WallDlg.FileName
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Wall")
- If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
- My.Computer.FileSystem.CreateDirectory( sTempDir)
+ My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sWallZip)
- zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
+ zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Recupero i dati del nuovo Wall
Dim sNewName = ""
Dim sNewVer = ""
Dim sNewMinExe = ""
- IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
+ IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
' Verifico che sia veramente il Wall
If String.Compare(sNewName, "Wall") <> 0 Then
' Il file zip non contiene il modulo "{0}". - Avviso
- Dim sOut As String = String.Format(EgtMsg(6556), "Wall")
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ Dim sOut As String = String.Format(EgtMsg(6556), "Wall")
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione minima del programma
If String.Compare(sExeVer, sNewMinExe) < 0 Then
' Il nuovo modulo "{0}" richiede un programma con versione minima {1}. - Avviso
Dim sOut As String = String.Format(EgtMsg(6557), "Wall", sNewMinExe)
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione del Wall e se più vecchia chiedo cosa fare
If String.Compare(sNewVer, sWallVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "Wall")
- if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
+ 'If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
End If
' Faccio una copia di backup del Wall corrente
Dim sBackupDir As String = IniFile.m_sWallDirPath & ".old"
- If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
- My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
+ My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
- My.Computer.FileSystem.MoveDirectory( IniFile.m_sWallDirPath, sBackupDir, True)
+ My.Computer.FileSystem.MoveDirectory(IniFile.m_sWallDirPath, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
- My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sWallDirPath, True)
+ My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sWallDirPath, True)
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
Dim sOut As String = String.Format(EgtMsg(6559), "Wall")
- EgtOutLog( sOut)
- MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtOutLog(sOut)
+ 'MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Try
' Installo il Wall
- My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sWallDirPath, True)
+ My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sWallDirPath, True)
' Il modulo "{0}" è stata aggiornato con successo. - Info
Dim sOk As String = String.Format(EgtMsg(6560), "Wall")
- EgtOutLog( sOk)
- MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
+ EgtOutLog(sOk)
+ 'MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
End Sub
+
+
#End Region ' UpdateWall
-
#Region "CloseOptionsCommand"
-
'''
''' Returns a command that remove the current selected machining.
'''
@@ -1616,10 +1633,14 @@ Public Class OptionWindowVM
End If
Next
' Creo dialogo colori
- Dim ColorDlg As New System.Windows.Forms.ColorDialog
- ColorDlg.FullOpen = True
- ColorDlg.CustomColors = nCustomColors.ToArray()
- ColorDlg.Color = Col.ToColor()
+ 'Dim ColorDlg As New System.Windows.Forms.ColorDialog
+ 'ColorDlg.FullOpen = True
+ 'ColorDlg.CustomColors = nCustomColors.ToArray()
+ 'ColorDlg.Color = Col.ToColor()
+ Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
+ .CustomColors = nCustomColors.ToArray(),
+ .Color = Col.ToColor()
+ }
' Visualizzo dialogo
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
' Recupero colore scelto
diff --git a/Project/ProjectVM.vb b/Project/ProjectVM.vb
index bb222db..4a6c6e0 100644
--- a/Project/ProjectVM.vb
+++ b/Project/ProjectVM.vb
@@ -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)
diff --git a/Resources/EgtMessageBox/Error.png b/Resources/EgtMessageBox/Error.png
new file mode 100644
index 0000000..4f6d82f
Binary files /dev/null and b/Resources/EgtMessageBox/Error.png differ
diff --git a/Resources/EgtMessageBox/Information.png b/Resources/EgtMessageBox/Information.png
new file mode 100644
index 0000000..755d51b
Binary files /dev/null and b/Resources/EgtMessageBox/Information.png differ
diff --git a/Resources/EgtMessageBox/Question.png b/Resources/EgtMessageBox/Question.png
new file mode 100644
index 0000000..84ced4a
Binary files /dev/null and b/Resources/EgtMessageBox/Question.png differ
diff --git a/Resources/EgtMessageBox/Warning.png b/Resources/EgtMessageBox/Warning.png
new file mode 100644
index 0000000..1e72f68
Binary files /dev/null and b/Resources/EgtMessageBox/Warning.png differ
diff --git a/SetUp/SetUpVM.vb b/SetUp/SetUpVM.vb
index c37a141..a154397 100644
--- a/SetUp/SetUpVM.vb
+++ b/SetUp/SetUpVM.vb
@@ -444,10 +444,12 @@ Public Class SetUpVM
If String.IsNullOrWhiteSpace(sSearchedTool) Then sSearchedTool = sToolNameList(ToolIndex)
If Not String.IsNullOrWhiteSpace(sSearchedTool) Then
' Impossibile trovare l'utensile xxx nel DB utensili
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 3) & " " & sSearchedTool & " " & EgtMsg(MSG_SETUPERRORS + 4), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 3) & " " & sSearchedTool & " " & EgtMsg(MSG_SETUPERRORS + 4), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 3) & " " & sSearchedTool & " " & EgtMsg(MSG_SETUPERRORS + 4), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Error)
Else
' Impossibile trovare l'utensile nel DB utensili
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 3) & " " & EgtMsg(MSG_SETUPERRORS + 4), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 3) & " " & EgtMsg(MSG_SETUPERRORS + 4), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 3) & " " & EgtMsg(MSG_SETUPERRORS + 4), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If
End If
@@ -563,7 +565,8 @@ Public Class SetUpVM
For ErrorIndex = 0 To ErrorList.Count - 1
sError &= "- " & ErrorList(ErrorIndex) & Environment.NewLine
Next
- MessageBox.Show(sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
End If
End If
End Sub
@@ -610,7 +613,8 @@ Public Class SetUpVM
' se la posizione non è valida, restituisco errore
If sHead = INVALIDPOS Then
EgtOutLog("SetUp warning: try to set " & SelTool.Name & " on " & Position.TcPos)
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 5), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 5), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 5), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
' altrimenti, se la posizione nell'attrezzaggio è vuota
ElseIf Not PosIsOccupied Then
@@ -637,13 +641,11 @@ Public Class SetUpVM
' altrimenti restituisco falso
Else
ErrorList.Add(SelTool.Name)
- 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & SelTool.Name & " " & EgtMsg(MSG_SETUPERRORS + 6), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return False
End If
' altrimenti restituisco falso
Else
ErrorList.Add(SelTool.Name)
- 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & SelTool.Name & " " & EgtMsg(MSG_SETUPERRORS + 6), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return False
End If
Return True
@@ -790,7 +792,8 @@ Public Class SetUpVM
For ErrorIndex = 0 To ErrorList.Count - 1
sError &= "- " & ErrorList(ErrorIndex) & Environment.NewLine
Next
- MessageBox.Show(sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show(sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
End If
' abilito e disabilito tutte le uscite in base all'utensile selezionato
diff --git a/SetUpDb/SetUpDbVM.vb b/SetUpDb/SetUpDbVM.vb
index 9e6643d..dd9fa9a 100644
--- a/SetUpDb/SetUpDbVM.vb
+++ b/SetUpDb/SetUpDbVM.vb
@@ -27,7 +27,8 @@ Public Class SetUpDbVM
Set(value As String)
' se setup modificato, chiedo se salvare
If m_SetUpVM.IsModifiedSetUp OrElse m_IsNew Then
- Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
+ 'Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
+ Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Save()
Case MessageBoxResult.No
@@ -127,7 +128,8 @@ Public Class SetUpDbVM
Public Sub Save()
If Not m_SetUpVM.Save(m_SetUpDir_FilePath & "\" & m_SelSetUp & SETUP_FILEEXTENSION) Then
EgtOutLog("Error in setup saving: can't find the directory")
- MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Else
m_IsNew = False
m_SetUpVM.ResetModifiedSetUp()
@@ -156,7 +158,8 @@ Public Class SetUpDbVM
Public Sub AddSetup()
' se setup modificato, chiedo se salvare
If m_SetUpVM.IsModifiedSetUp OrElse m_IsNew Then
- Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
+ 'Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
+ Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Save()
Case MessageBoxResult.No
@@ -208,7 +211,8 @@ Public Class SetUpDbVM
'''
Public Sub RemoveSetup()
' chiedo conferma
- If MessageBox.Show("Are you sure you want to delete this setup?", "Setup", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then Return
+ 'If MessageBox.Show("Are you sure you want to delete this setup?", "Setup", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then Return
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete this setup?", "Setup", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then Return
' recupero indice setup corrente
Dim DeletedIndex As Integer = m_SetUpList.IndexOf(m_SelSetUp)
' elimino il file
@@ -218,7 +222,8 @@ Public Class SetUpDbVM
File.Delete(DeleteFilePath)
Catch ex As Exception
EgtOutLog("Error in deleting setup file: " & ex.ToString)
- MessageBox.Show("Impossible deleting the setup file.", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ 'MessageBox.Show("Impossible deleting the setup file.", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible deleting the setup file.", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return
End Try
End If
@@ -254,7 +259,8 @@ Public Class SetUpDbVM
Public Sub Close()
' se setup modificato, chiedo se salvare
If m_SetUpVM.IsModifiedSetUp OrElse m_IsNew Then
- Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
+ 'Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
+ Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Save()
Case MessageBoxResult.No
diff --git a/Special-BeamWall/Beam.vb b/Special-BeamWall/Beam.vb
index a628170..713b758 100644
--- a/Special-BeamWall/Beam.vb
+++ b/Special-BeamWall/Beam.vb
@@ -84,7 +84,8 @@ Module Beam
BeamMchsWinV.ShowDialog()
Else
' Impossibile aprire l'Editor delle lavorazioni delle travi. Mancano i file di configurazione. - Errore
- MessageBox.Show(EgtMsg(9009), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
+ 'MessageBox.Show(EgtMsg(9009), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(9009), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
End If
Return True
End Function
diff --git a/Special-BeamWall/Wall.vb b/Special-BeamWall/Wall.vb
index b6b0c49..afcd4fb 100644
--- a/Special-BeamWall/Wall.vb
+++ b/Special-BeamWall/Wall.vb
@@ -85,7 +85,8 @@ Module Wall
WallMchsWinV.ShowDialog()
Else
' Impossibile aprire l'Editor delle lavorazioni delle pareti. Mancano i file di configurazione. - Errore
- MessageBox.Show(EgtMsg(9011), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
+ 'MessageBox.Show(EgtMsg(9011), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(9011), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
End If
Return True
End Function
diff --git a/Special-Doors/DoorPanelVM.vb b/Special-Doors/DoorPanelVM.vb
index 417aad5..1333bde 100644
--- a/Special-Doors/DoorPanelVM.vb
+++ b/Special-Doors/DoorPanelVM.vb
@@ -150,21 +150,24 @@ Public Class DoorPanelVM
Dim sTablesDir As String = String.Empty
If GetPrivateProfileString(S_DOORS, K_TABLESDIR, "", sTablesDir) = 0 Then
' Se non lo trovo mando messaggio di errore e chiudo la finestra
- MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 4), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 4), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 4), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
IniFile.m_sTablesRoot = IniFile.m_sDoorsDirPath & "\" & sTablesDir
' Verifico che la cartella indicata esista
If Not My.Computer.FileSystem.DirectoryExists(IniFile.m_sTablesRoot) Then
' Se non la trovo mando messaggio di errore e chiudo la finestra
- MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 5), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 5), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 5), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' Verifico che ci sia il file ini per scrivere le tabelle
If Not My.Computer.FileSystem.FileExists(IniFile.m_sTablesRoot & "\" & MTABLETEMPLATE_FILE) OrElse Not My.Computer.FileSystem.FileExists(IniFile.m_sTablesRoot & "\" & GEONAMELIST_FILE) _
OrElse Not My.Computer.FileSystem.FileExists(IniFile.m_sTablesRoot & "\" & OPERATIONLIST_FILE) Then
' Se non la trovo mando messaggio di errore e chiudo la finestra
- MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 6), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 6), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 6), EgtMsg(MSG_DOORSERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' verifico
@@ -172,13 +175,6 @@ Public Class DoorPanelVM
Dim MTableDb As New MTableDbV(Application.Current.MainWindow, New MTableDbVM)
MTableDb.ShowDialog()
-
- 'Dim MTableDbWindow As New MTableDbView
- 'MTableDbWindow.Height = 614
- 'MTableDbWindow.Width = 1024
- 'MTableDbWindow.DataContext = New MTableDbViewModel
- 'MTableDbWindow.Owner = Application.Current.MainWindow
- 'MTableDbWindow.ShowDialog()
End Sub
#End Region ' MTableDbCommand
diff --git a/Special-Doors/Doors.vb b/Special-Doors/Doors.vb
index 7fbf545..584f5aa 100644
--- a/Special-Doors/Doors.vb
+++ b/Special-Doors/Doors.vb
@@ -83,7 +83,8 @@ Public Module Doors
If Not bNcGen And Not bBatch And nProbing = 0 Then
' Segnalazione eventuali Warnings/Errors
If nErr = 999 Then
- MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 17), EgtMsg(MSG_DOORSERRORS + 1).ToUpper)
+ 'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 17), EgtMsg(MSG_DOORSERRORS + 1).ToUpper)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 17), EgtMsg(MSG_DOORSERRORS + 1).ToUpper)
ElseIf nErr <> 0 Then
Try
Dim sErrFilePath As String = Path.ChangeExtension(sDdfFile, ".txt")
@@ -93,12 +94,15 @@ Public Module Doors
If Not String.IsNullOrWhiteSpace(Lines(Index)) Then sErrMsg &= Lines(Index) & vbCrLf
Next
If nErr > 0 Then
- MessageBox.Show(sErrMsg, EgtMsg(MSG_DOORSERRORS + 1).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(sErrMsg, EgtMsg(MSG_DOORSERRORS + 1).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErrMsg, EgtMsg(MSG_DOORSERRORS + 1).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
Else
- MessageBox.Show(sErrMsg, EgtMsg(MSG_DOORSERRORS + 3).ToUpper, MessageBoxButton.OK, MessageBoxImage.Warning)
+ 'MessageBox.Show(sErrMsg, EgtMsg(MSG_DOORSERRORS + 3).ToUpper, MessageBoxButton.OK, MessageBoxImage.Warning)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sErrMsg, EgtMsg(MSG_DOORSERRORS + 3).ToUpper, MessageBoxButton.OK, MessageBoxImage.Warning)
End If
Catch ex As Exception
- MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7), EgtMsg(MSG_DOORSERRORS + 1).ToUpper)
+ 'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7), EgtMsg(MSG_DOORSERRORS + 1).ToUpper)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 7), EgtMsg(MSG_DOORSERRORS + 1).ToUpper)
End Try
End If
End If
diff --git a/Special-Doors/MTableDbVM.vb b/Special-Doors/MTableDbVM.vb
index 2e71f54..17a5e89 100644
--- a/Special-Doors/MTableDbVM.vb
+++ b/Special-Doors/MTableDbVM.vb
@@ -404,9 +404,9 @@ Public Class MTableDbVM
If EgtVerifyMachinesDir() AndAlso Not bActiveMTableFound AndAlso m_TablesList.Count > 0 Then
m_TablesList(0).IsSelected = True
If Not m_TablesList(0).IsSelected Then
- m_TablesList.RemoveAt( 0)
- return
- End If
+ m_TablesList.RemoveAt(0)
+ Return
+ End If
m_TablesList(0).SelMachine = m_TablesList(0).ActiveMachinesList(0)
End If
End Sub
@@ -921,11 +921,13 @@ Public Class MTableDbVM
End While
' verifico se la tabella selezionata è quella attiva
If SelectedMTable.ActiveTable Then
- MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 8) & vbCrLf & EgtMsg(MSG_DOORSERRORS + 9), "", MessageBoxButton.OK, MessageBoxImage.Stop)
+ 'MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 8) & vbCrLf & EgtMsg(MSG_DOORSERRORS + 9), "", MessageBoxButton.OK, MessageBoxImage.Stop)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 8) & vbCrLf & EgtMsg(MSG_DOORSERRORS + 9), "", MessageBoxButton.OK, MessageBoxImage.Stop)
Exit Sub
End If
' chiedo conferma prima di cancellare la tabella
- If MessageBox.Show(EgtMsg(MSG_DOORS + 6), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(MSG_DOORS + 6), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORS + 6), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If Not String.IsNullOrEmpty(SelectedMTable.TableNamePath) Then
File.Delete(SelectedMTable.TableNamePath)
End If
@@ -1188,9 +1190,8 @@ Public Class MTableDbVM
Dim SelectedMTable As MTableListBoxItem = DirectCast(param, MTableListBoxItem)
If Not IsNothing(SelectedMTable) AndAlso SelectedMTable.ActiveMachinesList.Count > 1 Then
' Chiedo conferma cancellazione associazione macchina
- If MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 12), EgtMsg(MSG_DOORSERRORS + 11), MessageBoxButton.YesNo, MessageBoxImage.Question) <> MessageBoxResult.Yes Then
- Return
- End If
+ 'If MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 12), EgtMsg(MSG_DOORSERRORS + 11), MessageBoxButton.YesNo, MessageBoxImage.Question) <> MessageBoxResult.Yes Then Return
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 12), EgtMsg(MSG_DOORSERRORS + 11), MessageBoxButton.YesNo, MessageBoxImage.Question) <> MessageBoxResult.Yes Then Return
SelectedMTable.ActiveMachinesList.RemoveAt(SelectedMTable.SharedMachIndex - 1)
SelectedMTable.MachIdList.RemoveAt(SelectedMTable.SharedMachIndex - 1)
SelectedMTable.SharedMachIndex -= 1
@@ -1251,9 +1252,8 @@ Public Class MTableDbVM
If Not IsNothing(SelectedMTable) AndAlso SelectedMTable.AssociationList.Count > 1 Then
If IsNothing(SelectedMTable.SelectedAssociation) Then Return
' Chiedo conferma cancellazione riga di associazione
- If MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 10), EgtMsg(MSG_DOORSERRORS + 11), MessageBoxButton.YesNo, MessageBoxImage.Question) <> MessageBoxResult.Yes Then
- Return
- End If
+ 'If MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 10), EgtMsg(MSG_DOORSERRORS + 11), MessageBoxButton.YesNo, MessageBoxImage.Question) <> MessageBoxResult.Yes Then Return
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORSERRORS + 10), EgtMsg(MSG_DOORSERRORS + 11), MessageBoxButton.YesNo, MessageBoxImage.Question) <> MessageBoxResult.Yes Then Return
Dim SelectedIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociation)
' rimuovo Item associati dalla lisa lavorazioni ordinata
RemoveMachItem(SelectedIndex, SelectedMTable, SelectedMTable.AssociationList(SelectedIndex).RefMachItem)
@@ -1754,7 +1754,8 @@ Public Class MTableDbVM
Dim SelectedMTable As MTableListBoxItem = DirectCast(param, MTableListBoxItem)
If Not IsNothing(SelectedMTable) AndAlso (SelectedMTable.IsModified() OrElse String.IsNullOrEmpty(SelectedMTable.m_TableNamePath)) Then
' chiedo se salvare la tabella corrente prima di passare alla successiva
- If MessageBox.Show(EgtMsg(MSG_DOORS + 7), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(MSG_DOORS + 7), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORS + 7), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
SaveTable(SelectedMTable)
End If
End If
diff --git a/Special-Doors/MTableListBox.vb b/Special-Doors/MTableListBox.vb
index 3d675ff..4d734f8 100644
--- a/Special-Doors/MTableListBox.vb
+++ b/Special-Doors/MTableListBox.vb
@@ -56,7 +56,8 @@ Public Class MTableListBoxItem
m_delSearchInMTable(Me)
ElseIf IsModified() OrElse String.IsNullOrEmpty(m_TableNamePath) Then
' chiedo se salvare la tabella corrente prima di passare alla successiva
- If MessageBox.Show(EgtMsg(MSG_DOORS + 7), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(MSG_DOORS + 7), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DOORS + 7), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
m_delSaveMTable(Me)
ElseIf String.IsNullOrEmpty(m_TableNamePath) Then
Visibility = Windows.Visibility.Collapsed
@@ -315,7 +316,7 @@ Public Class MTableMachineListBoxItem
Sub New(sMachName As String, bNcGenerate As Boolean, bMakeraw As Boolean, nMachId As Integer)
If m_MachinesList.Count = 0 Then
- If Not SearchMachine() Then MessageBox.Show("Error: Can't find machines dir!")
+ If Not SearchMachine() Then EgtMessageBoxV.Show(Application.Current.MainWindow, "Error: Can't find machines dir!") ' MessageBox.Show("Error: Can't find machines dir!")
End If
If Not String.IsNullOrWhiteSpace(sMachName) Then
For Index = 0 To m_MachinesList.Count - 1
diff --git a/Special-Doors/TableUtility.vb b/Special-Doors/TableUtility.vb
index 4d88f3a..436ea63 100644
--- a/Special-Doors/TableUtility.vb
+++ b/Special-Doors/TableUtility.vb
@@ -496,7 +496,8 @@ Module TableUtility
If Directory.Exists(IniFile.m_sDoorsDirPath) Then
Return True
Else
- If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 15) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 16), IniFile.m_sDoorsDirPath), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 15) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 16), IniFile.m_sDoorsDirPath), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_DOORSERRORS + 15) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 16), IniFile.m_sDoorsDirPath), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
Return RecursiveVerifyDoorsDir()
End If
Return False
diff --git a/Special-GunStock/GunStock.vb b/Special-GunStock/GunStock.vb
index c6bcc73..9514ae1 100644
--- a/Special-GunStock/GunStock.vb
+++ b/Special-GunStock/GunStock.vb
@@ -56,7 +56,8 @@ Module GunStock
' Carico ambiente lua per Gunstock
If Not LoadGunStock() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 2), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 2), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 2), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in LoadGunStock")
Return False
End If
@@ -64,7 +65,8 @@ Module GunStock
' Lettura dei parametri dal modello
m_sDescription = String.Empty
If Not ReadModParams() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 3), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 3), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 3), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in ReadModParams")
Return False
End If
@@ -80,14 +82,16 @@ Module GunStock
' Scrivo file PEZ
If Not WritePezParams() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in WritePezParams")
Return False
End If
' Visualizzo dimensioni grezzo
If Not ShowRawDim() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in ShawRawDim")
Return False
End If
@@ -127,14 +131,16 @@ Module GunStock
' Carico ambiente lua per Gunstock
If Not LoadGunStock() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 2), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 2), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 2), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in LoadGunStock")
Return False
End If
' Lettura dei parametri dal pezzo
If Not ReadPezParams() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 3), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 3), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 3), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in ReadPezParams")
Return False
End If
@@ -146,14 +152,16 @@ Module GunStock
' Scrivo file PEZ
If Not WritePezParams() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in WritePezParams")
Return False
End If
' Visualizzo dimensioni grezzo
If Not ShowRawDim() Then
- MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_GUNSTOCKERRORS + 4), EgtMsg(MSG_GUNSTOCKERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in ShawRawDim")
Return False
End If
@@ -172,7 +180,8 @@ Module GunStock
' Carico ambiente lua per Gunstock
If Not LoadGunStock() Then
- MessageBox.Show(EgtMsg(8252), EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(8252), EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(8252), EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Error in LoadGunStock")
Return False
End If
@@ -316,7 +325,8 @@ Module GunStock
If Not EgtLuaGetGlobStringVar("GGD.DIMGREZ", sDimGrez) Or
String.IsNullOrWhiteSpace(sDimGrez) Then Return False
' Visualizzo la dimensione del grezzo
- MessageBox.Show(sDimGrez, EgtMsg(MSG_GUNSTOCK + 13), MessageBoxButton.OK, MessageBoxImage.Information)
+ 'MessageBox.Show(sDimGrez, EgtMsg(MSG_GUNSTOCK + 13), MessageBoxButton.OK, MessageBoxImage.Information)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, sDimGrez, EgtMsg(MSG_GUNSTOCK + 13), MessageBoxButton.OK, MessageBoxImage.Information)
Return True
End Function
diff --git a/Special-GunStock/GunStockWndV.xaml.vb b/Special-GunStock/GunStockWndV.xaml.vb
index 1bd877c..4501b0f 100644
--- a/Special-GunStock/GunStockWndV.xaml.vb
+++ b/Special-GunStock/GunStockWndV.xaml.vb
@@ -11,8 +11,10 @@ Public Class GunStockWndV
System.IO.Path.GetExtension(FileNameTxBl.Text)
' Verifico se esiste già e chiedo conferma di sovrascrittura
If File.Exists(sFile) Then
- If MessageBox.Show(sFile & " " & EgtMsg(MSG_EGTSAVEFILEDIALOG + 3) & vbCrLf & EgtMsg(MSG_EGTSAVEFILEDIALOG + 4),
- "", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) <> MessageBoxResult.Yes Then
+ 'If MessageBox.Show(sFile & " " & EgtMsg(MSG_EGTSAVEFILEDIALOG + 3) & vbCrLf & EgtMsg(MSG_EGTSAVEFILEDIALOG + 4),
+ ' "", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) <> MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, sFile & " " & EgtMsg(MSG_EGTSAVEFILEDIALOG + 3) & vbCrLf & EgtMsg(MSG_EGTSAVEFILEDIALOG + 4),
+ "", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) <> MessageBoxResult.Yes Then
Exit Sub
End If
End If
diff --git a/ToolsDbWindow/MyToolDbWindowVM.vb b/ToolsDbWindow/MyToolDbWindowVM.vb
index 2c2e43f..c0f2308 100644
--- a/ToolsDbWindow/MyToolDbWindowVM.vb
+++ b/ToolsDbWindow/MyToolDbWindowVM.vb
@@ -58,7 +58,8 @@ Public Class MyToolDbWindowVM
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
If Not File.Exists(IniFile.m_sCurrMachScriptsDirPath & "\" & SETUP_LUA) Then
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato,
@@ -77,7 +78,8 @@ Public Class MyToolDbWindowVM
EgtLuaGetGlobIntVar("STU.ERR", nErr)
If nErr = 0 Then
If EgtGetHeadExitCount(sHead) = 0 Then
- MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
End If
diff --git a/TopCommandBar/TopCommandBarVM.vb b/TopCommandBar/TopCommandBarVM.vb
index 4b93e54..2c8cd70 100644
--- a/TopCommandBar/TopCommandBarVM.vb
+++ b/TopCommandBar/TopCommandBarVM.vb
@@ -256,7 +256,8 @@ Public Class TopCommandBarVM
EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sInitMachScriptPath) Then
EgtOutLog("Error executing Machining init script " & sInitMachScriptPath)
- MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 3) & " " & sInitMachScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 3) & " " & sInitMachScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DISPOSITIONERRORS + 3) & " " & sInitMachScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
Dim nErr As Integer = 999
@@ -275,7 +276,8 @@ Public Class TopCommandBarVM
EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sExitMachScriptPath) Then
EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath)
- MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 4) & " " & sExitMachScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 4) & " " & sExitMachScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_DISPOSITIONERRORS + 4) & " " & sExitMachScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
Dim nErr As Integer = 999
@@ -616,7 +618,8 @@ Public Class TopCommandBarVM
GetPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
' se vuoto do messaggio di errore ed esco
If String.IsNullOrWhiteSpace(sSupportAddress) Then
- MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' Recupero numero chiave
@@ -627,14 +630,16 @@ Public Class TopCommandBarVM
EgtGetCurrFilePath(sCurrProject)
' se nome file vuoto, chiedo se si vuole salvare
If String.IsNullOrWhiteSpace(sCurrProject) Then
- If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refProjectVM.SaveProject()
End If
EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare
Else
If EgtGetModified() Then
- If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refProjectVM.SaveProject()
End If
End If
@@ -732,7 +737,8 @@ Public Class TopCommandBarVM
bEx = True
End Try
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
- MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
+ 'MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
Else
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_TOPCOMMANDBAR + 14))
End If
@@ -754,10 +760,12 @@ Public Class TopCommandBarVM
m_MachiningIsChecked = False
If nErr = 1 Then
' Error loading or creating Machining Group - LAVORA
- MessageBox.Show(EgtMsg(10008), EgtMsg(5002), MessageBoxButton.OK, MessageBoxImage.Error)
+ 'MessageBox.Show(EgtMsg(10008), EgtMsg(5002), MessageBoxButton.OK, MessageBoxImage.Error)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10008), EgtMsg(5002), MessageBoxButton.OK, MessageBoxImage.Error)
ElseIf nErr = -1 Then
' Non ci sono gruppi di lavoro - LAVORA
- MessageBox.Show(EgtMsg(5551), EgtMsg(5002), MessageBoxButton.OK, MessageBoxImage.Information)
+ 'MessageBox.Show(EgtMsg(5551), EgtMsg(5002), MessageBoxButton.OK, MessageBoxImage.Information)
+ EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5551), EgtMsg(5002), MessageBoxButton.OK, MessageBoxImage.Information)
End If
End If
End Sub
diff --git a/Utility/Dictionary.xaml b/Utility/Dictionary.xaml
index 1837528..843d6b2 100644
--- a/Utility/Dictionary.xaml
+++ b/Utility/Dictionary.xaml
@@ -1238,4 +1238,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Utility/MachineModel.vb b/Utility/MachineModel.vb
index 718ee82..f5ab5a6 100644
--- a/Utility/MachineModel.vb
+++ b/Utility/MachineModel.vb
@@ -102,7 +102,8 @@ Public Module MachineModel
If EgtSetCurrMachine(sMachineName) Then
Return True
End If
- If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), sMachineName), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), sMachineName), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), sMachineName), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
Return EgtTrySettingCurrMachine(sMachineName)
End If
Return False
@@ -121,7 +122,8 @@ Public Module MachineModel
If Directory.Exists(IniFile.m_sMachinesRoot) Then
Return True
Else
- If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), IniFile.m_sMachinesRoot), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
+ 'If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), IniFile.m_sMachinesRoot), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
+ If EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), IniFile.m_sMachinesRoot), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
Return VerifyMachinesDir()
End If
Return False