Option Explicit
Imports System
Imports System.IO
Imports System.ComponentModel
Imports System.Collections

Public Class Events

  Protected numLanes As Integer
  Protected swmmers As Swimmers
  '-----
  Public Sub New(ByVal Filename As String, ByVal lanes As Integer)
    MyBase.New()
    Dim s As String
    Dim sw As Swimmer
    Dim fl As vbFile

    fl = New vbFile(Filename)     'otwarcie pliku
    fl.OpenForRead()

    numLanes = lanes              'liczba torów basenu
    swmmers = New Swimmers()      'lista pływaków

    'wczytanie pływaków z pliku
    s = fl.readLine

    While Not fl.fEOF
      sw = New Swimmer(s)    'utworzenie nowego pływaka
      swmmers.Add(sw)        'dodanie do listy
      s = fl.readLine        'wczytanie danych o następnym
    End While

    fl.closeFile()

  End Sub
  '-----
  Public Function getSwimmers() As ArrayList
    getSwimmers = swmmers
  End Function
  '-----
  Public Overridable Function isPrelim() As Boolean
  End Function
  '-----
  Public Overridable Function isFinal() As Boolean
  End Function
  '-----
  Public Overridable Function isTimedFinal() As Boolean
  End Function
  '-----
  Public Overridable Function getSeeding() As Seeding
  End Function

End Class

