diff --git a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb index 093707b..4416523 100644 --- a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb +++ b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb @@ -33,6 +33,17 @@ Public Class SimulationExpanderVM End Set End Property + Private m_bOnlySimulation As Boolean = False + Public Property bOnlySimulation As Boolean + Get + Return m_bOnlySimulation + End Get + Set(value As Boolean) + m_bOnlySimulation = value + NotifyPropertyChanged("bOnlySimulation") + End Set + End Property + Public Overrides Property SliderValue As Double Get Return m_SliderValue @@ -151,6 +162,14 @@ Public Class SimulationExpanderVM ' disattivo MTable e SpecialPanel se vado in simulazione Map.refDoorPanelVM.MTableIsEnabled(False) Map.refSpecialPanelVM.SpecialPanelIsEnabled(False) + If m_bOnlySimulation Then + Map.refTopCommandBarVM.DrawIsEnabled = False + Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False + Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False + Map.refEstimationsExpanderVM.Estimation_IsEnabled =False + Map.refMachGroupPanelVM.SetMachGroupState(False) + Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled") + End If Return True End Function @@ -244,7 +263,7 @@ Public Class SimulationExpanderVM Map.refTopCommandBarVM.DrawIsEnabled = False Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False - Map.refMachGroupPanelVM.SetMachGroupState(False) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = False + Map.refMachGroupPanelVM.SetMachGroupState(False) Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled") m_bStopOnNextCollision = True If Not EgtSimStart(False) Then @@ -337,10 +356,15 @@ Public Class SimulationExpanderVM End While SetSimExecuting(False) IniFile.m_bSimulExecuting = False - Map.refTopCommandBarVM.DrawIsEnabled = True - Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True - Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True - Map.refMachGroupPanelVM.SetMachGroupState(True) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = True + If m_bOnlySimulation Then + ' Impedisco salvataggio eventuale modifica stato virtual milling + EgtResetModified() + Else + Map.refTopCommandBarVM.DrawIsEnabled = True + Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True + Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True + Map.refMachGroupPanelVM.SetMachGroupState(True) + End If Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled") If IniFile.m_bSimulEndExitApp Then refMainWindowVM.CloseApplication( Nothing) diff --git a/Project/ProjectVM.vb b/Project/ProjectVM.vb index c323ec7..4870f91 100644 --- a/Project/ProjectVM.vb +++ b/Project/ProjectVM.vb @@ -483,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 @@ -497,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 @@ -512,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 diff --git a/Special-BeamWall/Beam.vb b/Special-BeamWall/Beam.vb index cb1f2f1..a628170 100644 --- a/Special-BeamWall/Beam.vb +++ b/Special-BeamWall/Beam.vb @@ -57,7 +57,13 @@ Module Beam Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer()) If EgtGetCurrMachGroup() <> GDB_ID.NULL Then Map.refTopCommandBarVM.SetMachiningMode() + ' Se simulazione If bOk And nFlag = 2 Then + ' Se da TS3 impedisco di fare altro + If bBtl Then + Map.refSimulationExpanderVM.bOnlySimulation = True + End If + ' Vado in simulazione Map.refSimulationExpanderVM.Simulation_IsExpanded = True End If End If diff --git a/Special-BeamWall/Wall.vb b/Special-BeamWall/Wall.vb index 7e8d96b..b6b0c49 100644 --- a/Special-BeamWall/Wall.vb +++ b/Special-BeamWall/Wall.vb @@ -58,7 +58,13 @@ Module Wall Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer()) If EgtGetCurrMachGroup() <> GDB_ID.NULL Then Map.refTopCommandBarVM.SetMachiningMode() + ' Se simulazione If bOk And nFlag = 2 Then + ' Se da TS3 impedisco di fare altro + If bBtl Then + Map.refSimulationExpanderVM.bOnlySimulation = True + End If + ' Vado in simulazione Map.refSimulationExpanderVM.Simulation_IsExpanded = True End If End If