Imports EgtUILib Public Class PopUpGridPanelVM Inherits ViewModelBase #Region "FIELDS & PROPERTIES" ' Definizione comandi Private m_cmdCPlaneView As ICommand Private m_cmdCPlaneInvert 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 CPlaneViewToolTip As String Get Return EgtMsg(MSG_GRIDVIEWPANEL + 25) End Get End Property Public ReadOnly Property CPlaneInvertToolTip As String Get Return EgtMsg(5285) End Get End Property Public ReadOnly Property CPlaneRotateToolTip As String Get Return EgtMsg(MSG_GRIDVIEWPANEL + 28) End Get End Property Public ReadOnly Property CPlane3PointsToolTip As String Get Return EgtMsg(MSG_GRIDVIEWPANEL + 29) End Get End Property Public ReadOnly Property CPlanePerpCurveToolTip As String Get Return EgtMsg(MSG_GRIDVIEWPANEL + 30) End Get End Property Public ReadOnly Property CPlaneObjectToolTip As String Get Return EgtMsg(MSG_GRIDVIEWPANEL + 31) End Get End Property #End Region ' ToolTip #End Region #Region "COMMANDS" #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) Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.VIEW) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID) End Sub #End Region ' CPlaneViewCommand #Region "CPlaneInvertCommand" ''' ''' Returns a command that do CPlaneInvert. ''' Public ReadOnly Property CPlaneInvertCommand As ICommand Get If m_cmdCPlaneInvert Is Nothing Then m_cmdCPlaneInvert = New RelayCommand(AddressOf CPlaneInvert) End If Return m_cmdCPlaneInvert End Get End Property ''' ''' Execute the CPlaneInvert. This method is invoked by the CPlaneInvertCommand. ''' Public Sub CPlaneInvert(ByVal param As Object) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_INVERT) End Sub #End Region #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) If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_ROTATE) Else Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D) End If 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) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_3P) 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) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE) 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) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_OBJ) End Sub #End Region ' CPlaneObjCommand #End Region ' COMMANDS End Class