647614e67e
-Eliminato classi e pagine nascoste -Rinominato pagine e classi
151 lines
4.0 KiB
VB.net
151 lines
4.0 KiB
VB.net
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class FeatureManagerVM
|
|
Inherits VMBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Private m_FeatureManager_IsEnabled As Boolean = True
|
|
Public Property FeatureManager_IsEnabled As Boolean
|
|
Get
|
|
Return m_FeatureManager_IsEnabled
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_FeatureManager_IsEnabled = value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Private m_Variant_Visibility As Visibility = Visibility.Collapsed
|
|
Public ReadOnly Property Variant_Visibility As Visibility
|
|
Get
|
|
Return m_Variant_Visibility
|
|
End Get
|
|
End Property
|
|
Public Sub SetVariant_Visibility(value As Visibility)
|
|
m_Variant_Visibility = value
|
|
NotifyPropertyChanged(NameOf(Variant_Visibility))
|
|
End Sub
|
|
|
|
Public ReadOnly Property Edit_IsEnabled As Boolean
|
|
Get
|
|
Return m_FeatureManager_IsEnabled AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso
|
|
Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 AndAlso
|
|
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0)) AndAlso
|
|
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM) AndAlso
|
|
Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.BTLFeatureM.IsFreeContour() AndAlso
|
|
Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.bDO
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Priority_Visibility As Visibility
|
|
Get
|
|
Return If(CurrentMachine.nType = Core.ConstBeam.MachineType.WALL AndAlso CurrentMachine.bIsEnabledPriority, Visibility.Visible, Visibility.Collapsed)
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property Face_Msg As String
|
|
Get
|
|
Return EgtMsg(61824)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Group_Msg As String
|
|
Get
|
|
Return EgtMsg(61825)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Priority_Msg As String
|
|
Get
|
|
Return EgtMsg(61895)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Edit_Msg As String
|
|
Get
|
|
Return EgtMsg(61826)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Save_Msg As String
|
|
Get
|
|
Return EgtMsg(61827)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Cancel_Msg As String
|
|
Get
|
|
Return EgtMsg(61828)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MacroFeature_ToolTip As String
|
|
Get
|
|
Return EgtMsg(61909)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Messages
|
|
|
|
' Definisco i comandi
|
|
Private m_cmdMacroFeature As ICommand
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTORS"
|
|
|
|
Sub New()
|
|
' imposto riferimento in Map
|
|
Map.SetRefFeatureManagerVM(Me)
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTORS
|
|
|
|
#Region "METHODS"
|
|
|
|
Friend Sub SetFeatureManagerIsEnabled(bIsEnabled As Boolean)
|
|
m_FeatureManager_IsEnabled = bIsEnabled
|
|
NotifyPropertyChanged(NameOf(FeatureManager_IsEnabled))
|
|
NotifyPropertyChanged(NameOf(Edit_IsEnabled))
|
|
End Sub
|
|
|
|
Friend Sub SetEditIsEnabled()
|
|
' aggiorno stato abilitazione del bottone modifica free contour
|
|
NotifyPropertyChanged(NameOf(Edit_IsEnabled))
|
|
End Sub
|
|
|
|
#End Region ' METHODS
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "MacroFeature"
|
|
|
|
Public ReadOnly Property MacroFeature_Command As ICommand
|
|
Get
|
|
If m_cmdMacroFeature Is Nothing Then
|
|
m_cmdMacroFeature = New Command(AddressOf MacroFeature)
|
|
End If
|
|
Return m_cmdMacroFeature
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub MacroFeature()
|
|
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
|
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
|
|
' apro finestra di creazione macro
|
|
Dim MacroFeatureWndVM As New MacroFeatureWndVM()
|
|
Dim MacroFeatureWnd As New MacroFeatureWnd(Application.Current.MainWindow, MacroFeatureWndVM)
|
|
If MacroFeatureWnd.ShowDialog() Then
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' MacroFeature
|
|
|
|
#End Region ' Commands
|
|
|
|
End Class
|