Files
egtbeamwall/EgtBEAMWALL.ViewerOptimizer/ShowBeamPanel/ShowBeamPanelVM.vb
T
Emmanuele Sassi 8e8d1c2a91 - Migliorata gestione assemblato non presente
- Correzione viste per travi
- Introdotto s/blocco dei duplo
- Introdotta traduzione dei messaggi macchina
- Migliorata gestione attivazione bottoni
- Bloccate colonne in edit durante Calc
- Aggiornamento quantita' in prod dopo cambio dimensioni
- Impedito Flip e Rot durante Calc
- Limitata considerazione pezzi in nesting a quelli ancora da aggiungere
- Gestione errori import BTL con messaggio errori
2022-01-29 10:24:24 +01:00

161 lines
4.5 KiB
VB.net

Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class ShowBeamPanelVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_bShowAll As Boolean = True
Friend Property bShowAll As Boolean
Get
Return m_bShowAll
End Get
Set(value As Boolean)
m_bShowAll = value
If m_bShowAll Then
m_ShowSolid_IsEnabled = False
m_ShowBuilding_IsEnabled = Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.BTLStructureM.nAsseBaseId <> GDB_ID.NULL
Else
m_ShowSolid_IsEnabled = True
m_ShowBuilding_IsEnabled = False
End If
UpdatePartBtnIsEnabled()
NotifyPropertyChanged(NameOf(ShowSolid_IsEnabled))
NotifyPropertyChanged(NameOf(ShowBuilding_IsEnabled))
End Set
End Property
Private m_bShowSolid As Boolean
Public Property ShowSolid_IsChecked As Boolean
Get
Return m_bShowSolid
End Get
Set(value As Boolean)
m_bShowSolid = value
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then Map.refProjectVM.BTLStructureVM.ShowSolid()
End Set
End Property
Friend Sub SetShowSolid(bValue As Boolean)
If m_bShowSolid = bValue Then Return
ShowSolid_IsChecked = bValue
NotifyPropertyChanged(NameOf(ShowSolid_IsChecked))
End Sub
Private m_bShowBuilding As Boolean
Public Property ShowBuilding_IsChecked As Boolean
Get
Return m_bShowBuilding
End Get
Set(value As Boolean)
m_bShowBuilding = value
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then Map.refProjectVM.BTLStructureVM.ShowBuilding(m_bShowBuilding)
End Set
End Property
Friend Sub SetShowBuilding(bValue As Boolean)
m_bShowBuilding = bValue
NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked))
End Sub
Private m_ShowSolid_IsEnabled As Boolean
Public Property ShowSolid_IsEnabled As Boolean
Get
Return m_ShowSolid_IsEnabled
End Get
Set(value As Boolean)
m_ShowSolid_IsEnabled = value
End Set
End Property
Private m_ShowBuilding_IsEnabled As Boolean
Public Property ShowBuilding_IsEnabled As Boolean
Get
Return m_ShowBuilding_IsEnabled
End Get
Set(value As Boolean)
m_ShowBuilding_IsEnabled = value
End Set
End Property
#Region "ToolTip"
Public ReadOnly Property ShowAll_ToolTip As String
Get
Return EgtMsg(61925)
End Get
End Property
Public ReadOnly Property ShowSolid_ToolTip As String
Get
Return EgtMsg(61926)
End Get
End Property
Public ReadOnly Property ShowBuilding_ToolTip As String
Get
Return EgtMsg(61927)
End Get
End Property
#End Region
' Definizione comandi
Private m_cmdShowAll As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
'Creo riferimento a questa classe in EgtBeamWALL
Map.SetRefShowBeamPanelVM(Me)
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Private Sub UpdatePartBtnIsEnabled()
Map.refCALCPanelVM.PartShowAllChanged()
Map.refLeftPanelVM.PartShowAllChanged()
End Sub
#End Region ' METHODS
#Region "COMMANDS"
#Region "ShowAll"
Public ReadOnly Property ShowAll_Command As ICommand
Get
If m_cmdShowAll Is Nothing Then
m_cmdShowAll = New Command(AddressOf ShowAll)
End If
Return m_cmdShowAll
End Get
End Property
Public Sub ShowAll(Optional bDraw As Boolean = True)
If IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
' se necessario tolgo solido dal precedentemente selezionato
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso m_bShowSolid Then
Map.refShowBeamPanelVM.SetShowSolid(False)
End If
' nascondo barra del pezzo
Map.refProjectVM.SetPartManager_Visibility(False)
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
' mostro in parte bassa dati BTL
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.STRUCTURE_)
' mostro tutti i pezzi
Map.refProjectVM.BTLStructureVM.ShowAll(False)
' se attivata opzione, li assemblo
Map.refProjectVM.BTLStructureVM.ShowBuilding(If(Map.refMainMenuVM.SelPage = Pages.VIEW, ShowBuilding_IsChecked, False), False)
If bDraw Then EgtDraw()
End Sub
#End Region ' ShowAll
#End Region ' COMMANDS
End Class