BDG Scenario 3

BuildListItem (Class2.cls)

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "BuildListItem"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public Enum ProjectType
   prjBuild = 1
   prjConvert = 2
End Enum

Private m_sName As String
Private m_sLingoFile As String
Private m_sSourceDir As String
Private m_sDestDir As String
Private m_isEnabled As Boolean
Private m_eProjType As ProjectType

Public Property Get name() As String
   name = m_sName
End Property

Friend Property Let name(RHS As String)
   m_sName = RHS
End Property

Public Property Get LingoFile() As String
   LingoFile = m_sLingoFile
End Property

Friend Property Let LingoFile(RHS As String)
   m_sLingoFile = RHS
End Property

Public Property Get SourceDir() As String
   SourceDir = m_sSourceDir
End Property

Friend Property Let SourceDir(RHS As String)
   m_sSourceDir = RHS
End Property

Public Property Get DestinationDir() As String
   DestinationDir = m_sDestDir
End Property

Friend Property Let DestinationDir(RHS As String)
   m_sDestDir = RHS
End Property

Public Property Get Enabled() As String
   Enabled = m_isEnabled
End Property

Friend Property Let Enabled(RHS As String)
   m_isEnabled = RHS
End Property

Public Property Get ProjectType() As ProjectType
   ProjectType = m_eProjType
End Property

Friend Property Let ProjectType(RHS As ProjectType)
   m_eProjType = RHS
End Property

Public Property Get SmallIcon() As String
   If m_eProjType = prjBuild Then
      SmallIcon = IIf(m_isEnabled, "ebuild", "dbuild")
   Else
      SmallIcon = IIf(m_isEnabled, "econvert", "dconvert")
   End If
End Property

Public Function Process() As Boolean
   If m_eProjType = prjBuild Then
      CenterForm Build
      Set Build.m_buildInfo = Me
      Build.Show vbModal
      Process = Build.m_bKill
   Else
      CenterForm Convert
   End If
End Function