home *** CD-ROM | disk | FTP | other *** search
- unit Pwchange;
-
- interface
-
- uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, StdCtrls,
- Buttons, Dialogs;
-
- type
- TPWCh = class(TForm)
- Label1: TLabel;
- Password1: TEdit;
- OKBtn: TBitBtn;
- CancelBtn: TBitBtn;
- Label2: TLabel;
- password2: TEdit;
- procedure OKBtnClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- PWCh: TPWCh;
-
- implementation
- uses main;
- {$R *.DFM}
-
- procedure TPWCh.OKBtnClick(Sender: TObject);
- begin
-
- if ((Length(Password1.Text)>0) and (Password1.Text=PassWord2.Text)) or
- (Length(PassWord1.Text)=0) then
- with mainform.saver do begin
- Password:=password1.text;
- CheckPassWord:=Length(PassWord1.Text)>0;
- end
- else
- begin
- MessageDlg('Invalid Input', mtError, [mbOK],0);
- password1.Setfocus;
- exit;
- end;
-
- modalresult:=mrOK;
- end;
-
- end.
-
-