Public Class ListAdapter
  'Adapter kontrolki ListBox 
  'Emulujący jej wersję z Visual Basic 6 
  Private List As ListBox         'Instancja kontrolki
  '--------
  Public Sub New(ByVal ls As ListBox)
    List = ls
  End Sub
  '--------
  Public Sub addItem(ByVal s As String)
    List.Items.Add(s)             'Dodaj do listy
  End Sub
  '--------
  Public Function ListIndex() As Integer
    Return List.SelectedIndex     'Pobierz indeks
  End Function
  '--------
  Public Sub addText(ByVal sw As Swimmer)
    List.Items.Add(sw.getName & vbTab & sw.getTime.ToString)
  End Sub

End Class
