-pulizia codice

This commit is contained in:
Demetrio Cassarino
2024-07-10 16:16:02 +02:00
parent 2ec5866c4a
commit 81c1b3cbb7
59 changed files with 240 additions and 1006 deletions
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
@@ -29,7 +28,7 @@ Public Class SimulationExpanderVM
End Get
Set(value As Boolean)
m_Simulation_IsEnabled = value
NotifyPropertyChanged("Simulation_IsEnabled")
NotifyPropertyChanged(NameOf(Simulation_IsEnabled))
End Set
End Property
@@ -41,7 +40,7 @@ Public Class SimulationExpanderVM
value = Math.Max(1, Math.Min(value, 100))
If Math.Abs(value - m_SliderValue) > 1 Then
m_SliderValue = value
NotifyPropertyChanged("SliderValue")
NotifyPropertyChanged(NameOf(SliderValue))
End If
EgtSimSetStep(value * GetSliderX())
End Set
@@ -144,8 +143,8 @@ Public Class SimulationExpanderVM
m_Simulation_IsExpanded = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refOperationsListExpanderVM.SimulationExpander_Get_IsExpanded(True)
NotifyPropertyChanged("Simulation_IsExpanded")
Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled")
NotifyPropertyChanged(NameOf(Simulation_IsExpanded))
Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' disattivo database utensili, lavorazioni e setup se vado in simulazione
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(False, False, False)
' disattivo MTable e SpecialPanel se vado in simulazione
@@ -166,8 +165,8 @@ Public Class SimulationExpanderVM
m_Simulation_IsExpanded = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refOperationsListExpanderVM.SimulationExpander_Get_IsExpanded(False)
NotifyPropertyChanged("Simulation_IsExpanded")
Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled")
NotifyPropertyChanged(NameOf(Simulation_IsExpanded))
Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' attivo database utensili, lavorazioni e setup se esco dalla simulazione
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
' disattivo MTable e SpecialPanel se esco dalla simulazione
@@ -245,7 +244,7 @@ Public Class SimulationExpanderVM
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refMachGroupPanelVM.SetMachGroupState(False) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = False
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
m_bStopOnNextCollision = True
If Not EgtSimStart(False) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
@@ -271,7 +270,7 @@ Public Class SimulationExpanderVM
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
NotifyPropertyChanged(NameOf(PlayPauseImage))
End If
' Se movimento con collisione
ElseIf nMove = MCH_SIM.COLLISION Then
@@ -281,7 +280,7 @@ Public Class SimulationExpanderVM
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
NotifyPropertyChanged(NameOf(PlayPauseImage))
' Messaggio
MessageBox.Show(EgtMsg(MSG_SIMULATION + 19), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
Else
@@ -292,7 +291,7 @@ Public Class SimulationExpanderVM
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
NotifyPropertyChanged(NameOf(PlayPauseImage))
' Abilito check VMill
VMill_IsEnabled = True
Select Case nMove
@@ -341,7 +340,7 @@ Public Class SimulationExpanderVM
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refMachGroupPanelVM.SetMachGroupState(True) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = True
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
If IniFile.m_bSimulEndExitApp Then
refMainWindowVM.CloseApplication( Nothing)
End If
@@ -422,7 +421,7 @@ Public Class SimulationExpanderVM
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
NotifyPropertyChanged(NameOf(PlayPauseImage))
' Dichiaro di non arrestarsi alla successiva notifica di collisione
m_bStopOnNextCollision = False
End If