📄 shuaka.pas
字号:
unit Shuaka;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TShuakaForm = class(TForm)
Label1: TLabel;
ButtonOk: TButton;
procedure ButtonOkClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ShuakaForm: TShuakaForm;
TxtInFile:textFile;
StringTemp:String;
implementation
uses Shenfen;
{$R *.DFM}
procedure TShuakaForm.ButtonOkClick(Sender: TObject);
begin
Label1.Caption:='正在读卡,请稍候......';
Try
If FileExists('police.dat') Then
Begin
DeleteFile('police.dat');
End;
If FileExists('police.dat')=False Then
Begin
Winexec('project1.exe',9);
While Not FileExists('police.dat') Do
LAbel1.Caption:='正在读卡,请稍候......';
If FileExists('police.dat') Then
Begin
AssignFile(TxtInFile,'police.dat');
Reset(TxtInFile);
Readln(TxtInFile,StringTemp);
CloseFile(TxtInFile);
If (Length(StringTemp)=88) and (copy(StringTemp,1,2)<>' ') Then
Begin
{ShuaKaForm.Visible:=False;}
Close;
ShenFenForm.ShowModal;
End
Else
LAbel1.Caption:='刷卡错误,请重试';
End;
End;
Except
On E:Exception Do
Begin
ShowMessage('文件读写错误,请重试');
LAbel1.Caption:='刷卡错误,请重试';
Exit;
End;
End;
end;
procedure TShuakaForm.FormActivate(Sender: TObject);
begin
Label1.Caption:='请刷IC卡进行身份验证';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -