Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5

Public Class FeatureListVM
   Inherits VMBase

   Private m_colFeature_Do As EgtDataGridColumn
   Public ReadOnly Property colFeature_Do As EgtDataGridColumn
      Get
         Return m_colFeature_Do
      End Get
   End Property

   Private m_FeatureColumns As New ObservableCollection(Of EgtDataGridColumn)
   Public Property FeatureColumns As ObservableCollection(Of EgtDataGridColumn)
      Get
         Return m_FeatureColumns
      End Get
      Set(value As ObservableCollection(Of EgtDataGridColumn))
         m_FeatureColumns = value
      End Set
   End Property

   Private m_FeatureList_IsEnabled As Boolean = True
   Public Property FeatureList_IsEnabled As Boolean
      Get
         Return m_FeatureList_IsEnabled
      End Get
      Set(value As Boolean)
         m_FeatureList_IsEnabled = value
      End Set
   End Property

#Region "Messages"

   Public ReadOnly Property Description_Msg As String
      Get
         Return EgtMsg(61603)
      End Get
   End Property

#End Region    ' Messages

   Sub New()
      ' creo riferimento in Map
      Map.SetRefFeatureListVM(Me)
      ' carico le colonne della datagrid
      GetPrivateProfileColumns(S_FEATURELIST, FeatureColumns)
      ' recupero riferimento a colonna Do
      m_colFeature_Do = FeatureColumns.FirstOrDefault(Function(x) x.Name = COL_DO)
   End Sub

   Friend Sub SetBTLFeatureListIsEnabled(bIsEnabled As Boolean)
      m_FeatureList_IsEnabled = bIsEnabled
      NotifyPropertyChanged(NameOf(FeatureList_IsEnabled))
   End Sub

End Class
