Imports System.Collections.ObjectModel Imports System.Collections.Specialized Imports System.ComponentModel Imports EgtBEAMWALL.Core Imports EgtUILib Imports EgtWPFLib5 Public Class BTLFeatureVM Inherits Core.BTLFeatureVM Public Overrides Property bDO As Boolean Get Return m_BTLFeatureM.bDO End Get Set(value As Boolean) If EgtBeamEnableProcess(nFeatureId, value) Then m_BTLFeatureM.bDO = value EgtDraw() NotifyPropertyChanged("Calc_Background") NotifyPropertyChanged("bDO") End If End Set End Property #Region "CONSTRUCTOR" Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM) m_BTLFeatureM = BTLFeatureM 'AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded 'AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded m_BTLPartM = BTLPartM 'CreatePBTLParamVMList() 'CreateQBTLParamVMList() NotifyPropertyChanged(NameOf(Calc_Background)) End Sub Sub New(BTLFeatureM As BTLFeatureM) m_BTLFeatureM = BTLFeatureM 'AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded 'AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded m_BTLPartM = Nothing 'CreatePBTLParamVMList() 'CreateQBTLParamVMList() NotifyPropertyChanged(NameOf(Calc_Background)) End Sub #End Region ' CONSTRUCTOR #Region "METHODS" ' funzione che aggiorna lo stato e gli errori dopo calcolo Friend Sub CalcFeatureUpdate(ERR As Integer, ROT As Integer, MSG As String) EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_ERR, ITG_PROD_ERR), ERR, True) EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_MSG, ITG_PROD_MSG), MSG, True) EgtSetInfo(nFeatureId, If(Map.refMainMenuVM.SelPage = Pages.VIEW, ITG_PROJ_ROT, ITG_PROD_ROT), ROT, True) m_BTLFeatureM.nCALC_ERR = ERR m_BTLFeatureM.nCALC_ROT = ROT m_BTLFeatureM.sCALC_MSG = MSG If ERR = 0 Then m_BTLFeatureM.nState = CalcStates.OK ElseIf ERR = 17 Then m_BTLFeatureM.nState = CalcStates.WARNING ElseIf ERR > 0 Then m_BTLFeatureM.nState = CalcStates.ERROR_ ElseIf ERR < 0 Then m_BTLFeatureM.nState = Core.CalcStates.INFO End If NotifyPropertyChanged(NameOf(Calc_Background)) NotifyPropertyChanged(NameOf(CALC_ROT_Visibility)) NotifyPropertyChanged(NameOf(CALC_ERR_Letter)) NotifyPropertyChanged(NameOf(CALC_ERR_Foreground)) End Sub #End Region ' METHODS #Region "COMMANDS" #End Region ' COMMANDS End Class