Client. ini
[Screen]
X = 1024
Y = 768
Map. MDB
Map_id map_chk_station map_x_min map_x_max map_y_min map_y_max
1 monitoring site 574 613 283 321
2. Monitoring site 517 563 127 162
3, 4, monitoring site 854, 899, 34, 74
Procedure tformmain. image1mousemove (Sender: tobject; shift: tshiftstate; X,
Y: integer );
VaR
Xscreen, yscreen, xmin, xmax, ymin, Ymax, xbase, ybase: integer;
INI: Tinifile;
Filename, S: string;
Begin
Inherited;
Filename: = extractfilepath (application. exename) + 'client. ini ';
INI: = Tinifile. Create (filename );
Try
Xbase: = ini. readinteger ('screen', 'x', 0 );
Ybase: = ini. readinteger ('screen', 'y', 0 );
Finally
INI. Free;
End;
Xscreen: = screen. width;
Yscreen: = screen. height;
Panexy. Caption: = format ('abscissa: % s ordinate: % s', [inttostr (x), inttostr (y)]);
Lock;
Try
DM. cdstemp. Data: = DM. SC. appserver. opensql ('select * From map ');
With DM. cdstemp do
Begin
First;
While not EOF do
Begin
Xmin: = round (xscreen/xbase * fieldvalues ['map _ x_min ']);
Xmax: = round (xscreen/xbase * fieldvalues ['map _ x_max ']);
Ymin: = round (yscreen/ybase * fieldvalues ['map _ y_min ']);
Ymax: = round (yscreen/ybase * fieldvalues ['map _ y_max ']);
If (x> = xmin) and (x <= xmax) then
If (Y> = ymin) and (Y <= Ymax) then
Begin
S: = format ('% s [pressure: % s] [Water Level: % s] [Ph: % s] [residual chlorine: % s] [turbidity: % s]',
[Fieldvalues ['map _ chk_station '], '',
'','']);
Panedata. Caption: = s;
End else
Panedata. Caption: = '';
Next;
End;
End;
Finally
Unlock;
End;
End;