-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuMain.pas
97 lines (79 loc) · 2.34 KB
/
uMain.pas
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
91
92
93
94
95
96
97
unit uMain;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.UITypes;
type
TMain_Form = class(TForm)
Panel1: TPanel;
Label_Agency: TLabel;
Label_Agents: TLabel;
Label_Seller: TLabel;
Label_Properties: TLabel;
Label1: TLabel;
procedure Label_AgencyMouseEnter(Sender: TObject);
procedure Label_AgencyMouseLeave(Sender: TObject);
procedure Label_AgencyClick(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure Label_AgentsClick(Sender: TObject);
procedure Label_PropertiesClick(Sender: TObject);
procedure Label_SellerClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Label1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Main_Form: TMain_Form;
implementation
{$R *.dfm}
uses
uAgencyCreate, uAgentCreate, uPropertyCreate, uClientCreate, uViewingPropertyCreate;
procedure TMain_Form.FormCreate(Sender: TObject);
begin
ReportMemoryLeaksOnShutdown := True;
end;
procedure TMain_Form.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
UserResponse: Integer;
begin
if Key = VK_ESCAPE then
begin
UserResponse := MessageDlg('Èçëèçàíå îò ïðîãðàìòà?', mtConfirmation, [mbYes, mbNo], 0);
if UserResponse = mrNo then
Exit;
Application.Terminate;
end;
end;
procedure TMain_Form.Label1Click(Sender: TObject);
begin
CreateViewingForm;
end;
procedure TMain_Form.Label_AgencyClick(Sender: TObject);
begin
CreateAgencyForm;
end;
procedure TMain_Form.Label_AgencyMouseEnter(Sender: TObject);
begin
(Sender as TLabel).Font.Style := (Sender as TLabel).Font.Style + [fsbold];
end;
procedure TMain_Form.Label_AgencyMouseLeave(Sender: TObject);
begin
(Sender as TLabel).Font.Style := (Sender as TLabel).Font.Style - [fsbold];
end;
procedure TMain_Form.Label_AgentsClick(Sender: TObject);
begin
CreateAgentForm;
end;
procedure TMain_Form.Label_PropertiesClick(Sender: TObject);
begin
CreatePropertyForm;
end;
procedure TMain_Form.Label_SellerClick(Sender: TObject);
begin
CreateClientForm;
end;
end.