23820e3ed8
- aggiunto bottone per comando GRID_INVERT.
200 lines
5.6 KiB
VB.net
200 lines
5.6 KiB
VB.net
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"
|
|
|
|
''' <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)
|
|
Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.VIEW)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
|
End Sub
|
|
|
|
#End Region ' CPlaneViewCommand
|
|
|
|
#Region "CPlaneInvertCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do CPlaneInvert.
|
|
''' </summary>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Execute the CPlaneInvert. This method is invoked by the CPlaneInvertCommand.
|
|
''' </summary>
|
|
Public Sub CPlaneInvert(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_INVERT)
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
#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)
|
|
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"
|
|
|
|
''' <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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_3P)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
|
End Sub
|
|
|
|
#End Region ' CPlaneObjCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class |