-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommonVars.pas
64 lines (49 loc) · 1.53 KB
/
CommonVars.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
unit CommonVars;
interface
uses
CommonTypes, CallClasses;
const
FormAlphaBlend :byte = 100;
var
CfgFileName :string ='Fumigator.cfg';
MsgTitle: string = 'Ôóìèãàòîð';
TempFolder :string = 'Temp';
PrintTempsFolder :string = 'Øàáëîíû';
InitBirthYear: integer = 30;
ServerHost: string = '212.152.36.68';//'localhost'; // '81.177.48.139'; // 'localhost'; //''81.177.48.139'; //;
ServerPort: integer = 1025;
ServerHttpPort: integer = 45455;
CallObj: TCallProto;
CallInfo: TCallInfo;
function MsgBox(AMsg, ATitle: string; AType: integer): integer;
procedure MsgBoxError(AMsg: string; ATitle: string = '');
procedure MsgBoxWarning(AMsg: string; ATitle: string = '');
procedure MsgBoxInformation(AMsg: string; ATitle: string = '');
function MsgBoxQuestion(AMsg: string; ATitle: string = ''): integer;
implementation
uses
Winapi.Windows;
function MsgBox(AMsg, ATitle: string; AType: integer): integer;
begin
if ATitle = '' then
ATitle := MsgTitle;
Result :=
MessageBox(0, PChar(AMsg), PChar(ATitle), AType + MB_TOPMOST);
end;
procedure MsgBoxError(AMsg: string; ATitle: string = '');
begin
MsgBox(AMsg, ATitle, MB_ICONERROR);
end;
procedure MsgBoxWarning(AMsg: string; ATitle: string = '');
begin
MsgBox(AMsg, ATitle, MB_ICONWARNING);
end;
function MsgBoxQuestion(AMsg: string; ATitle: string = ''): integer;
begin
Result := MsgBox(AMsg, ATitle, MB_ICONQUESTION + MB_YESNO);
end;
procedure MsgBoxInformation(AMsg: string; ATitle: string = '');
begin
MsgBox(AMsg, ATitle, MB_ICONINFORMATION);
end;
end.