Files
EgtCAM5/ProjectPage/PopUpViewPanel/PopUpViewPanelViewModel.vb
T
Emmanuele Sassi 2d665a396a EgtCAM5 :
- Migliorie varie.
2016-09-03 15:24:25 +00:00

246 lines
6.9 KiB
VB.net

Imports EgtUILib
Namespace EgtCAM5
Public Class PopUpViewPanelViewModel
Inherits ViewModelBase
#Region "FIELDS & PROPERTIES"
' Definizione comandi
Private m_cmdZoomIn As ICommand
Private m_cmdZoomOut As ICommand
Private m_cmdIsoViewSE As ICommand
Private m_cmdIsoViewNE As ICommand
Private m_cmdIsoViewNW As ICommand
Private m_cmdViewToCPlane As ICommand
#Region "ToolTip"
Public ReadOnly Property ZoomInToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 5)
End Get
End Property
Public ReadOnly Property ZoomOutToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 6)
End Get
End Property
Public ReadOnly Property LookFromIso_SEToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 13)
End Get
End Property
Public ReadOnly Property LookFromIso_NEToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 14)
End Get
End Property
Public ReadOnly Property LookFromIso_NWToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 15)
End Get
End Property
Public ReadOnly Property ViewToCPlaneToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 32)
End Get
End Property
#End Region ' ToolTip
#End Region ' FIELDS & PROPERTIES
#Region "COMMANDS"
#Region "ZoomInCommand"
''' <summary>
''' Returns a command that do ZoomIn.
''' </summary>
Public ReadOnly Property ZoomInCommand As ICommand
Get
If m_cmdZoomIn Is Nothing Then
m_cmdZoomIn = New RelayCommand(AddressOf ZoomIn, AddressOf CanZoomIn)
End If
Return m_cmdZoomIn
End Get
End Property
''' <summary>
''' Execute the ZoomIn. This method is invoked by the ZoomInCommand.
''' </summary>
Public Sub ZoomIn(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.ZOOMIN)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanZoomIn(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ZoomInCommand
#Region "ZoomOutCommand"
''' <summary>
''' Returns a command that do ZoomOut.
''' </summary>
Public ReadOnly Property ZoomOutCommand As ICommand
Get
If m_cmdZoomOut Is Nothing Then
m_cmdZoomOut = New RelayCommand(AddressOf ZoomOut, AddressOf CanZoomOut)
End If
Return m_cmdZoomOut
End Get
End Property
''' <summary>
''' Execute the ZoomOut. This method is invoked by the ZoomOutCommand.
''' </summary>
Public Sub ZoomOut(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.ZOOMOUT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanZoomOut(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ZoomOutCommand
#Region "IsoViewSECommand"
''' <summary>
''' Returns a command that do IsoViewSE.
''' </summary>
Public ReadOnly Property IsoViewSECommand As ICommand
Get
If m_cmdIsoViewSE Is Nothing Then
m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE, AddressOf CanIsoViewSE)
End If
Return m_cmdIsoViewSE
End Get
End Property
''' <summary>
''' Execute the IsoViewSE. This method is invoked by the IsoViewSECommand.
''' </summary>
Public Sub IsoViewSE(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.ISOVIEWSE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanIsoViewSE(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' IsoViewSECommand
#Region "IsoViewNECommand"
''' <summary>
''' Returns a command that do IsoViewNE.
''' </summary>
Public ReadOnly Property IsoViewNECommand As ICommand
Get
If m_cmdIsoViewNE Is Nothing Then
m_cmdIsoViewNE = New RelayCommand(AddressOf IsoViewNE, AddressOf CanIsoViewNE)
End If
Return m_cmdIsoViewNE
End Get
End Property
''' <summary>
''' Execute the IsoViewNE. This method is invoked by the IsoViewNECommand.
''' </summary>
Public Sub IsoViewNE(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.ISOVIEWNE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanIsoViewNE(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' IsoViewNECommand
#Region "IsoViewNWCommand"
''' <summary>
''' Returns a command that do IsoViewNW.
''' </summary>
Public ReadOnly Property IsoViewNWCommand As ICommand
Get
If m_cmdIsoViewNW Is Nothing Then
m_cmdIsoViewNW = New RelayCommand(AddressOf IsoViewNW, AddressOf CanIsoViewNW)
End If
Return m_cmdIsoViewNW
End Get
End Property
''' <summary>
''' Execute the IsoViewNW. This method is invoked by the IsoViewNWCommand.
''' </summary>
Public Sub IsoViewNW(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.ISOVIEWNW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanIsoViewNW(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' IsoViewNWCommand
#Region "ViewToCPlaneCommand"
''' <summary>
''' Returns a command that do GetDist.
''' </summary>
Public ReadOnly Property ViewToCPlaneCommand As ICommand
Get
If m_cmdViewToCPlane Is Nothing Then
m_cmdViewToCPlane = New RelayCommand(AddressOf ViewToCPlane, AddressOf CanViewToCPlane)
End If
Return m_cmdViewToCPlane
End Get
End Property
''' <summary>
''' Execute the GetDist. This method is invoked by the GetDistCommand.
''' </summary>
Public Sub ViewToCPlane(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.VIEWTOCPLANE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanViewToCPlane(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ViewToCPlaneCommand
#End Region ' COMMANDS
End Class
End Namespace