-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSW.PAS
More file actions
90 lines (73 loc) · 1.96 KB
/
PSW.PAS
File metadata and controls
90 lines (73 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
unit Psw;
interface
uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, Dialogs, SysUtils, jws99;
type
TPDlg = class(TForm)
Label1: TLabel;
Password: TEdit;
OKBtn: TBitBtn;
CancelBtn: TBitBtn;
procedure OKBtnClick(Sender: TObject);
procedure CancelBtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
PDlg: TPDlg;
implementation
{$R *.DFM}
uses about, main1;
procedure TPDlg.OKBtnClick(Sender: TObject);
var dcc: hdc;
Biti, Horres, Verres: integer;
begin
IF ((Password.Text = 'vferebnf') or (Password.Text = ''))
THEN
BEGIN
dcc:=GetDC(0);
Biti:= GetDeviceCaps(dcc, BITSPIXEL);
Horres:= GetDeviceCaps(dcc, HORZRES);
Verres:= GetDeviceCaps(dcc, VERTRES);
// ïðîâåðêà ðàçðåøåíèÿ åêðàíà, â íåêîòîð³õ ñëó÷àÿõ âèäåî íå õî÷åò ðàáîòàòü (
IF
((Biti < 8) or (Biti > 16) or
(Horres < 640) or (Verres < 480)) then begin
MessageDlg('Ó âñòàíîâëåíîìó ðåæèì³ åêðàíó ïðè ðîáîò³ ç ÀÐÌîì ìîæëèâ³ ïîìèëêè.'+
' Îïòèìàëüíèé ðåæèì 800õ600õHighColor (16 digits). Ïîòð³áíå âòðó÷àííÿ ñïåö³àë³ñòà.',
mtWarning, [mbCancel], 0);
Exit; end
else
IF (Password.Text = 'vfhwew') then Moderator:='Admin' else
Moderator:='User';
Hide;
AboutBox := TAboutBox.Create(Application);
AboutBox.Show;
AboutBox.Update;
Application.CreateForm(TFormMain, FormMain);
AboutBox.Hide;
FormMain.ShowModal;
FormMain.Free;
AboutBox.Free;
Close;
END
ELSE
BEGIN
Password.Text := '';
MessageDlg(' Ìè íå çíàéîì³ ?', mtWarning, [mbCancel], 0);
Password.SetFocus;
END;
end;
procedure TPDlg.CancelBtnClick(Sender: TObject);
begin
Close;
end;
procedure TPDlg.FormCreate(Sender: TObject);
begin
// if HPrevInst > 0 then Application.Terminate;
AppSingle;
end;
end.