2d665a396a
- Migliorie varie.
205 lines
5.9 KiB
VB.net
205 lines
5.9 KiB
VB.net
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class PopUpGridPanelViewModel
|
|
Inherits ViewModelBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
' Definizione comandi
|
|
Private m_cmdCPlaneView 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 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, AddressOf CanCPlaneView)
|
|
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
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanCPlaneView(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' CPlaneViewCommand
|
|
|
|
#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, AddressOf CanCPlaneRotate)
|
|
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
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanCPlaneRotate(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#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, AddressOf CanCPlane3P)
|
|
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
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanCPlane3P(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#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, AddressOf CanCPlanePerpObj)
|
|
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
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanCPlanePerpObj(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#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, AddressOf CanCPlaneObj)
|
|
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
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanCPlaneObj(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' CPlaneObjCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
End Namespace |