c_password.pas

来自「经典的酒店管理系统」· PAS 代码 · 共 50 行

PAS
50
字号
unit C_PassWord;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, 
  Buttons;

type
  TPasswordDlg = class(TForm)
    Label1: TLabel;
    Password: TEdit;
    OKBtn: TButton;
    CancelBtn: TButton;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  PasswordDlg: TPasswordDlg;

function IfRight: Boolean;

implementation

uses C_JfData;

{$R *.dfm}

function IfRight: Boolean;
begin
  PasswordDlg := TPasswordDlg.Create(Application);
  try
    with PasswordDlg do
    begin
      ShowModal;
      Result := False;
      if ModalResult = mrOK then
        if JfData.IfPass(Password.Text) then
          Result := True;
    end;
  finally
    PasswordDlg.Free;
  end;
end;

end.
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?