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" ''' ''' Returns a command that do CPlaneTop. ''' 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 ''' ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand. ''' Public Sub CPlaneTop(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANETOP) End Sub #End Region ' CPlaneTopCommand #Region "CPlaneFrontCommand" ''' ''' Returns a command that do CPlaneFront. ''' 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 ''' ''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand. ''' Public Sub CPlaneFront(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEFRONT) End Sub #End Region ' CPlaneFrontCommand #Region "CPlaneRightCommand" ''' ''' Returns a command that do CPlaneRight. ''' 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 ''' ''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand. ''' Public Sub CPlaneRight(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANERIGHT) End Sub #End Region ' CPlaneRightCommand #Region "CPlaneBackCommand" ''' ''' Returns a command that do CPlaneBack. ''' 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 ''' ''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand. ''' Public Sub CPlaneBack(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEBACK) End Sub #End Region ' CPlaneBackCommand #Region "CPlaneLeftCommand" ''' ''' Returns a command that do CPlaneLeft. ''' 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 ''' ''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand. ''' Public Sub CPlaneLeft(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANELEFT) End Sub #End Region ' CPlaneLeftCommand #Region "CPlaneBottomCommand" ''' ''' Returns a command that do CPlaneBottom. ''' 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 ''' ''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand. ''' Public Sub CPlaneBottom(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEBOTTOM) End Sub #End Region ' CPlaneBottomCommand #Region "CPlaneViewCommand" ''' ''' Returns a command that do CPlaneView. ''' 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 ''' ''' Execute the CPlaneView. This method is invoked by the CPlaneViewCommand. ''' Public Sub CPlaneView(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEVIEW) End Sub #End Region ' CPlaneViewCommand #Region "CPlaneElevationCommand" ''' ''' Returns a command that do CPlaneElevation. ''' 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 ''' ''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand. ''' Public Sub CPlaneElevation(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEELEVATION) End Sub #End Region ' CPlaneElevationCommand #Region "CPlaneOriginCommand" ''' ''' Returns a command that do CPlaneOrigin. ''' 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 ''' ''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand. ''' Public Sub CPlaneOrigin(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEORIGIN) End Sub #End Region ' CPlaneOriginCommand #Region "CPlaneRotateCommand" ''' ''' Returns a command that do CPlaneRotate. ''' 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 ''' ''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand. ''' Public Sub CPlaneRotate(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEROTATE) End Sub #End Region ' CPlaneRotateCommand #Region "CPlane3PCommand" ''' ''' Returns a command that do CPlane3P. ''' 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 ''' ''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand. ''' Public Sub CPlane3P(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANE3P) End Sub #End Region ' CPlane3PCommand #Region "CPlanePerpObjCommand" ''' ''' Returns a command that do CPlanePerpObj. ''' 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 ''' ''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand. ''' Public Sub CPlanePerpObj(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEPERPOBJ) End Sub #End Region ' CPlanePerpObjCommand #Region "CPlaneObjCommand" ''' ''' Returns a command that do CPlanepObj. ''' 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 ''' ''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand. ''' Public Sub CPlaneObj(ByVal param As Object) Application.Msn.NotifyColleagues(Application.CPLANEOBJ) End Sub #End Region ' CPlaneObjCommand #End Region ' COMMANDS End Class End Namespace