Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtUILib

Public Class ProjectFileVM
   Inherits VMBase

   Protected m_ProjectFileM As ProjectFileM

   Public Overridable ReadOnly Property nProjId As Integer
      Get
         Return m_ProjectFileM.nProjId
      End Get
   End Property

   Public Overridable ReadOnly Property nProdId As Integer
      Get
         Return m_ProjectFileM.nProdId
      End Get
   End Property

   Friend Overridable ReadOnly Property sProjDirPath As String
      Get
         If IsNothing(m_ProjectFileM.nProjId) OrElse m_ProjectFileM.nProjId = 0 Then Return String.Empty
         Return refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000")
      End Get
   End Property
   Friend Overridable ReadOnly Property sProjPath As String
      Get
         Dim sPath As String = String.Empty
         If IsNothing(m_ProjectFileM.nProjId) OrElse m_ProjectFileM.nProjId = 0 Then Return String.Empty
         sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
         Return sPath
      End Get
   End Property

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

   Public Overridable Property bIsNew As Boolean
      Get
         Return m_ProjectFileM.bIsNew
      End Get
      Set(value As Boolean)
         m_ProjectFileM.bIsNew = value
      End Set
   End Property

   Private Property m_bIsLocked As Boolean = False
   Public Overridable Property bIsLocked As Boolean
      Get
         Return m_bIsLocked
      End Get
      Set(value As Boolean)
         m_bIsLocked = value
      End Set
   End Property

#Region "CONSTRUCTORS"

#End Region    ' CONSTRUCTORS

End Class