diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 2a3db6c..071cad1 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderView.xaml b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderView.xaml index 7a537d5..281c1be 100644 --- a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderView.xaml +++ b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderView.xaml @@ -3,17 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"> - - - A1 - A2 - A3 - A4 - A5 - A6 - A7 - A8 - @@ -96,6 +85,8 @@ + + diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb index e40c17e..62d1c89 100644 --- a/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb +++ b/ProjectPage/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderViewModel.vb @@ -172,6 +172,17 @@ Namespace EgtCAM5 End Get End Property + Private m_StatusMsg As String + Public Property StatusMsg As String + Get + Return m_StatusMsg + End Get + Set(value As String) + m_StatusMsg = value + OnPropertyChanged("StatusMsg") + End Set + End Property + Private m_SliderValue As Double Public Property SliderValue As Double Get @@ -272,7 +283,7 @@ Namespace EgtCAM5 ''' Creata the new tool. This method is invoked by the NewCommand. ''' Public Sub StepCmd(ByVal param As Object) - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, "") + StatusMsg = "" ' Se stato stop, devo avviare simulazione If m_nStatus = SIM_ST.ST_STOP Then SimulationStatus = SIM_ST.ST_STEP @@ -312,7 +323,7 @@ Namespace EgtCAM5 ''' Creata the new tool. This method is invoked by the NewCommand. ''' Public Sub PlayPause(ByVal param As Object) - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, "") + StatusMsg = "" If m_bShowPlay Then ' Aggiorno bottone m_bShowPlay = False @@ -335,7 +346,7 @@ Namespace EgtCAM5 ' Se play o step, imposto stato pausa If m_nStatus = SIM_ST.ST_PLAY Or m_nStatus = SIM_ST.ST_STEP Then SimulationStatus = SIM_ST.ST_PAUSE - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 11)) ' Pausa + StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' Pausa End If End If End Sub @@ -361,7 +372,7 @@ Namespace EgtCAM5 ''' Creata the new tool. This method is invoked by the NewCommand. ''' Public Sub StopCmd(ByVal param As Object) - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, "") + StatusMsg = "" ' Se stato giĆ  stop, porto in home If m_nStatus = SIM_ST.ST_STOP Then ' Mi riporto all'inizio @@ -369,8 +380,9 @@ Namespace EgtCAM5 EgtDraw() ' Aggiorno dati CNC ShowCncData() + StatusMsg = EgtMsg(MSG_SIMULATION + 14) ' Home Else - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 12)) ' Simulazione interrotta + StatusMsg = EgtMsg(MSG_SIMULATION + 12) ' Stop End If ' Aggiorno bottone m_bShowPlay = True @@ -437,18 +449,19 @@ Namespace EgtCAM5 If Not EgtSimStart() Then If EgtGetLastMachMgrErrorId() <> 0 Then Dim sErr As String = EgtGetLastMachMgrErrorString() - MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) + MessageBox.Show(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) + MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE End If End If ' Aggiorno visualizzazione EgtDraw() ShowCncData() + StatusMsg = EgtMsg(MSG_SIMULATION + 14) ' Home End Sub Private Sub CloseSimulation() - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, "") + StatusMsg = "" ' Mi assicuro di terminare la simulazione ResetSimulation() EgtDraw() @@ -483,7 +496,7 @@ Namespace EgtCAM5 If m_nStatus = SIM_ST.ST_STEP And nMove = MCH_SIM.END_STEP Then ' Imposto stato Pausa SimulationStatus = SIM_ST.ST_PAUSE - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 11)) ' Pausa + StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' Pausa ' Aggiornamenti per bottone Play/Pause m_bShowPlay = True OnPropertyChanged("PlayPauseImage") @@ -496,8 +509,7 @@ Namespace EgtCAM5 OnPropertyChanged("PlayPauseImage") Select Case nMove Case MCH_SIM.END_ - Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 1)) - ' MessageBox.Show(EgtMsg(MSG_SIMULATION + 1), "", MessageBoxButton.OK) 'Simulazione completata + StatusMsg = EgtMsg(MSG_SIMULATION + 1) 'Simulazione completata Case MCH_SIM.OUTSTROKE Dim sInfo As String = String.Empty EgtGetOutstrokeInfo(sInfo)