F
fan27
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.BitBtn1Click(Sender: TObject);
var pwdfile:textfile;
pwdstr:string;
begin
if checkbox1.Checked =true then assignfile(pwdfile,'f:/data/管理员.cfg')
else assignfile(pwdfile,'f:/data/学生.cfg');
reset(pwdfile);
readln(pwdfile,pwdstr);
closefile(pwdfile);
times:=times+1;
if edit1.Text=pwdstr then
begin
if checkbox1.Checked =true then form6.show
else form7.show;
end;
else
begin
if MessageDlg('密码输入错误。是否退出? ',mtConfirmation,[mbYes,mbNo],0)
=mrYes then Close
else if times<3 then edit1.SetFocus
else
begin
MessageDlg('对不起,密码输入严重错误!请退出。', mtInformation,[mbOk],0);
application.Terminate;
end;
end;
end;
这段代码的times:=times+1;这句过不去,请问是怎么会事?
var pwdfile:textfile;
pwdstr:string;
begin
if checkbox1.Checked =true then assignfile(pwdfile,'f:/data/管理员.cfg')
else assignfile(pwdfile,'f:/data/学生.cfg');
reset(pwdfile);
readln(pwdfile,pwdstr);
closefile(pwdfile);
times:=times+1;
if edit1.Text=pwdstr then
begin
if checkbox1.Checked =true then form6.show
else form7.show;
end;
else
begin
if MessageDlg('密码输入错误。是否退出? ',mtConfirmation,[mbYes,mbNo],0)
=mrYes then Close
else if times<3 then edit1.SetFocus
else
begin
MessageDlg('对不起,密码输入严重错误!请退出。', mtInformation,[mbOk],0);
application.Terminate;
end;
end;
end;
这段代码的times:=times+1;这句过不去,请问是怎么会事?