This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
Are-You-Not-Edutained/TeacherForms/frmTeacherBreakdown.vb
2014-01-15 16:18:42 +00:00

24 lines
No EOL
947 B
VB.net

Public Class frmTeacherBreakdown
'Subroutine runs when the form loads
Private Sub frmTeacherBreakdown_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Declares the variable used to read the teacher breakdown text file
Dim Reader As System.IO.StreamReader
'Places the logged-in teacher's name onto the form
lblBreakdown.Text = LoggedInTeacher.Fname & " " & LoggedInTeacher.Lname & " Question Breakdown"
'Gets the path to the logged-in teacher's breakdown text file
Reader = My.Computer.FileSystem.OpenTextFileReader(LoggedInTeacher.Username & ".txt")
'Whilst the end of the text file hasn't been reached...
While Not Reader.EndOfStream
'Adds a line to the breakdown listbox
lstBreakdown.Items.Add(Reader.ReadLine)
End While
'Closes the recordset
Reader.Close()
End Sub
End Class