Files
DarioS becbf3c682 Icarus 2.5c1 :
- eliminati alcuni crash
- in geometrie si chiude Edit dopo aver cancellato l'ultima
- piccoli aggiustamenti ai tooltip.
2023-03-03 19:59:19 +01:00

291 lines
7.2 KiB
VB.net

Imports EgtUILib
Imports EgtWPFLib5
Public Class ViewPanelVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
' 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
Private m_cmdIsoViewSE As ICommand
Private m_cmdViewFromCPlane 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 LookFromIsoSWToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 12)
End Get
End Property
Public ReadOnly Property LookFromIsoSEToolTip As String
Get
Return "SE Isometric View"
End Get
End Property
Public ReadOnly Property ViewFromCPlaneToolTip As String
Get
Return "View From CPlane"
End Get
End Property
#End Region ' ToolTip
#End Region ' FIELDS & PROPERTIES
#Region "COMMANDS"
#Region "ZoomAllCommand"
''' <summary>
''' Returns a command that do ZoomAll.
''' </summary>
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
''' <summary>
''' Execute the ZoomAll. This method is invoked by the ZoomAllCommand.
''' </summary>
Public Sub ZoomAll(ByVal param As Object)
Map.refSceneHostVM.MainScene.ZoomAll()
End Sub
#End Region ' ZoomAllCommand
#Region "TopViewCommand"
''' <summary>
''' Returns a command that do TopView.
''' </summary>
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
''' <summary>
''' Execute the TopView. This method is invoked by the TopViewCommand.
''' </summary>
Public Sub TopView(ByVal param As Object)
Map.refSceneHostVM.MainScene.TopView()
End Sub
#End Region ' TopViewCommand
#Region "FrontViewCommand"
''' <summary>
''' Returns a command that do FrontView.
''' </summary>
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
''' <summary>
''' Execute the FrontView. This method is invoked by the FrontViewCommand.
''' </summary>
Public Sub FrontView(ByVal param As Object)
Map.refSceneHostVM.MainScene.FrontView()
End Sub
#End Region ' FrontViewCommand
#Region "LeftViewCommand"
''' <summary>
''' Returns a command that do LeftView.
''' </summary>
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
''' <summary>
''' Execute the LeftView. This method is invoked by the LeftViewCommand.
''' </summary>
Public Sub LeftView(ByVal param As Object)
Map.refSceneHostVM.MainScene.LeftView()
End Sub
#End Region ' LeftViewCommand
#Region "BackViewCommand"
''' <summary>
''' Returns a command that do BackView.
''' </summary>
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
''' <summary>
''' Execute the BackView. This method is invoked by the BackViewCommand.
''' </summary>
Public Sub BackView(ByVal param As Object)
Map.refSceneHostVM.MainScene.BackView()
End Sub
#End Region ' BackViewCommand
#Region "RightViewCommand"
''' <summary>
''' Returns a command that do RightView.
''' </summary>
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
''' <summary>
''' Execute the RightView. This method is invoked by the RightViewCommand.
''' </summary>
Public Sub RightView(ByVal param As Object)
Map.refSceneHostVM.MainScene.RightView()
End Sub
#End Region ' RightViewCommand
#Region "IsoViewSWCommand"
''' <summary>
''' Returns a command that do IsoViewSW.
''' </summary>
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
''' <summary>
''' Execute the IsoViewSW. This method is invoked by the IsoViewSWCommand.
''' </summary>
Public Sub IsoViewSW(ByVal param As Object)
Map.refSceneHostVM.MainScene.IsoViewSW()
End Sub
#End Region ' IsoViewSWCommand
#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 Command(AddressOf IsoViewSE)
End If
Return m_cmdIsoViewSE
End Get
End Property
''' <summary>
''' Execute the IsoViewSW. This method is invoked by the IsoViewSECommand.
''' </summary>
Public Sub IsoViewSE(ByVal param As Object)
Map.refSceneHostVM.MainScene.IsoViewSE()
End Sub
#End Region ' IsoViewSECommand
#Region "ViewFromCPlaneCommand"
''' <summary>
''' Returns a command that do ViewFromCPlane.
''' </summary>
Public ReadOnly Property ViewFromCPlaneCommand As ICommand
Get
If m_cmdViewFromCPlane Is Nothing Then
m_cmdViewFromCPlane = New Command(AddressOf ViewFromCPlane)
End If
Return m_cmdViewFromCPlane
End Get
End Property
''' <summary>
''' Execute the ViewFromCPlane. This method is invoked by the ViewFromCPlaneCommand.
''' </summary>
Public Sub ViewFromCPlane(ByVal param As Object)
Map.refSceneHostVM.MainScene.CPlaneView()
End Sub
#End Region ' ViewFromCPlaneCommand
#End Region ' COMMANDS
End Class