Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function CorrectUsernamePassword() As Boolean
- Dim UserPasFile As New StreamReader("UsernamePassword.txt", False)
- Do Until UserPasFile.EndOfStream
- Dim Line As String = UserPasFile.ReadLine()
- If Line <> "" Then
- Dim CommaIndex As Byte = Line.IndexOf(",")
- If CommaIndex >= 0 Then
- If Line.Substring(0, CommaIndex) = txtUsernameLog.Text And Line.Substring(CommaIndex + 1, Line.Length - (CommaIndex + 1)) = Password Then
- Return True
- End If
- End If
- End If
- Loop
- UserPasFile.Close()
- Return False
- End Function
- Private Sub RemoveDefaultData(ByRef TxtBoxChanged As TextBox, DefaultTxt As String)
- If TxtBoxChanged.Text = DefaultTxt Then
- TxtBoxChanged.Text = ""
- End If
- End Sub
- Private Sub AddDefaultData(ByRef TxtBoxChanged As TextBox, DefaultTxt As String)
- If TxtBoxChanged.Text = "" Then
- TxtBoxChanged.Text = DefaultTxt
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement