Imports EgtUILib
Public Class ViewPanelVM
#Region "FIELDS & PROPERTIES"
' riferimento alla finestra principale
Private m_rfScenemanagerVM As SceneManagerVM
' Definizione comandi
Private m_cmdZoomAll As ICommand
Private m_cmdTopView As ICommand
Private m_cmdFrontView As ICommand
Private m_cmdLeftView As ICommand
Private m_cmdBackView As ICommand
Private m_cmdRightView As ICommand
Private m_cmdIsoViewSW As ICommand
#Region "ToolTip"
Public ReadOnly Property ZoomAllToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 4)
End Get
End Property
Public ReadOnly Property LookFromTopToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 7)
End Get
End Property
Public ReadOnly Property LookFromFrontToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 8)
End Get
End Property
Public ReadOnly Property LookFromLeftToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 9)
End Get
End Property
Public ReadOnly Property LookFromBackToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 10)
End Get
End Property
Public ReadOnly Property LookFromRightToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 11)
End Get
End Property
Public ReadOnly Property LookFromIso_SWToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 12)
End Get
End Property
#End Region ' ToolTip
#End Region ' FIELDS & PROPERTIES
#Region "COMMANDS"
#Region "ZoomAllCommand"
'''
''' Returns a command that do ZoomAll.
'''
Public ReadOnly Property ZoomAllCommand As ICommand
Get
If m_cmdZoomAll Is Nothing Then
m_cmdZoomAll = New Command(AddressOf ZoomAll)
End If
Return m_cmdZoomAll
End Get
End Property
'''
''' Execute the ZoomAll. This method is invoked by the ZoomAllCommand.
'''
Public Sub ZoomAll(ByVal param As Object)
m_rfScenemanagerVM.ProjectScene.ZoomAll()
End Sub
#End Region ' ZoomAllCommand
#Region "TopViewCommand"
'''
''' Returns a command that do TopView.
'''
Public ReadOnly Property TopViewCommand As ICommand
Get
If m_cmdTopView Is Nothing Then
m_cmdTopView = New Command(AddressOf TopView)
End If
Return m_cmdTopView
End Get
End Property
'''
''' Execute the TopView. This method is invoked by the TopViewCommand.
'''
Public Sub TopView(ByVal param As Object)
m_rfScenemanagerVM.ProjectScene.TopView()
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
End Sub
#End Region ' TopViewCommand
#Region "FrontViewCommand"
'''
''' Returns a command that do FrontView.
'''
Public ReadOnly Property FrontViewCommand As ICommand
Get
If m_cmdFrontView Is Nothing Then
m_cmdFrontView = New Command(AddressOf FrontView)
End If
Return m_cmdFrontView
End Get
End Property
'''
''' Execute the FrontView. This method is invoked by the FrontViewCommand.
'''
Public Sub FrontView(ByVal param As Object)
m_rfScenemanagerVM.ProjectScene.FrontView()
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
End Sub
#End Region ' FrontViewCommand
#Region "LeftViewCommand"
'''
''' Returns a command that do LeftView.
'''
Public ReadOnly Property LeftViewCommand As ICommand
Get
If m_cmdLeftView Is Nothing Then
m_cmdLeftView = New Command(AddressOf LeftView)
End If
Return m_cmdLeftView
End Get
End Property
'''
''' Execute the LeftView. This method is invoked by the LeftViewCommand.
'''
Public Sub LeftView(ByVal param As Object)
m_rfScenemanagerVM.ProjectScene.LeftView()
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
End Sub
#End Region ' LeftViewCommand
#Region "BackViewCommand"
'''
''' Returns a command that do BackView.
'''
Public ReadOnly Property BackViewCommand As ICommand
Get
If m_cmdBackView Is Nothing Then
m_cmdBackView = New Command(AddressOf BackView)
End If
Return m_cmdBackView
End Get
End Property
'''
''' Execute the BackView. This method is invoked by the BackViewCommand.
'''
Public Sub BackView(ByVal param As Object)
m_rfScenemanagerVM.ProjectScene.BackView()
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
End Sub
#End Region ' BackViewCommand
#Region "RightViewCommand"
'''
''' Returns a command that do RightView.
'''
Public ReadOnly Property RightViewCommand As ICommand
Get
If m_cmdRightView Is Nothing Then
m_cmdRightView = New Command(AddressOf RightView)
End If
Return m_cmdRightView
End Get
End Property
'''
''' Execute the RightView. This method is invoked by the RightViewCommand.
'''
Public Sub RightView(ByVal param As Object)
m_rfScenemanagerVM.ProjectScene.RightView()
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
End Sub
#End Region ' RightViewCommand
#Region "IsoViewSWCommand"
'''
''' Returns a command that do IsoViewSW.
'''
Public ReadOnly Property IsoViewSWCommand As ICommand
Get
If m_cmdIsoViewSW Is Nothing Then
m_cmdIsoViewSW = New Command(AddressOf IsoViewSW)
End If
Return m_cmdIsoViewSW
End Get
End Property
'''
''' Execute the IsoViewSW. This method is invoked by the IsoViewSWCommand.
'''
Public Sub IsoViewSW(ByVal param As Object)
m_rfScenemanagerVM.ProjectScene.IsoViewSW()
End Sub
#End Region ' IsoViewSWCommand
#End Region ' COMMANDS
Sub New(ByRef SceneManagerVM As SceneManagerVM)
m_rfScenemanagerVM = SceneManagerVM
End Sub
End Class