Public Class FrmFifo
    Inherits System.Windows.Forms.Form

    Private mObj As NHenry.Scandir.ClsFifoStr

#Region " Code généré par le Concepteur Windows Form "

    Public Sub New()
        MyBase.New()

        'Cet appel est requis par le Concepteur Windows Form.
        InitializeComponent()

        'Ajoutez une initialisation quelconque après l'appel InitializeComponent()

    End Sub

    'La méthode substituée Dispose du formulaire pour nettoyer la liste des composants.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Requis par le Concepteur Windows Form
    Private components As System.ComponentModel.IContainer

    'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
    'Elle peut être modifiée en utilisant le Concepteur Windows Form.  
    'Ne la modifiez pas en utilisant l'éditeur de code.
    Friend WithEvents CmdRemplir As System.Windows.Forms.Button
    Friend WithEvents CmdRead As System.Windows.Forms.Button
    Friend WithEvents Lst As System.Windows.Forms.ListBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.CmdRemplir = New System.Windows.Forms.Button
        Me.Lst = New System.Windows.Forms.ListBox
        Me.CmdRead = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'CmdRemplir
        '
        Me.CmdRemplir.Location = New System.Drawing.Point(61, 26)
        Me.CmdRemplir.Name = "CmdRemplir"
        Me.CmdRemplir.Size = New System.Drawing.Size(81, 29)
        Me.CmdRemplir.TabIndex = 0
        Me.CmdRemplir.Text = "&Remplir"
        '
        'Lst
        '
        Me.Lst.Location = New System.Drawing.Point(50, 68)
        Me.Lst.Name = "Lst"
        Me.Lst.Size = New System.Drawing.Size(257, 264)
        Me.Lst.TabIndex = 1
        '
        'CmdRead
        '
        Me.CmdRead.Location = New System.Drawing.Point(154, 27)
        Me.CmdRead.Name = "CmdRead"
        Me.CmdRead.Size = New System.Drawing.Size(73, 32)
        Me.CmdRead.TabIndex = 2
        Me.CmdRead.Text = "&Read"
        '
        'FrmFifo
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(524, 448)
        Me.Controls.Add(Me.CmdRead)
        Me.Controls.Add(Me.Lst)
        Me.Controls.Add(Me.CmdRemplir)
        Me.Name = "FrmFifo"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "FrmFifo"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub FrmFifo_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        mObj = Nothing
    End Sub

    Private Sub FrmFifo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        mObj = New NHenry.Scandir.ClsFifoStr
    End Sub

    Private Sub CmdRemplir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdRemplir.Click
        Dim i As Integer
        For i = 0 To 30
            mObj.PushData(CStr(i))
        Next
    End Sub

    Private Sub CmdRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdRead.Click
        Lst.Items.Clear()
        mObj.Sorted()
        Do While mObj.Count > 0
            Lst.Items.Add(mObj.PopData())
        Loop
    End Sub
End Class
