📄 unit3.~pas
字号:
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
Tmpass = class(TForm)
Bevel1: TBevel;
Label1: TLabel;
Label2: TLabel;
OKBtn: TButton;
CancelBtn: TButton;
ComboBox1: TComboBox;
Edit1: TEdit;
procedure CancelBtnClick(Sender: TObject);
procedure OKBtnClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
mpass: Tmpass;
implementation
uses maen;
{$R *.DFM}
procedure Tmpass.CancelBtnClick(Sender: TObject);
begin
mpass.close;
end;
procedure Tmpass.OKBtnClick(Sender: TObject);
var password:textfile;
passwordstr:string;
//name:string;
begin
assignfile(password,'config.cfg');
reset(password);
readln(password,passwordstr);
closefile(password);
//name:=combobox1.Items;
//if then
begin
if edit1.text=passwordstr then
begin
modalresult:=mrok;
form2.show;
edit1.text:='';
close;
end
else
begin
messagedlg('你没有权力进入!',mtwarning,[mbyes,mbno],0);
mpass.hide;
edit1.text:='';
end ;
{else
begin
messagedlg('你没有权力进入!',mtwarning,[mbyes,mbno],0);
mpass.hide;
end; }
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -