4db56e7e09
- Migliorie varie.
100 lines
3.4 KiB
VB.net
100 lines
3.4 KiB
VB.net
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class DrawOptionPanelViewModel
|
|
Inherits ViewModelBase
|
|
|
|
Private m_DrawIsChecked As Boolean
|
|
Public Property DrawIsChecked As Boolean
|
|
Get
|
|
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
|
|
End Get
|
|
End Property
|
|
|
|
Private m_InputExpander As InputExpanderView
|
|
Public ReadOnly Property InputExpander As InputExpanderView
|
|
Get
|
|
If IsNothing(m_InputExpander) Then
|
|
m_InputExpander = New InputExpanderView
|
|
m_InputExpander.DataContext = New InputExpanderViewModel
|
|
End If
|
|
Return m_InputExpander
|
|
End Get
|
|
End Property
|
|
|
|
Private m_InfoExpander As InfoExpanderView
|
|
Public ReadOnly Property InfoExpander As InfoExpanderView
|
|
Get
|
|
If IsNothing(m_InfoExpander) Then
|
|
m_InfoExpander = New InfoExpanderView
|
|
m_InfoExpander.DataContext = New InfoExpanderViewModel
|
|
End If
|
|
Return m_InfoExpander
|
|
End Get
|
|
End Property
|
|
|
|
Sub New()
|
|
' Inizializzo la selezione della modilità Draw all'apertura del programma
|
|
DrawIsChecked = True
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
End Namespace |