Files
egtbeamwall/EgtBEAMWALL.Core/ViewPanel/ViewPanelVM.vb
T
Emmanuele Sassi 44e97c3452 - aggiornamento icone
- introdotto calcolo volume dato contorno pareti
- aggiunta in supervisore gestione tabella MDI
- aggiunto salvataggio progetto dopo aggiornamento duplo
- girate tutte le viste per macchine inverse, anche in supervisore
- nacosti pezzi quando in ottimizzatore o supervisore senza Machgroup
- scritte BTLPartList in verde se raggiunta quantita' INPROD
- aggiunta gestione bottoni abilitati/disabilitati a seconda degli elementi selezionati
- introdotta modifica dimensioni grezzi
- corretto errore che non impostava corretamente progetto quando aperto da ottimizzatore
- smontato assemblato prima di eseguire alcuni comandi per poi ripristinarlo
2022-01-13 20:45:37 +01:00

246 lines
8.0 KiB
VB.net

Imports EgtBEAMWALL.Core.ConstBeam
Imports EgtUILib
Public Class ViewPanelVM
Inherits EgtWPFLib5.ViewPanelVM
' Tipo di progetto aperto
Private Shared m_Type As BWType
' Posizione vista
Private Shared m_nViewDir As VT
Public Shared Function BWSetView(nView As VT, Optional bRedraw As Boolean = True)
' condizioni che cambiano la vista del progetto
Select Case m_Type
Case BWType.BEAM
EgtSetView(VT.ISO_SW, bRedraw)
Case BWType.WALL
Select Case nView
Case VT.TOP
Select Case m_nViewDir
Case VT.ISO_SW, VT.ISO_SE
EgtSetGenericView(0, -90, bRedraw) ' equivalente a vista TOP
Case VT.ISO_NW, VT.ISO_NE
EgtSetGenericView(0, 90, bRedraw) ' equivalente a vista TOP ruotata di 180 su Z
End Select
Case VT.FRONT
Select Case m_nViewDir
Case VT.ISO_SW, VT.ISO_SE
EgtSetGenericView(90, -90, bRedraw) ' equivalente a vista FRONT
Case VT.ISO_NW, VT.ISO_NE
EgtSetGenericView(90, 90, bRedraw) ' equivalente a vista FRONT ruotata di 180 su Z
End Select
Case VT.BACK
Select Case m_nViewDir
Case VT.ISO_SW, VT.ISO_SE
EgtSetGenericView(-90, -90, bRedraw) ' equivalente a vista BACK
Case VT.ISO_NW, VT.ISO_NE
EgtSetGenericView(-90, 90, bRedraw) ' equivalente a vista BACK ruotata di 180 su Z
End Select
Case VT.RIGHT
Select Case m_nViewDir
Case VT.ISO_SW, VT.ISO_SE
EgtSetGenericView(90, 0, bRedraw) ' equivalente a vista RIGHT
Case VT.ISO_NW, VT.ISO_NE
EgtSetGenericView(-90, 0, bRedraw) ' equivalente a vista RIGHT ruotata di 180 su Z
End Select
Case VT.LEFT
Select Case m_nViewDir
Case VT.ISO_SW, VT.ISO_SE
EgtSetGenericView(-90, 0, bRedraw) ' equivalente a vista LEFT
Case VT.ISO_NW, VT.ISO_NE
EgtSetGenericView(90, 0, bRedraw) ' equivalente a vista LEFT ruotata di 180 su Z
End Select
Case VT.ISO_SW
Select Case m_nViewDir
Case VT.ISO_SW, VT.ISO_SE
EgtSetGenericView(60, 225, bRedraw) ' equivalente a vista ISO_SW
Case VT.ISO_NW, VT.ISO_NE
EgtSetGenericView(60, 45, bRedraw) ' equivalente a vista ISO_SW ruotata di 180 su Z
End Select
Case Else ' VT.ISO_SW
Select Case m_nViewDir
Case VT.ISO_SW, VT.ISO_SE
EgtSetGenericView(60, 225, bRedraw) ' equivalente a vista ISO_SW
Case VT.ISO_NW, VT.ISO_NE
EgtSetGenericView(60, 45, bRedraw) ' equivalente a vista ISO_SW ruotata di 180 su Z
End Select
End Select
End Select
End Function
Public Shared Sub UpdateMachParam(ViewDir As Integer)
m_nViewDir = ViewDir
End Sub
Public Shared Sub UpdateBWType(Type As BWType)
m_Type = Type
End Sub
#Region "COMMANDS"
#Region "TopViewCommand"
''' <summary>
''' Execute the TopView. This method is invoked by the TopViewCommand.
''' </summary>
Public Overrides Sub TopView(ByVal param As Object)
ViewPanelVM.BWSetView(VT.TOP, True)
End Sub
#End Region ' TopViewCommand
#Region "FrontViewCommand"
''' <summary>
''' Execute the FrontView. This method is invoked by the FrontViewCommand.
''' </summary>
Public Overrides Sub FrontView(ByVal param As Object)
ViewPanelVM.BWSetView(VT.FRONT, True)
End Sub
#End Region ' FrontViewCommand
#Region "LeftViewCommand"
''' <summary>
''' Execute the LeftView. This method is invoked by the LeftViewCommand.
''' </summary>
Public Overrides Sub LeftView(ByVal param As Object)
ViewPanelVM.BWSetView(VT.LEFT, True)
End Sub
#End Region ' LeftViewCommand
#Region "BackViewCommand"
''' <summary>
''' Execute the BackView. This method is invoked by the BackViewCommand.
''' </summary>
Public Overrides Sub BackView(ByVal param As Object)
ViewPanelVM.BWSetView(VT.BACK, True)
End Sub
#End Region ' BackViewCommand
#Region "RightViewCommand"
''' <summary>
''' Execute the RightView. This method is invoked by the RightViewCommand.
''' </summary>
Public Overrides Sub RightView(ByVal param As Object)
ViewPanelVM.BWSetView(VT.RIGHT, True)
End Sub
#End Region ' RightViewCommand
'#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 IsoViewSE. This method is invoked by the IsoViewSECommand.
' ''' </summary>
' Public Sub IsoViewSE(ByVal param As Object)
' LibMap.refSceneHostVM.MainScene.IsoViewSE()
' End Sub
'#End Region ' IsoViewSECommand
#Region "IsoViewSWCommand"
''' <summary>
''' Execute the IsoViewSW. This method is invoked by the IsoViewSWCommand.
''' </summary>
Public Overrides Sub IsoViewSW(ByVal param As Object)
ViewPanelVM.BWSetView(VT.ISO_SW, True)
End Sub
#End Region ' IsoViewSWCommand
'#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 Command(AddressOf IsoViewNE)
' 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)
' LibMap.refSceneHostVM.MainScene.IsoViewNE()
' End Sub
'#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 Command(AddressOf IsoViewNW)
' 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)
' LibMap.refSceneHostVM.MainScene.IsoViewNW()
' End Sub
'#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 Command(AddressOf ViewToCPlane)
' 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)
' LibMap.refSceneHostVM.MainScene.CPlaneView()
' End Sub
'#End Region ' ViewToCPlaneCommand
#End Region ' COMMANDS
End Class