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

Public Class BTLPartListVM
   Inherits vmbase

   Private m_colPart_Do As EgtDataGridColumn
   Public ReadOnly Property colPart_Do As EgtDataGridColumn
      Get
         Return m_colPart_Do
      End Get
   End Property

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

   Private m_PartList_IsEnabled As Boolean = True
   Public Property PartList_IsEnabled As Boolean
      Get
         Return m_PartList_IsEnabled
      End Get
      Set(value As Boolean)
         m_PartList_IsEnabled = value
      End Set
   End Property

#Region "Messages"

   Public ReadOnly Property PDN_Msg As String
      Get
         Return EgtMsg(61809)
      End Get
   End Property

   Public ReadOnly Property DO_Msg As String
      Get
         Return EgtMsg(61810)
      End Get
   End Property

   Public ReadOnly Property W_Msg As String
      Get
         Return EgtMsg(61605)
      End Get
   End Property

   Public ReadOnly Property H_Msg As String
      Get
         Return EgtMsg(61606)
      End Get
   End Property

   Public ReadOnly Property L_Msg As String
      Get
         Return EgtMsg(61604)
      End Get
   End Property

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

   Public ReadOnly Property MAT_Msg As String
      Get
         Return EgtMsg(61607)
      End Get
   End Property

   Public ReadOnly Property CNT_Msg As String
      Get
         Return EgtMsg(61608)
      End Get
   End Property
   Public ReadOnly Property ShortCNT_Msg As String
      Get
         Return EgtMsg(61952)
      End Get
   End Property

   Public ReadOnly Property ADDED_Msg As String
      Get
         Return EgtMsg(61813)
      End Get
   End Property
   Public ReadOnly Property ShortADDED_Msg As String
      Get
         Return EgtMsg(61953)
      End Get
   End Property
   Public ReadOnly Property INPROD_Msg As String
      Get
         Return EgtMsg(61609)
      End Get
   End Property
   Public ReadOnly Property ShortINPROD_Msg As String
      Get
         Return EgtMsg(61954)
      End Get
   End Property
   Public ReadOnly Property DONE_Msg As String
      Get
         Return EgtMsg(61814)
      End Get
   End Property
   Public ReadOnly Property ShortDONE_Msg As String
      Get
         Return EgtMsg(61955)
      End Get
   End Property

   Public ReadOnly Property GRP_Msg As String
      Get
         Return EgtMsg(61624)
      End Get
   End Property

   Public ReadOnly Property STOREY_Msg As String
      Get
         Return EgtMsg(61623)
      End Get
   End Property

#End Region    ' Messages

   Sub New()
      ' creo riferimento in Map
      Map.SetRefPartListVM(Me)
      ' carico le colonne della datagrid
      GetPrivateProfileColumns(S_PARTLIST, PartColumns)
      ' recupero riferimento a colonna Do
      m_colPart_Do = PartColumns.FirstOrDefault(Function(x) x.Name = COL_DO)
   End Sub

   Friend Sub SetBTLPartListIsEnabled(bIsEnabled As Boolean)
      m_PartList_IsEnabled = bIsEnabled
      NotifyPropertyChanged(NameOf(PartList_IsEnabled))
   End Sub

End Class
