0db51df666
- Aggiunto comando rinomina per operazioni di lavorazione.
95 lines
4.4 KiB
VB.net
95 lines
4.4 KiB
VB.net
Imports EgtUILib
|
|
|
|
Public Class OptionPanelVM
|
|
Inherits ViewModelBase
|
|
|
|
Private m_DrawIsChecked As Boolean = True
|
|
|
|
Private m_MachiningIsChecked As Boolean = False
|
|
|
|
' GRAPHICAL ELEMENTS
|
|
Private m_OperationExpander As OperationExpanderV
|
|
Private m_ManageLayerExpander As ManageLayerExpanderV
|
|
Public ReadOnly Property ManageLayerExpander As ContentControl
|
|
Get
|
|
If m_DrawIsChecked Then
|
|
If IsNothing(m_ManageLayerExpander) Then
|
|
m_ManageLayerExpander = New ManageLayerExpanderV
|
|
m_ManageLayerExpander.DataContext = New ManageLayerExpanderVM
|
|
End If
|
|
Return m_ManageLayerExpander
|
|
Else
|
|
If IsNothing(m_OperationExpander) Then
|
|
m_OperationExpander = New OperationExpanderV With {
|
|
.DataContext = New OperationExpanderVM}
|
|
End If
|
|
Application.Msn.NotifyColleagues(Application.LOADOPERATIONLIST, GDB_ID.NULL)
|
|
Return m_OperationExpander
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Private m_MachiningsTreeExpander As MachiningTreeExpanderV
|
|
Private m_InfoExpander As InfoExpanderV
|
|
Public ReadOnly Property InfoExpander As ContentControl
|
|
Get
|
|
If m_DrawIsChecked Then
|
|
If IsNothing(m_InfoExpander) Then
|
|
m_InfoExpander = New InfoExpanderV
|
|
m_InfoExpander.DataContext = New InfoExpanderVM
|
|
End If
|
|
Return m_InfoExpander
|
|
Else
|
|
If IsNothing(m_MachiningsTreeExpander) Then
|
|
m_MachiningsTreeExpander = New MachiningTreeExpanderV
|
|
m_MachiningsTreeExpander.DataContext = New MachiningTreeExpanderVM
|
|
End If
|
|
Return m_MachiningsTreeExpander
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Private m_SimulationExpander As SimulationExpanderV
|
|
Private m_InputExpander As InputExpanderV
|
|
Public ReadOnly Property InputExpander As ContentControl
|
|
Get
|
|
If m_DrawIsChecked Then
|
|
If IsNothing(m_InputExpander) Then
|
|
m_InputExpander = New InputExpanderV
|
|
m_InputExpander.DataContext = New InputExpanderVM
|
|
End If
|
|
Return m_InputExpander
|
|
Else
|
|
If IsNothing(m_SimulationExpander) Then
|
|
m_SimulationExpander = New SimulationExpanderV
|
|
m_SimulationExpander.DataContext = New SimulationExpanderVM
|
|
End If
|
|
Map.refSimulationExpanderVM.Estimation_IsEnabled =
|
|
(EgtUILib.GetPrivateProfileInt(S_ESTIMATIONS, K_EST_ENABLE, 0, IniFile.m_sCurrMachIniFilePath) <> 0)
|
|
Return m_SimulationExpander
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Sub New()
|
|
Application.Msn.Register(Application.MACHININGMODE_ISCHECKED, Sub()
|
|
m_DrawIsChecked = False
|
|
m_MachiningIsChecked = True
|
|
EgtZoom(ZM.ALL, False)
|
|
OnPropertyChanged("ManageLayerExpander")
|
|
OnPropertyChanged("InfoExpander")
|
|
OnPropertyChanged("InputExpander")
|
|
End Sub)
|
|
Application.Msn.Register(Application.DRAWMODE_ISCHECKED, Sub()
|
|
m_DrawIsChecked = True
|
|
m_MachiningIsChecked = False
|
|
Application.Msn.NotifyColleagues(Application.SIMULATIONEXPANDER_SET_ISEXPANDED, False)
|
|
Application.Msn.NotifyColleagues(Application.ESTIMATIONSEXPANDER_SET_ISEXPANDED, False)
|
|
OnPropertyChanged("ManageLayerExpander")
|
|
OnPropertyChanged("InfoExpander")
|
|
OnPropertyChanged("InputExpander")
|
|
End Sub)
|
|
|
|
End Sub
|
|
|
|
End Class |