a4b5cd4834
- Cambiati nomi classi e file.
268 lines
8.4 KiB
VB.net
268 lines
8.4 KiB
VB.net
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class GridPanelVM
|
|
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)
|
|
Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
|
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)
|
|
Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
|
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)
|
|
Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
|
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)
|
|
Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
|
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)
|
|
Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
|
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)
|
|
Map.refProjectVM.GetController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
|
End Sub
|
|
|
|
#End Region ' CPlaneBottomCommand
|
|
|
|
#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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
|
End Sub
|
|
|
|
#End Region ' CPlaneOriginCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
End Namespace |