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

Option Explicit

Public Name As String
Private Frames() As String

Public Sub Initialize()
    Name = ""
    ReDim Frames(0)
End Sub

Public Function FrameCount() As Long
    Dim i As Integer
    Dim Count As Long
    
    On Error GoTo Error
    For i = 0 To UBound(Frames)
        If Frames(i) <> "" Then
            Count = Count + 1
        End If
    Next
    
Error:
    FrameCount = Count
End Function

Public Sub AddFrame(Buffer As String)
    ReDim Preserve Frames(UBound(Frames) + 1)
    Frames(UBound(Frames)) = Buffer
End Sub

Public Sub Create(Filename As String)
    Initialize
    Name = Filename
    ReDim Frames(0)
    Frames(0) = Filename
End Sub

Public Sub RemoveFrame(ByVal Index As Integer)
    On Error Resume Next
    Frames(Index) = ""
End Sub

Public Sub CreateFrameList()
    Dim Index As Integer

    With FrmImportSequence
    .LstSubframes.Clear
    For Index = 0 To UBound(Frames)
        If Frames(Index) <> "" Then
            .LstSubframes.AddItem GetFilename(Frames(Index))
            .LstSubframes.ItemData(.LstSubframes.NewIndex) = Index
        End If
    Next
    End With
End Sub

Public Sub GetFrames(Buffer() As String)
    Dim Index As Integer
    Dim Count As Integer
    
    On Error GoTo Error
    ReDim Buffer(FrameCount - 1)
    For Index = 0 To UBound(Frames)
        If Frames(Index) <> "" Then
            Buffer(Count) = Frames(Index)
        End If
        Count = Count + 1
    Next
Error:
End Sub
