Imports System.IO

Public Class ProdFile

   'Private m_nProjId As Integer = 0
   'Public ReadOnly Property nProjId As Integer
   '   Get
   '      Return m_nProjId
   '   End Get
   'End Property

   'Friend ReadOnly Property sProjPath As String
   '   Get
   '      Dim sPath As String = String.Empty
   '      If IsNothing(m_nProjId) OrElse m_nProjId = 0 Then Return String.Empty
   '      sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR
   '      If Not IsNothing(m_nProdId) AndAlso m_nProdId > 0 Then
   '         sPath &= nProjId.ToString("0000")
   '      End If
   '      sPath &= FILENAMESEPARATOR & BTLFileName & ".nge"
   '      Return sPath
   '   End Get
   'End Property

   Private m_nProdId As Integer = 0
   Public ReadOnly Property nProdId As Integer
      Get
         Return m_nProdId
      End Get
   End Property
   Friend ReadOnly Property sProdPath As String
      Get
         Dim sPath As String = String.Empty
         If IsNothing(m_nProdId) OrElse m_nProdId = 0 Then Return String.Empty
         Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
      End Get
   End Property

   'Private m_BTLFileName As String = String.Empty
   'Public ReadOnly Property BTLFileName As String
   '   Get
   '      Return m_BTLFileName
   '   End Get
   'End Property

   Private m_NewProd As Boolean
   Friend Property NewProd As Boolean
      Get
         Return m_NewProd
      End Get
      Set(value As Boolean)
         m_NewProd = value
      End Set
   End Property
   Public ReadOnly Property ProjectFileName As String
      Get
         Return m_nProdId.ToString("0000")
      End Get
   End Property

   Sub New(ProdFileName As String)
      Integer.TryParse(Path.GetFileNameWithoutExtension(ProdFileName), m_nProdId)
   End Sub

   Friend Sub SetProdId(nProdId As Integer)
      m_nProdId = nProdId
   End Sub

End Class