EgtCAM5 :

- aggiorna lavorazioni sdoppiato (solo tasto o shift + tasto) per aggiornamento senza o con ricalcolo
- corretta gestione lato lavoro in opzioni lavorazioni.
This commit is contained in:
Dario Sassi
2018-04-07 16:33:49 +00:00
parent b039961809
commit 8ecd2b68ef
3 changed files with 21 additions and 11 deletions
+3 -3
View File
@@ -6,14 +6,14 @@ Class Application
Friend Shared m_UpdateLayerTree As Boolean
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException can be handled in this file.
Protected Overrides Sub OnStartUp(e As System.Windows.StartupEventArgs)
MyBase.OnStartup(e)
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
' Creo la View principale
Dim MainWndView As New MainWindow
MainWindow = MainWndView
System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(Me.MainWindow)
' Creo il ViewModel principale
Dim MainWndViewModel As New MainWindowViewModel
' Assegno il ViewModel alla View
@@ -221,7 +221,7 @@ Class Application
#End Region
Public Sub TempCurrentDomain_UnhandledException(sender As Object, e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs) Handles Me.DispatcherUnhandledException
Public Sub ManageUnhandledException(sender As Object, e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs) Handles Me.DispatcherUnhandledException
EgtOutLog(e.Exception.ToString)
m_UpdateLayerTree = True
e.Handled = True
@@ -91,7 +91,11 @@ Namespace EgtCAM5
Public ReadOnly Property WorkSideList As ObservableCollection(Of IdNameStruct)
Get
Select Case m_Type
Case MCH_MY.CHISELING, MCH_MY.MORTISING
Case MCH_MY.MORTISING
m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MORTISE_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
New IdNameStruct(MCH_MORTISE_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
Case MCH_MY.CHISELING
m_WorkSideList = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_CHISEL_WS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
New IdNameStruct(MCH_CHISEL_WS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
@@ -120,7 +124,7 @@ Namespace EgtCAM5
Dim OrigWorkSide As Integer = 0
EgtGetMachiningParam(MCH_MP.WORKSIDE, OrigWorkSide)
OrigWorkSide = IdNameStruct.IndFromId(OrigWorkSide, WorkSideList)
m_IsModifiedSelectedWorkSide = If(value <> OrigWorkSide, True, False)
m_IsModifiedSelectedWorkSide = (value <> OrigWorkSide)
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
End If
End If
@@ -128,7 +132,8 @@ Namespace EgtCAM5
End Property
'ObservableCollection che contiene le variabili per il combobox HeadSide
Private m_HeadSideList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_HS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)), New IdNameStruct(MCH_SAW_HS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
Private m_HeadSideList As New ObservableCollection(Of IdNameStruct)({New IdNameStruct(MCH_SAW_HS.LEFT, EgtMsg(MSG_MACHININGSDBPAGE + 121)),
New IdNameStruct(MCH_SAW_HS.RIGHT, EgtMsg(MSG_MACHININGSDBPAGE + 122))})
Public ReadOnly Property HeadSideList As ObservableCollection(Of IdNameStruct)
Get
Return m_HeadSideList
@@ -369,10 +374,11 @@ Namespace EgtCAM5
Set(value As Integer)
If value <> m_SelectedStepType Then
If Not IsNothing(StepTypeList) Then
m_SelectedStepType = IdNameStruct.IndFromId(value, StepTypeList)
m_SelectedStepType = value
Dim OrigStepType As Integer = 0
EgtGetMachiningParam(MCH_MP.STEPTYPE, OrigStepType)
m_IsModifiedSelectedStepType = If(value <> OrigStepType, True, False)
OrigStepType = IdNameStruct.IndFromId(OrigStepType, StepTypeList)
m_IsModifiedSelectedStepType = (value <> OrigStepType)
NotifyPropertyChanged("UpdateMachiningBtnIsEnabled")
End If
End If
@@ -1814,6 +1820,7 @@ Namespace EgtCAM5
EgtGetMachiningParam(MCH_MP.TOOLINVERT, m_ToolInvert)
NotifyPropertyChanged("ToolInvert")
m_IsModifiedToolInvert = False
NotifyPropertyChanged("WorkSideList")
EgtGetMachiningParam(MCH_MP.WORKSIDE, nValue)
m_SelectedWorkSide = If(IsNothing(WorkSideList), nValue, IdNameStruct.IndFromId(nValue, WorkSideList))
NotifyPropertyChanged("SelectedWorkSide")
@@ -1838,7 +1845,8 @@ Namespace EgtCAM5
NotifyPropertyChanged("SelectedCurveUse")
m_IsModifiedSelectedCurveUse = False
NotifyPropertyChanged("StepTypeList")
EgtGetMachiningParam(MCH_MP.STEPTYPE, m_SelectedStepType)
EgtGetMachiningParam(MCH_MP.STEPTYPE, nValue)
m_SelectedStepType = If(IsNothing(StepTypeList), nValue, IdNameStruct.IndFromId(nValue, StepTypeList))
NotifyPropertyChanged("SelectedStepType")
m_IsModifiedSelectedStepType = False
NotifyPropertyChanged("SubTypeList")
@@ -2068,7 +2076,8 @@ Namespace EgtCAM5
End If
End If
If m_IsModifiedSelectedStepType Then
If EgtSetMachiningParam(MCH_MP.STEPTYPE, m_SelectedStepType) Then
nValue = If(IsNothing(StepTypeList), m_SelectedStepType, IdNameStruct.IdFromInd(m_SelectedStepType, StepTypeList))
If EgtSetMachiningParam(MCH_MP.STEPTYPE, nValue) Then
m_IsModifiedSelectedStepType = False
End If
End If
@@ -719,8 +719,9 @@ Namespace EgtCAM5
Application.Current.MainWindow.ForceCursor = True
Application.Current.MainWindow.Cursor = Cursors.Wait
' Eseguo ricalcolo
Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift)
Dim sErr As String = String.Empty
Dim bOk As Boolean = EgtApplyAllMachinings(True, False, sErr)
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
EgtSetModified()
' Aggiorno visualizzazione e ritorno a cursore standard
EgtDraw()