
Код: Выделить всё
Public Class Form1
Dim n As Integer
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
FileOpen(1, "parol.txt", OpenMode.Input, OpenAccess.Read)
Dim l, p As String
l = LineInput(1)
p = LineInput(1)
n = LineInput(1)
FileClose(1)
If n >= 3 Then
End
MsgBox("Превышено число неправильных вводов!", MsgBoxStyle.Critical, "Внимание")
End
Else
If l = TextBox1.Text And p = TextBox2.Text Then
MsgBox("Привет!", MsgBoxStyle.Critical, "Внимание")
Primer(l, p, 0)
Else
MsgBox("Логин или пароль не верные!", MsgBoxStyle.Critical, "Внимание")
n = n + 1
Primer(l, p, n)
End
End Sub
Sub Primer(ByVal ll As String, ByVal pp As String, ByVal nn As Integer)
FileOpen(1, "parol.txt", OpenMode.Output, OpenAccess.Write)
PrintLine(1, ll)
PrintLine(1, pp)
PrintLine(1, nn)
FileClose(1)
End Sub
Private Sub Lock(ByVal form1 As Form1)
Throw New NotImplementedException
End Sub
End Class