Skip to content

Commit b776137

Browse files
committed
Start of development the project
1 parent d77f48f commit b776137

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+5150
-1
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ __history
77
*.map
88
*.exe
99
*.dll
10-
bin/*
10+
bin/*
11+
Win32/*
12+
*.so

Image/AddUserActive.png

17.1 KB

Image/AddUserDown.png

17.3 KB

Image/AddUserNormal.png

16.4 KB

Image/ControlPanel/Thumbs.db

11 KB
Binary file not shown.
1.23 KB
Binary file not shown.

Image/ControlPanel/add_user_down.bmp

1.23 KB
Binary file not shown.
1.23 KB
Binary file not shown.

Image/ControlPanel/group_active.bmp

1.23 KB
Binary file not shown.

Image/ControlPanel/group_down.bmp

1.23 KB
Binary file not shown.

Image/ControlPanel/group_normal.bmp

1.23 KB
Binary file not shown.
1.23 KB
Binary file not shown.

Image/ControlPanel/settings_down.bmp

1.23 KB
Binary file not shown.
1.23 KB
Binary file not shown.

Image/GroupActive.png

17.4 KB

Image/GroupDown.png

17.7 KB

Image/GroupNormal.png

17.2 KB

Image/Online-tr.png

16.9 KB

Image/SettingsActive.png

17.4 KB

Image/SettingsDown.png

17.9 KB

Image/SettingsNormal.png

16.7 KB

Image/Thumbs.db

6.5 KB
Binary file not shown.

Image/UserstatusButtonDown.bmp

198 Bytes
Binary file not shown.

Image/away-d.bmp

376 Bytes
Binary file not shown.

Image/away-s.bmp

376 Bytes
Binary file not shown.

Image/away-tr.png

16.9 KB

Image/away-us.bmp

376 Bytes
Binary file not shown.

Image/default-userface.bmp

5.34 KB
Binary file not shown.

Image/loading-animate-10.png

1.87 KB

Image/offline-d.bmp

376 Bytes
Binary file not shown.

Image/offline-s.bmp

376 Bytes
Binary file not shown.

Image/offline-tr.png

16.9 KB

Image/offline-us.bmp

376 Bytes
Binary file not shown.

Image/online-d.bmp

376 Bytes
Binary file not shown.

Image/online-menu.bmp

376 Bytes
Binary file not shown.

Image/online-s.bmp

376 Bytes
Binary file not shown.

Image/online-tr.bmp

456 Bytes
Binary file not shown.

Image/online-us.bmp

376 Bytes
Binary file not shown.

Resource/images.rc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
DefaultUserface BITMAP "..\\Image\\default-userface.bmp"
2+
UserstatusButtonDown BITMAP "..\\Image\\UserstatusButtonDown.bmp"
3+
AwayD BITMAP "..\\Image\\away-d.bmp"
4+
AwayS BITMAP "..\\Image\\away-s.bmp"
5+
AwayUS BITMAP "..\\Image\\away-us.bmp"
6+
OnlineD BITMAP "..\\Image\\online-d.bmp"
7+
OnlineS BITMAP "..\\Image\\online-s.bmp"
8+
OnlineUS BITMAP "..\\Image\\online-us.bmp"
9+
OfflineD BITMAP "..\\Image\\offline-d.bmp"
10+
OfflineS BITMAP "..\\Image\\offline-s.bmp"
11+
OfflineUS BITMAP "..\\Image\\offline-us.bmp"
12+
OnlineTR RCDATA "..\\Image\\Online-tr.png"
13+
OfflineTR RCDATA "..\\Image\\offline-tr.png"
14+
AwayTR RCDATA "..\\Image\\away-tr.png"
15+
LoadingAnimate10 RCDATA "..\\Image\\loading-animate-10.png"
16+
OnlineMenu BITMAP "..\\Image\\online-menu.bmp"
17+
AddUserNormal BITMAP "..\\Image\\ControlPanel\\add_user_normal.bmp"
18+
AddUserActive BITMAP "..\\Image\\ControlPanel\\add_user_active.bmp"
19+
AddUserDown BITMAP "..\\Image\\ControlPanel\\add_user_down.bmp"
20+
SettingsNormal BITMAP "..\\Image\\ControlPanel\\settings_normal.bmp"
21+
SettingsActive BITMAP "..\\Image\\ControlPanel\\settings_active.bmp"
22+
SettingsDown BITMAP "..\\Image\\ControlPanel\\settings_down.bmp"
23+
GroupNormal BITMAP "..\\Image\\ControlPanel\\group_normal.bmp"
24+
GroupActive BITMAP "..\\Image\\ControlPanel\\group_active.bmp"
25+
GroupDown BITMAP "..\\Image\\ControlPanel\\group_down.bmp"

Resource/tox-res.rc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1 24 "tox.manifest"
2+
MAINICON ICON "tox.ico"

Resource/tox.ico

92 KB
Binary file not shown.

Resource/tox.manifest

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<dependency>
4+
<dependentAssembly>
5+
<assemblyIdentity
6+
type="win32"
7+
name="Microsoft.Windows.Common-Controls"
8+
version="6.0.0.0"
9+
publicKeyToken="6595b64144ccf1df"
10+
language="*"
11+
processorArchitecture="*"/>
12+
</dependentAssembly>
13+
</dependency>
14+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
15+
<security>
16+
<requestedPrivileges>
17+
<requestedExecutionLevel
18+
level="asInvoker"
19+
uiAccess="false"/>
20+
</requestedPrivileges>
21+
</security>
22+
</trustInfo>
23+
</assembly>

Unit2.pas

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
unit Unit2;
2+
3+
interface
4+
5+
uses
6+
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
7+
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
8+
9+
type
10+
fmUserAdd = class(TForm)
11+
procedure FormCreate(Sender: TObject);
12+
private
13+
{ Private declarations }
14+
public
15+
{ Public declarations }
16+
end;
17+
18+
var
19+
Form2: fmUserAdd;
20+
21+
implementation
22+
23+
{$R *.dfm}
24+
25+
procedure fmUserAdd.FormCreate(Sender: TObject);
26+
begin
27+
SetWindowTextW(Handle, PWideChar('Добавление пользователя'));
28+
end;
29+
30+
end.

build-res-d7-xe.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"%ProgramFiles%\Borland\Delphi7\Bin\brcc32.exe" "Resource\images.rc" -fo "images.res"
2+
"%ProgramFiles%\Borland\Delphi7\Bin\brcc32.exe" "Resource\tox-res.rc" -fo "tox-res.res"
3+
pause

clean.bat

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
del *.o *.ppu *.a *.res~ *.dcu *.ddp *.local *.identcache *.exe *.or *.compiled *.cfg *.dbg *.dof *.lps *.res
2+
rd __history /S /Q
3+
rd backup /S /Q
4+
rd Win32 /S /Q
5+
6+
cd src
7+
del *.o *.ppu *.a *.res~ *.dcu *.ddp *.local *.identcache *.exe *.or
8+
rd __history /S /Q
9+
rd backup /S /Q
10+
11+
cd ./../gui
12+
del *.o *.ppu *.a *.res~ *.dcu *.ddp *.local *.identcache *.exe *.or
13+
rd __history /S /Q
14+
rd backup /S /Q
15+
16+
cd ./forms
17+
del *.o *.ppu *.a *.res~ *.dcu *.ddp *.local *.identcache *.exe *.or
18+
rd __history /S /Q
19+
rd backup /S /Q
20+
21+
cd ./../../PngImage_D7
22+
del *.o *.ppu *.a *.res~ *.dcu *.ddp *.local *.identcache *.exe *.or
23+
rd __history /S /Q
24+
rd backup /S /Q

gui/ActiveRegion.pas

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
// ActiveRegion.pas
2+
//
3+
// Îòëàâëèâàåò ðàçëè÷íûå ñîáûòèÿ ìûøè â óêàçàííîì ðåãèîíå ôîðìû
4+
//
5+
// The MIT License (MIT)
6+
//
7+
// Copyright (c) 2013 Dmitry
8+
//
9+
unit ActiveRegion;
10+
11+
interface
12+
{$I tox.inc}
13+
14+
uses
15+
Controls, Classes, Messages;
16+
17+
type
18+
{ Ïåðå÷èñëåíèå ñîáûòèé, ñîçäàâàåìûõ êëàññîì }
19+
TRegionMessage = (rmMouseEnter, rmMouseLeave, rmMouseMove, rmMouseDown,
20+
rmMouseUp, rmMouseClick, rmMouseDblClick);
21+
22+
{ Ñîñòîÿííèå íàæàòèÿ íà ðåãèîí ìûøüþ }
23+
TDownState = (dsNone, dsActive, dsDown);
24+
25+
TProcCursorMessage = procedure(Sender: TObject; RegionMessage: TRegionMessage;
26+
const x, y: Integer; Button: TMouseButton; Shift: TShiftState) of object;
27+
28+
TActiveRegion = class(TGraphicControl)
29+
private
30+
FOnCursorMessage: TProcCursorMessage;
31+
procedure EventCursorMessage(RegionMessage: TRegionMessage;
32+
const x, y: Integer; Button: TMouseButton; Shift: TShiftState);
33+
protected
34+
procedure CursorMessage(RegionMessage: TRegionMessage; const x, y: Integer;
35+
Button: TMouseButton; Shift: TShiftState); virtual;
36+
protected
37+
procedure Click; override;
38+
procedure DblClick; override;
39+
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
40+
X, Y: Integer); override;
41+
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
42+
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
43+
X, Y: Integer); override;
44+
procedure WndProc(var Message: TMessage); override;
45+
public
46+
property OnCursorMessage: TProcCursorMessage read FOnCursorMessage write FOnCursorMessage;
47+
end;
48+
49+
implementation
50+
51+
{ TActiveRegion }
52+
53+
procedure TActiveRegion.CursorMessage(RegionMessage: TRegionMessage; const x,
54+
y: Integer; Button: TMouseButton; Shift: TShiftState);
55+
begin
56+
end;
57+
58+
procedure TActiveRegion.Click;
59+
begin
60+
inherited;
61+
EventCursorMessage(rmMouseClick, 0, 0, mbLeft, []);
62+
end;
63+
64+
procedure TActiveRegion.DblClick;
65+
begin
66+
inherited;
67+
EventCursorMessage(rmMouseDblClick, 0, 0, mbLeft, []);
68+
end;
69+
70+
procedure TActiveRegion.EventCursorMessage(RegionMessage: TRegionMessage;
71+
const x, y: Integer; Button: TMouseButton; Shift: TShiftState);
72+
begin
73+
CursorMessage(RegionMessage, x, y, Button, Shift);
74+
if Assigned(FOnCursorMessage) then
75+
FOnCursorMessage(Self, RegionMessage, x, y, Button, Shift);
76+
end;
77+
78+
procedure TActiveRegion.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
79+
Y: Integer);
80+
begin
81+
inherited;
82+
EventCursorMessage(rmMouseDown, X, Y, Button, Shift);
83+
end;
84+
85+
procedure TActiveRegion.MouseMove(Shift: TShiftState; X, Y: Integer);
86+
begin
87+
inherited;
88+
EventCursorMessage(rmMouseMove, X, Y, mbLeft, Shift);
89+
end;
90+
91+
procedure TActiveRegion.MouseUp(Button: TMouseButton; Shift: TShiftState; X,
92+
Y: Integer);
93+
begin
94+
inherited;
95+
EventCursorMessage(rmMouseUp, X, Y, Button, Shift);
96+
end;
97+
98+
{* Îòëîâêà ñîáûòèé âõîäà è âûõîäà êóðñîðà íà âûäåëåííûé ðåãèîí
99+
*}
100+
procedure TActiveRegion.WndProc(var Message: TMessage);
101+
{$IFDEF FPC}
102+
const
103+
CM_BASE = $B000;
104+
CM_MOUSEENTER = CM_BASE + 19;
105+
CM_MOUSELEAVE = CM_BASE + 20;
106+
{$ENDIF}
107+
begin
108+
inherited;
109+
case Message.Msg of
110+
111+
CM_MOUSEENTER:
112+
begin
113+
EventCursorMessage(rmMouseEnter, 0, 0, mbLeft, []);
114+
end;
115+
116+
CM_MOUSELEAVE:
117+
begin
118+
EventCursorMessage(rmMouseLeave, 0, 0, mbLeft, []);
119+
end;
120+
end;
121+
end;
122+
123+
end.

0 commit comments

Comments
 (0)