EgtCAM5 :

- Migliorie varie.
This commit is contained in:
Emmanuele Sassi
2016-07-09 19:17:02 +00:00
parent a10b8d2ec6
commit 4db56e7e09
25 changed files with 510 additions and 44 deletions
@@ -1,17 +1,70 @@
Namespace EgtCAM5
Imports EgtUILib
Namespace EgtCAM5
Public Class DrawOptionPanelViewModel
Inherits ViewModelBase
' GRAPHICAL ELEMENTS
Private m_ManageLayerExpander As ManageLayerExpanderView
Public ReadOnly Property ManageLayerExpander As ManageLayerExpanderView
Private m_DrawIsChecked As Boolean
Public Property DrawIsChecked As Boolean
Get
If IsNothing(m_ManageLayerExpander) Then
m_ManageLayerExpander = New ManageLayerExpanderView
m_ManageLayerExpander.DataContext = New ManageLayerExpanderViewModel
Return m_DrawIsChecked
End Get
Set(value As Boolean)
If value <> m_DrawIsChecked Then
m_DrawIsChecked = value
If value Then
Application.Msn.NotifyColleagues(Application.PROJECTPAGE_DRAWMODE)
EgtResetCurrMachGroup()
EgtZoom(ZM.ALL)
End If
OnPropertyChanged("ManageLayerExpander")
End If
End Set
End Property
Private m_WorkIsChecked As Boolean
Public Property WorkIsChecked As Boolean
Get
Return m_WorkIsChecked
End Get
Set(value As Boolean)
If value <> m_WorkIsChecked Then
m_WorkIsChecked = value
If value Then
Application.Msn.NotifyColleagues(Application.PROJECTPAGE_MACHININGMODE)
Dim nId = EgtGetFirstMachGroup()
If nId <> GDB_ID.NULL Then
EgtSetCurrMachGroup(nId)
Else
EgtAddMachGroup("Mach01", "CMS-PF122R8RR")
End If
EgtZoom(ZM.ALL)
Application.Msn.NotifyColleagues(Application.LOADOPERATIONLIST)
End If
OnPropertyChanged("ManageLayerExpander")
End If
End Set
End Property
' GRAPHICAL ELEMENTS
Private m_OperationExpander As OperationExpanderView
Private m_ManageLayerExpander As ManageLayerExpanderView
Public ReadOnly Property ManageLayerExpander As ContentControl
Get
If m_DrawIsChecked Then
If IsNothing(m_ManageLayerExpander) Then
m_ManageLayerExpander = New ManageLayerExpanderView
m_ManageLayerExpander.DataContext = New ManageLayerExpanderViewModel
End If
Return m_ManageLayerExpander
Else
If IsNothing(m_OperationExpander) Then
m_OperationExpander = New OperationExpanderView
m_OperationExpander.DataContext = New OperationExpanderViewModel
End If
Return m_OperationExpander
End If
Return m_ManageLayerExpander
End Get
End Property
@@ -37,6 +90,11 @@
End Get
End Property
Sub New()
' Inizializzo la selezione della modilità Draw all'apertura del programma
DrawIsChecked = True
End Sub
End Class
End Namespace