Files
EgtCAM5/ProjectPage/GridPanel/GridPanelViewModel.vb
T
Emmanuele Sassi 2ee84a514d EgtCAM5 :
- Correzzione EgtSaveFile Dialog.
- Eliminazione Can da tutti i comandi dei bottoni nel programma.
2017-02-10 18:36:10 +00:00

377 lines
11 KiB
VB.net

Imports EgtUILib
Namespace EgtCAM5
Public Class GridPanelViewModel
Inherits ViewModelBase
#Region "FIELDS & PROPERTIES"
' Definizione comandi
Private m_cmdCPlaneTop As ICommand
Private m_cmdCPlaneFront As ICommand
Private m_cmdCPlaneRight As ICommand
Private m_cmdCPlaneBack As ICommand
Private m_cmdCPlaneLeft As ICommand
Private m_cmdCPlaneBottom As ICommand
Private m_cmdCPlaneView As ICommand
Private m_cmdCPlaneElevation As ICommand
Private m_cmdCPlaneOrigin As ICommand
Private m_cmdCPlaneRotate As ICommand
Private m_cmdCPlane3P As ICommand
Private m_cmdCPlanePerpObj As ICommand
Private m_cmdCPlaneObj As ICommand
#Region "ToolTip"
Public ReadOnly Property CPlaneTopToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 19)
End Get
End Property
Public ReadOnly Property CPlaneFrontToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 20)
End Get
End Property
Public ReadOnly Property CPlaneRightToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 21)
End Get
End Property
Public ReadOnly Property CPlaneBackToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 22)
End Get
End Property
Public ReadOnly Property CPlaneLeftToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 23)
End Get
End Property
Public ReadOnly Property CPlaneBottomToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 24)
End Get
End Property
Public ReadOnly Property CPlaneElevationToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 26)
End Get
End Property
Public ReadOnly Property CPlaneOriginToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 27)
End Get
End Property
#End Region ' Tooltip
#End Region
#Region "COMMANDS"
#Region "CPlaneTopCommand"
''' <summary>
''' Returns a command that do CPlaneTop.
''' </summary>
Public ReadOnly Property CPlaneTopCommand As ICommand
Get
If m_cmdCPlaneTop Is Nothing Then
m_cmdCPlaneTop = New RelayCommand(AddressOf CPlaneTop)
End If
Return m_cmdCPlaneTop
End Get
End Property
''' <summary>
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANETOP)
End Sub
#End Region ' CPlaneTopCommand
#Region "CPlaneFrontCommand"
''' <summary>
''' Returns a command that do CPlaneFront.
''' </summary>
Public ReadOnly Property CPlaneFrontCommand As ICommand
Get
If m_cmdCPlaneFront Is Nothing Then
m_cmdCPlaneFront = New RelayCommand(AddressOf CPlaneFront)
End If
Return m_cmdCPlaneFront
End Get
End Property
''' <summary>
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEFRONT)
End Sub
#End Region ' CPlaneFrontCommand
#Region "CPlaneRightCommand"
''' <summary>
''' Returns a command that do CPlaneRight.
''' </summary>
Public ReadOnly Property CPlaneRightCommand As ICommand
Get
If m_cmdCPlaneRight Is Nothing Then
m_cmdCPlaneRight = New RelayCommand(AddressOf CPlaneRight)
End If
Return m_cmdCPlaneRight
End Get
End Property
''' <summary>
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANERIGHT)
End Sub
#End Region ' CPlaneRightCommand
#Region "CPlaneBackCommand"
''' <summary>
''' Returns a command that do CPlaneBack.
''' </summary>
Public ReadOnly Property CPlaneBackCommand As ICommand
Get
If m_cmdCPlaneBack Is Nothing Then
m_cmdCPlaneBack = New RelayCommand(AddressOf CPlaneBack)
End If
Return m_cmdCPlaneBack
End Get
End Property
''' <summary>
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEBACK)
End Sub
#End Region ' CPlaneBackCommand
#Region "CPlaneLeftCommand"
''' <summary>
''' Returns a command that do CPlaneLeft.
''' </summary>
Public ReadOnly Property CPlaneLeftCommand As ICommand
Get
If m_cmdCPlaneLeft Is Nothing Then
m_cmdCPlaneLeft = New RelayCommand(AddressOf CPlaneLeft)
End If
Return m_cmdCPlaneLeft
End Get
End Property
''' <summary>
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANELEFT)
End Sub
#End Region ' CPlaneLeftCommand
#Region "CPlaneBottomCommand"
''' <summary>
''' Returns a command that do CPlaneBottom.
''' </summary>
Public ReadOnly Property CPlaneBottomCommand As ICommand
Get
If m_cmdCPlaneBottom Is Nothing Then
m_cmdCPlaneBottom = New RelayCommand(AddressOf CPlaneBottom)
End If
Return m_cmdCPlaneBottom
End Get
End Property
''' <summary>
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEBOTTOM)
End Sub
#End Region ' CPlaneBottomCommand
#Region "CPlaneViewCommand"
''' <summary>
''' Returns a command that do CPlaneView.
''' </summary>
Public ReadOnly Property CPlaneViewCommand As ICommand
Get
If m_cmdCPlaneView Is Nothing Then
m_cmdCPlaneView = New RelayCommand(AddressOf CPlaneView)
End If
Return m_cmdCPlaneView
End Get
End Property
''' <summary>
''' Execute the CPlaneView. This method is invoked by the CPlaneViewCommand.
''' </summary>
Public Sub CPlaneView(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEVIEW)
End Sub
#End Region ' CPlaneViewCommand
#Region "CPlaneElevationCommand"
''' <summary>
''' Returns a command that do CPlaneElevation.
''' </summary>
Public ReadOnly Property CPlaneElevationCommand As ICommand
Get
If m_cmdCPlaneElevation Is Nothing Then
m_cmdCPlaneElevation = New RelayCommand(AddressOf CPlaneElevation)
End If
Return m_cmdCPlaneElevation
End Get
End Property
''' <summary>
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEELEVATION)
End Sub
#End Region ' CPlaneElevationCommand
#Region "CPlaneOriginCommand"
''' <summary>
''' Returns a command that do CPlaneOrigin.
''' </summary>
Public ReadOnly Property CPlaneOriginCommand As ICommand
Get
If m_cmdCPlaneOrigin Is Nothing Then
m_cmdCPlaneOrigin = New RelayCommand(AddressOf CPlaneOrigin)
End If
Return m_cmdCPlaneOrigin
End Get
End Property
''' <summary>
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEORIGIN)
End Sub
#End Region ' CPlaneOriginCommand
#Region "CPlaneRotateCommand"
''' <summary>
''' Returns a command that do CPlaneRotate.
''' </summary>
Public ReadOnly Property CPlaneRotateCommand As ICommand
Get
If m_cmdCPlaneRotate Is Nothing Then
m_cmdCPlaneRotate = New RelayCommand(AddressOf CPlaneRotate)
End If
Return m_cmdCPlaneRotate
End Get
End Property
''' <summary>
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
Public Sub CPlaneRotate(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEROTATE)
End Sub
#End Region ' CPlaneRotateCommand
#Region "CPlane3PCommand"
''' <summary>
''' Returns a command that do CPlane3P.
''' </summary>
Public ReadOnly Property CPlane3PCommand As ICommand
Get
If m_cmdCPlane3P Is Nothing Then
m_cmdCPlane3P = New RelayCommand(AddressOf CPlane3P)
End If
Return m_cmdCPlane3P
End Get
End Property
''' <summary>
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
Public Sub CPlane3P(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANE3P)
End Sub
#End Region ' CPlane3PCommand
#Region "CPlanePerpObjCommand"
''' <summary>
''' Returns a command that do CPlanePerpObj.
''' </summary>
Public ReadOnly Property CPlanePerpObjCommand As ICommand
Get
If m_cmdCPlanePerpObj Is Nothing Then
m_cmdCPlanePerpObj = New RelayCommand(AddressOf CPlanePerpObj)
End If
Return m_cmdCPlanePerpObj
End Get
End Property
''' <summary>
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
Public Sub CPlanePerpObj(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEPERPOBJ)
End Sub
#End Region ' CPlanePerpObjCommand
#Region "CPlaneObjCommand"
''' <summary>
''' Returns a command that do CPlanepObj.
''' </summary>
Public ReadOnly Property CPlaneObjCommand As ICommand
Get
If m_cmdCPlaneObj Is Nothing Then
m_cmdCPlaneObj = New RelayCommand(AddressOf CPlaneObj)
End If
Return m_cmdCPlaneObj
End Get
End Property
''' <summary>
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CPLANEOBJ)
End Sub
#End Region ' CPlaneObjCommand
#End Region ' COMMANDS
End Class
End Namespace