vbAccelerator - Contents of code file: cVBFileTypes.cls

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "cVBFileTypes"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public Enum EVBPFileTypes
   evbpForm = 0
   evbpClass = 1
   evbpModule = 2
   evbpUserControl = 3
   evbpPropertyPage = 4
   evbpUserDocument = 5
   evbpResourceFile = 6
   evbpRelatedFile = 7
   evbpControl = 8
   evbpReference = 9
   evbpBinary = 10
   evbpAssociatedBinary = 11
End Enum

Private m_bIncludeInZip(0 To 11) As Boolean

Public Property Get IncludeInZip(ByVal eType As EVBPFileTypes) As Boolean
   IncludeInZip = m_bIncludeInZip(eType)
End Property
Public Property Let IncludeInZip(ByVal eType As EVBPFileTypes, ByVal bState As
 Boolean)
   m_bIncludeInZip(eType) = bState
End Property

Public Property Get Description(ByVal eType As EVBPFileTypes) As String
   Select Case eType
   Case evbpForm
      Description = "Form"
   Case evbpClass
      Description = "Class"
   Case evbpModule
      Description = "Module"
   Case evbpUserControl
      Description = "UserControl"
   Case evbpUserDocument
      Description = "UserDocument"
   Case evbpResourceFile
      Description = "Resource File"
   Case evbpRelatedFile
      Description = "Related File"
   Case evbpControl
      Description = "Control Dependency"
   Case evbpReference
      Description = "Reference Dependency"
   Case evbpBinary
      Description = "Project Binary"
   Case evbpAssociatedBinary
      Description = "Project Binary Associated Files"
   Case evbpPropertyPage
      Description = "Property Page"
   End Select

End Property

Public Sub Persist(cR As cRegistry)
Dim i As Long
   cR.ValueType = REG_DWORD
   For i = 0 To 11
      cR.ValueKey = "SaveType" & i
      cR.Value = CLng(Abs(m_bIncludeInZip(i)))
   Next i
End Sub
Public Function Restore(cR As cRegistry) As Boolean
Dim i As Long
   cR.ValueType = REG_DWORD
   cR.Default = 0
   For i = 0 To 11
      cR.ValueKey = "SaveType" & i
      m_bIncludeInZip(i) = (cR.Value <> 0)
   Next i
   Restore = True
End Function

Private Sub Class_Initialize()

   m_bIncludeInZip(evbpForm) = True
   m_bIncludeInZip(evbpClass) = True
   m_bIncludeInZip(evbpModule) = True
   m_bIncludeInZip(evbpUserControl) = True
   m_bIncludeInZip(evbpUserDocument) = True
   m_bIncludeInZip(evbpResourceFile) = True
   m_bIncludeInZip(evbpRelatedFile) = True
   m_bIncludeInZip(evbpBinary) = True
   m_bIncludeInZip(evbpPropertyPage) = True
   
End Sub